Joined: 31 Oct 2004
|Posted: Sun Mar 08, 2015 9:24 am Post subject: A note on cpufreq/scaling not working
|Spoiler, tl;dr: echo "purpx cbjre fhccyl, znl or gbb fznyy/qlvat" | sed 'y/anbocpdqerfsgthuivjwkxlymz/naobpcqdresftguhviwjxkylzm/'
This is a note to self and everyone is welcome to read this as well when they have CPU scaling problems.
I spent around 2 days now debugging this (as it turned out, not Gentoo or even Linux related!) problem. To all the fanboys out there: It would have happened with fruity and airy OS as well.
i have a Thinkpad T410i here, but this will apply to most lenovo notebooks, and most likely to many other manufacturers or probably even desktop computers.
I know scaling has worked flawlessly on this box (as every other one, including other Thinkpads); it's no rocket science to get cpufreq working, anyway. For a minimum setup, just enable it in the kernel config and set default governor to ondemand. If you have a newer CPU (>= sandy bridge), use the pstate driver as ondemand is not the best technology, but it still seems to be for the older generations of CPUs.
I tried changing to userspace governor, playing with different kernel stuff because I just had an update and thought it has most likely been caused by this, to no avail.
This is what I got all the time:
|mephitis ~ # cpupower frequency-info | grep -A 2 policy
current policy: frequency should be within 933 MHz and 933 MHz.
The governor "ondemand" may decide which speed to use
within this range.
Well, not much to decide, then ;->
I always remove batteries when not being mobile. This results in my 5+ yo T61p battery still running a little more than 1 hour, which I think is great, as most other people I know have to ditch theirs after 2 to 3 years. I always store the battery at around 50% charge as recommended and only charge them fully before I know I'll have to be mobile w/o a power outlet.
I have two types of PSUs here, one being 90W, one being 65W.
Although they technically both work, this box is intelligent enough to recognize the 65Ws are not enough to fully use the CPU instead of trying and crashing the system.
I found out trying with the battery in, and it suddenly worked.
Why? Because the battery reading in e17 said the battery is nearly empty when instead it was absent. I thought that's the problem and something (BIOS) reduced clock speed because of this false reading. Turned off performance reduction on battery in BIOS to no avail.
Then found out the reading belonged to a different battery: The one in my sporadically used (lenovo) bluetooth mouse. Nice feature btw! I now mapped the battery display to the correct one and now I'm on AC when indeed I am ;->
So, it must have had to do something with the power source, so I changed that from battery to the more powerful 90W type and voilà, happily scaling again.
These are the kinds of stuff that make IT funny. Or make you go to the booby hatch.