Page 1 of 1

Reverting to defaults?

Posted: Fri 11. Jun 2010, 05:21
by lukechanning
I've noticed some strange readouts in my read_msr exploitations. Right after booting my Macbook, everything reads exactly as it should (--readmsr reports correct cpu freq, as well as voltage), but after a while (say an hour of average use, or maybe a suspend and unlock), this is what I get:

[cpu0] [CURRENT] FID:10 HID:0 DID:0 VID:31
[cpu0] [TARGET] FID:8 HID:1 DID:0 VID:7
[cpu0] [HIGHEST] FID:10 (HID:0 DID:0) VID:31 (not sure if they exist here)
[cpu0] [LOWEST] FID:6 (HID:0 DID:0) VID:18 (not sure if they exist here)
[cpu0] [SLFM] FID:8 VID:7
[cpu0] [IDA] FID:11 VID:39
[cpu0] [CURRENTLY ACTIVE FEATURES] IDA:64 EIST:1

[cpu1] [CURRENT] FID:10 HID:0 DID:0 VID:31
[cpu1] [TARGET] FID:10 HID:0 DID:0 VID:31
[cpu1] [HIGHEST] FID:10 (HID:0 DID:0) VID:31 (not sure if they exist here)
[cpu1] [LOWEST] FID:6 (HID:0 DID:0) VID:18 (not sure if they exist here)
[cpu1] [SLFM] FID:8 VID:7
[cpu1] [IDA] FID:11 VID:39
[cpu1] [CURRENTLY ACTIVE FEATURES] IDA:64 EIST:1

What strange is that my settings are (15 12 11 10 8 5) which is represented in the first Cpu, though not apparently in use, but not in the other cpu. Also, my cpufreq applets report that neither cpu is even operating at the 10th FID (Both were at lowest possilbe freq at the time of this check). Even stranger, I don't notice any performance change--as best I can tell, PHC is doing his job. :S My laptop isn't getting hot like it used to, battery life is better (although still not quite where I want it :P), etc.
I'm at a loss to what's happening here. Is it just an error in the read_msr script? Any help is appreciated, though not immediately needed.

Re: Reverting to defaults?

Posted: Fri 11. Jun 2010, 20:14
by the-fallen
After a Suspend the Kernel gets reset and I think it reloads all its modules. So the Frequency Tables are re-read from the system by the ACPI subsystem. Thats why it appears that your system now uses the default values again. (and it really does).

We are ware of that fact but we do not have a solution. There are some Ideas but we were not yet able to make them real.

After a suspend you need to setup your values again.

Re: Reverting to defaults?

Posted: Sat 12. Jun 2010, 20:29
by lukechanning
Alright, well thanks for the response! I wondered if that was what's happening, but it's good to know. Will a simple modprobe -r acpi-cpufreq, modprobe phc-intel be enough to reset, or do I manually need to reinstall the phc_vids? A fix in the future would be lovely, but all things considered, doing either is not too big a pain, and especially not for the gains I get from PHC. Great tool. :) Thanks so much!

Re: Reverting to defaults?

Posted: Sun 13. Jun 2010, 13:21
by the-fallen
You just need to set your values again after suspend. That can be done using a simple script.

You will possibly notice that the values for CPU0 are not reverted. Thats because CPU0 stays online in suspend mode while all other CPUs are shut down.
Thats why they forget their (new) values and take the default ones.
And that is why ACPI got those values after resume.

Re: Reverting to defaults?

Posted: Sun 13. Jun 2010, 18:32
by lukechanning
Ah, that makes sense. I wondered why the one wasn't reverting. Thanks for all the information; you've been tremendously helpful. Everything seems to work fine when I reset the values, so cheers! Hopefully a fix will be found in the future. Thanks again!