CPU frequency

Diskusjon rundt Mac OS

CPU frequency

Innleggav ivar » ons 19.11.2003 18:58

Last login: Wed Nov 19 17:52:37 on ttyp1
Welcome to Darwin!
pc117:~ ivar$ sysctl hw.cpufrequency
hw.cpufrequency: 533333332

Jeg har en 867MHz PB, stemmer dette? Resultatet var på batteridrift. Skal sjekke når jeg kommer hjem med strøm og poste resultat.

Hva får dere?


Brukerens avatar
medlem i 198 måneder

Innleggav ivar » ons 19.11.2003 19:44

Explanation of sysctl hw.cpufrequency and what CPUfrequency does... 

My friend, Jay Savage, who understands the BSD underbelly of OS X quite a bit better than I, explains what sysctl hw.cpufrequency does:
The poster at version tracker is correct that sysctl doesn't return a real number. It returns a constant passed to the system at system start-up (and possibly wake-up, I'm not sure) by the PMU. The kernel and PMU will modify the actual speed on-the-fly based on load numbers and energy-saver setting in the pref pane, and sysctl will not return that number, you need to actually pool the processor to find out what it's doing at any given time...this is what the bogomips calculated a Linux start-up are all about.

For your purposes, though, the real numbers don't matter, because the bug in question involves the PMU essentially forgetting what the real speed is and setting the max Mhz artificially low. Effective clock speed may well often be below the number reported by sysctl (a kind of variable clock speed is what makes mobile chips possible: why waste power if your load numbers are below 1?), but it will never be above the number reported by sysctl. So if sysctl is reporting 400Mhz for a 800Mhz processor, you know something is seriously wrong. Even under full load, the PMU will not allow the CPU speed up past 400Mhz, which means you're never getting more than 50% out of your hardware. Get that back up to 867, and you can theoretically get 867Mhz out of your chip. You won't get that all the time, especially on battery power, but better and actual 400 out of 800 than an actual 200 out of 400.[bold emphasis mine]

So, the CPUfrequency scripts work fine for what they are meant to do, which is simply to report the maximum possible number (speed in hertz) your computer currently thinks in the processor is capable of achieving. If it reports back 5333333334 and you have an 867mhz chip, as happened with me earlier this week, then your PMU needs to be reset, so that the computer will realize that there is more processing power available there, should it be needed...

Skulle vel heller ha postet en link. Men, men. Hvordan resetter jeg PMU'n? Jeg har prøvd, som Apple sier å:

1. If the computer is on, turn it off.
2. Reset the power manager by simultaneously pressing and then releasing Shift-Control-Option-power on the keyboard. Do not press the fn (Function) key while using this combination of keystrokes.
3. Wait 5 seconds.
4. Press the power button to restart the computer.

Men, maskinen bare skrur seg på igjen med en gang jeg trykker ned kommandoen. Altså, den starter vanlig. Hva gjør jeg feil?

Håper dere kan hjelpe?[/i]

Brukerens avatar
medlem i 198 måneder

Innleggav ivar » tor 20.11.2003 17:25

Fikk gjort det etter en del knoting.

Last login: Thu Nov 20 16:17:41 on ttyp1
Welcome to Darwin!
pc117:~ ivar$ sysctl hw.cpufrequency
hw.cpufrequency: 866666664

Nå ser det greit ut.


Brukerens avatar
medlem i 198 måneder

Returner til Mac OS

Hvem er i Forumene

Registrerte brukere: Google [Bot], tom@ronaasen.no