Hacker News new | past | comments | ask | show | jobs | submit login
New Linux kernel fixes power-saving issues (h-online.com)
85 points by nickolai on Feb 7, 2012 | hide | past | favorite | 16 comments



Very excited about this. My T410 has a noticeably shorter battery life when running arch compared to windows. This will help close that gap a bit.


running a t420 with arch. 9 cell battery. getting about 12 hours out of it. grab the powertop2 utility and go through and make sure every one of its recommendations says "good" by tweaking the settings (you'll have to do some research on the recommendations it gives you to accomplish this).

i went from about 18 watts idle out of the box (3.1.9-ARCH kernel) to under 7 watts.


I posted my /etc/pm/power.d/powersave.sh script that I created in response to the recommendations that powertop2 gave me. I'm using Arch linux but the settings aren't that much different for other distros.

Get powertop2 from AUR to verify that this script is working properly (check the Tunables before and after you run the script). They should all turn to "good". One other thing to note is that the script runs when the power state is toggled. Thus, if you are plugged in, the script restores things to the non-tuned state. So, to verify that the script is working, you should start powertop2 with your computer plugged in and then unplug it. It takes a few seconds for powertop2 to refresh the Tunables section.

This was written for my thinkpad T420, but it should work on nearly all current-gen thinkpads with the intel HD3000 card.

powersave.sh script is here: https://gist.github.com/92980c0a67e0b2d1bd43

powertop2 is here: https://aur.archlinux.org/packages.php?ID=48935

proof of the results is here (forgive the bad font fringing, i got the power going before making the fonts look good): http://i.imgur.com/rN09E.png

You should also edit your /boot/grub/menu.lst file to pass the special powersaving kernel flags at boot. The relevant stanza in mine looks like this:

  # (0) Arch Linux
  title  Arch Linux
  root   (hd0,0)
  kernel /vmlinuz-linux root=/dev/sda3 ro pcie_aspm=force i915.i915_enable_rc6=1
  initrd /initramfs-linux.img
Make sure that you re-run grub-install after changing this file. And, please, be careful. You could easily kill your system. To regenerate the grub file, do the following:

  #grub-install --no-floppy /dev/sda
*replace /dev/sda (above) with the root of your linux OS drive. This may be different for multi-boot machines.


Does it have Optimus, i.e. two graphics chips? Which chip do you use more often? I keep my T410 exclusively running on the power-hungry nVidia chip and don't get more than 2hrs of battery life.


It does have Optimus and the battery life is about where yours is - maybe 2.5 hours.

I'm running the nVidia chip exclusively, but when I get around to it, I'll probably switch, as I'm running an openbox desktop that just doesn't need that kind of graphics acceleration. I have yet to figure out a painless way of switching between the two, but that's probably because I haven't really worked on it much.


There's no current way to switch painlessly, but there is something that makes it slightly nicer than having to restart all of your programs. Check out Bumblebee [1]. It does it by running two X servers, one for the lower power system and another for the NVIDIA binary blob and plays with environment variables to get things working. Then it takes the NVIDIA server and copies the images over to the slower card. In a round about way it's what windows systems do for it, but not quite as sane and not quite as performant. There's been some work to create the sharing needed so that drivers can share the buffers directly and eventually there won't need to be the second X server. However this also depends on if that work either gets its license changed or NVIDIA GPLs the kernel bits to their driver.

[1] https://wiki.archlinux.org/index.php/Bumblebee


There's a bios setting for switching between the two


Do you use proprietary nVidia driver?

I have only ATI cards and the difference between open source driver and proprietary driver is world apart. With radeon I have +2 hours, with fglrx it's ~4 hours.


Good news. It should be noted that Ubuntu has included this fix since their distro version 3.0.0-13, and other distros may have backported the fix, too. But now it's in mainline.


Nice. My X220 already has seemingly-infinite battery life, so this should be even better.


I have an X220, too, but it only has ~3 hrs battery life. Where did you buy yours?


I have two, one for work and one I bought myself from Lenovo. They both get about 8 hours battery life with the 9-cell battery.


Mine too, but it runs very hot and gets significantly less battery on Linux than Windows. (How you know something's wrong.)

I tried a fix or two as suggested, but they didn't help; I hope the kernel upgrade does it!


I don't know how mine compares to Windows, but it doesn't run particularly hot. I don't use anything fancy on my Linux boxes; xmonad and some terminals on my home machine, xmonad and GNOME on my work machine. Very low-CPU :)


Same for me, I have an x220 using the 6cell and get around 3h on Windows and about the same on ArchLinux... Broken battery?


"The patch only has this effect on systems with the firmware problem detailed above, which can be identified by using dmesg to display kernel messages and looking for the message "ACPI FADT declares the system doesn't support PCIe ASPM, so disable it"." >> Not for all!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: