Linux power problems

So I’ve had Scientific Linux 6.0 64 bit on my Thinkpad R60 for a while now, and for the most part it has been fine. But one thing that has really annoyed me is that everytime there is a kernel update, I notice that the laptop fan is stuck on (when the system is essentially idle). I always think “This can’t be right” and reboot back off my old kernel.

The thing is the only kernel I have now that has ‘good’ fan behaviour is 2.6.32-71.24.1 which is the one that went in when I first installed SL 6.0. Under that kernel , when the R60 is relatively idle, the fan will come on at 2500 to 2900rpm or so for say 60 secs, then be completely off for another 60 secs. ┬áThat’s kind of how I expect it to be when the system is idle (it would be nicer if the fan was off for longer periods … but sometimes off is better than never off)

A few yum updates later I also have 2.6.32-71.29.1 and the latest being 2.6.32-131.2.1. These two always run with the fan stuck on at 3300rpm or so (while the R60 is essentially idle). Very annoying. So it’s been interesting to read the various ‘linux power regression’ articles on Phoronix lately. The leading cause of the Recent Linux Kernel Power Problems article explains a key source of the problem related to some ASPM subsystem … and a boot option workaround; “pcie_aspm=force”

So I had a go at adding that option into the grub.conf for the 2.6.32-131.2.1 kernel and amazingly the fan behaviour is back to the “right” behaviour. The fan now comes on for about 60 secs at 2800rpm, then goes off for 60 secs and so on. Cool stuff. Many thanks to the Phoronix site for figuring this out.

Now, a key thing to remember with Redhat/SL kernels is that they contain many patches from more recent kernels ‘backported’ into an older kernel such as 2.6.32 … and hence that partly explains why this problem exists on the recent SL 6.0 kernels.