A bunch of us did a lot of work investigating power consumption issues in openSUSE 12.1 on Sandybridge laptops (especially the Thinkpad X220)

We found the majority of the power consumption issues are due to the i915 graphics module and the notorious PCIe ASPM issues that were in the Linux kernel

With the impending release of openSUSE 12.2, I've slapped Release Candidate 1 on my laptop and brushed off my notes to see how the situation has improved in the new release

For a short 'tl;dr' version of what you can do to (probably) save a bunch of power on your Sandybridge laptop, skip to 'Summary' at the end

PCIe ASPM

Matthew Garrett's great work with a number of PCIe ASPM patches and fixes means that now openSUSE 12.2 seems to correctly detect the ASPM capabilities of my PCIe devices, making the pcie_aspm=force boot parameter obsolete. Once you have openSUSE 12.2 installed, you can this for yourself, run the following from the terminal (as root)

# lspci -vvv|grep ASPM

You should get a list showing that the majority of your PCI devices have ASPM Enabled. The more devices with ASPM L1 enabled the better, as this provides greater power reductions

I have tried booting openSUSE 12.2 with the following boot parameter

pcie_aspm=powersave

or

pcie_aspm.policy=powersave

In theory one of these should set the aspm policy to a greater powersaving mode - I haven't seen any improvement

Trying to double check what policy it's using with 'cat /sys/module/pcie_aspm/parameters/policy' suggests it's still set to [default] and ignoring my attempts to eek out a little more battery life.

If you have a different experience, please comment below!

i915

Some people probably think the built in GPU to Sandybridge chips is a cool thing. When it comes to power consumption on Linux, it seems to me to pretty much be a pain in the arse. The i915 driver has a ton of power saving parameters, many of which are turned off by default, to play on the safe side as it seems no two chipsets from the i915 are exactly the same and some really don't seem to like some of these paramters

The following have all been tested on an X220 Thinkpad with an i7 CPU. They work fine for me and so far have had no negative effects, just significant battery life gains. That said, your mileage may vary, please test and find out what works best for you

i915 RC6

The i915 RC6 feature allows the GPU to enter a lower power state during GPU idle. Back in openSUSE 12.1 my recommendation was to boot with this parameter set to '1'

However, doing a 'modinfo i915' in openSUSE 12.2 reveals that the i915 RC6 parameter actually controls several different stages of RC6, noted as "RC6, "Deep RC6", and "Deepest RC6", each with obviously different effects on power consumption.

Booting up with the following boot parameter enables all 3 RC6 states, for maximum power savings.

i915.i915_enable_rc6=7

i915 Framebuffer Compression

Framebuffer compression reduces the memory bandwidth on screen refereshes and depending on the image in the framebuffer can reduce power consumption. My tests suggest this saves around about 1 Watt

To enable it, boot with the following kernel boot parameter

i915.i915_enable_fbc=1

i915 LVDS Downclocking

This option will download the LVDS refresh rate which in theory should save power. In my tests it didn't seem to do much, but it didn't break anything either so I'm still running it on my default boot options

i915.lvds_downclock=1

DRM vblank off delay

This parameter reduces DRM wakeup events and according to powertop seems to be saving me a good couple of watts of power.

drm.vblankoffdelay=1

Stuff I didn't try

Powertop

Powertop has a theoretically great feature that can suggest and implement settings to improve the power saving of a number of devices, including Webcams, Audio, DRAM, ethernet, etc

However, every time I tested it in openSUSE 12.1, it always seems to break more than it fixed, and even though openSUSE 12.2 comes with the nice and shiny powertop v2, I haven't been brave enough to play around with this yet. If you give it a shot, let me know how it goes in the comments

Aggressive Link Power Management

Aggressive Link Power Management (ALPM) is a mechanism where a SATA AHCI controller can put the SATA link that connects to the disk into a very low power mode during periods of zero I/O activity and into an active power state when work needs to be done. Tests show that this can save around 0.5-2 Watts of power on a typical system.

But as it can theoretically cause data loss on some controllers that end up going into their low power states incorrectly, I've avoided looking into this and probably wont (I'm quite happy with the results of the above parameters). Again, if you're braving than me, let me know how it goes

Summary

Pulling all the above together, if you want to have my recommended maximum (stable) power consumption on Sandybridge laptops running openSUSE 12.2 all you need to do is

  • Fire up YaST
  • Go to Boot Loader
  • Find the field for 'Optional Kernel Command Line Parameter'
    • If you're using Grub2 this is under "Boot Loader Options"
    • If you're using Grub1 this is under the Edit option for whichever Grub menu entry fires up openSUSE 12.2
  • Add the following to the end of the line (which usually ends in 'showopts')

i915.i915_enable_rc6=7 i915.i915_enable_fbc=1 i915.lvds_downclock=1 drm.vblankoffdelay=1

  • Click OK, Close YaST, reboot your system, and you should be home free with a laptop with a power consumption lasting twice as long
    (in my tests, I went from over 20W with Wifi/Bluetooth enabled and Full backlight brightness, to around 10W, obviously dropping even lower if I reduce the backlight and turn off Wireless)

Please let me know how it works out for you in the comments below!