Comment 141 for bug 760131

Revision history for this message
Matthew Hessel (matt-hessel) wrote : Re: [Bug 760131] Re: Power consumption raised significantly in natty

that is the interesting question.

There isn't really a large discrepancy for the most part.

Phoronix did a piece comparing ubuntu to windows 7, and they actually were
rather close.

http://www.phoronix.com/scan.php?page=article&item=windows_ubuntu_pow&num=1

that said, there are a few reasons why Natty ends up using more power than
previous versions..

the biggest is the ASPI changes to the kernel. Basically, there are some
devices that could lock up the boot process as earlier versions would boot
up. The kernel devs changed the behavior of the linux kernel, now it does
not assume it can implement ASPM, it will query the ACPI bits in the BIOS on
your computer if it can. Before this, it didn't check, it would turn it on
regardless.

Unfortunately, as these things go, many BIOS out there SUCK. Most
manufacturers do little testing (as in none) to make sure their bios works
according to established standards, and usually if it works with Windows,
they ship it, and don't really care afterwards. Now that the Linux kernel
is being polite, (and following actual ACPI standards) many devices will
not report proper information to hand off to the Kernel. So Linux will now
assume it can't touch it, and ASPM is disabled on the devices.

for the most part, you can override this with the pcie_aspm=force command
during boot. There does seem to be some devices I have that don't enable
ASPM even with that for me, mostly some usb stuff on my laptop and the Intel
wireless 5100 adapter. I don't know that it makes a huge difference, with
the Maverick kernel, I can see idle power usage down to 18 watts, but that
is all PM options enabled, and nothing running but Unity (by the way, unity
is much more power efficient than the older Gnome 2.x - Who would have
thought..)

with the latest upstream sources from git.kernel.org or the Oneiric sources
I can see it idle at about 19-20 watts. Not a lot lost.

the other thing to realize is there were many scheduler changes that have
been made since 2.6.38 in Natty. Many of them improve things for power
utilization. One developer found that there was a problem with counters
rolling over that would cause timing issues with load balancing between
multiple cores, and it would wake the CPUs early, preventing them from
idling in low power states.

This is fixed in the upstream sources, and helps a bit with the overall
performance. Maybe it is just me, but when I am actually doing something on
the laptop, it doesn't seem to run the battery down as bad with the patch
in, so maybe that is something.

Your experience may vary, some didn't report any issues in this thread at
all with natty, some even said they got BETTER life out of the battery on
Natty vs others.

I think it depends more on how seriously your laptop manufacturer takes BIOS
debugging, as many don't try very hard. If you happen to be a lucky person
with a good BIOS, like maybe a decent lenovo or something, then you might
not see any issues at all.

Matthew Garrett was the subject of a recent article on LWN.net that gives a
good history on this. Maybe it will help more than my rambling.

http://lwn.net/Articles/449448/

Most of the stuff I have read from the Devs make it look like the long term
fix is going to be changes in the drivers to override the broken crap even
if the BIOS is stupid. But that will take updates to the affected drivers
by those who know how, and when it is appropriate to force the override on
all users' hardware. Matthew Garett actually mentions this, that perhaps
some things work in windows as some drivers already force the handoff of
ASPM functions when windows initializes.

On Mon, Jul 18, 2011 at 4:19 AM, Nicolas Michel <email address hidden>wrote:

> Out of curiosity:
>
> Why Linux have this problem and Windows don't?
> This is not a troll. I don't understand technically : if hardware
> devices don't propertly support the ASPM power-saving modes, why Windows
> is not concerned?
>
>
> On 07/18/2011 02:24 AM, cjcolella wrote:
> > There won't be a fix per se for Oneiric. This is a permanent condition
> > because it is a new setting of the Linux kernel, and nobody in power
> > considers it a bug, nor a very important issue. Sorry.
> >
> > "There isn't any easy 'solution' to improve this situation beyond
> > affected users forcing the PCI-E Active-State Power Management using the
> > pcie_aspm=force kernel command line option. Jesse thinks that more Linux
> > drivers will end up needing to set the ASPM bits directly as a long-term
> > solution. There's just too many hardware devices that don't properly
> > support the ASPM power-saving modes.
> >
> > The only alternative would be to create a big white-list of supported
> > devices, but that comes down to being effectively the same large task as
> > just having the driver set the appropriate bit. So there won't be any
> > magic fix in the Linux 3.0 kernel nor will there likely be any major
> > change in the Linux 3.1 kernel without suddenly a bunch of drivers
> > handling the Active-State Power Management bit. For now, mobile users
> > just need to know to force the PCI-E ASPM support if needed to maximize
> > the Linux battery life."
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/760131
>
> Title:
> Power consumption raised significantly in natty
>
> Status in Release Notes for Ubuntu:
> Fix Released
> Status in “linux” package in Ubuntu:
> Triaged
> Status in “linux” source package in Natty:
> Incomplete
> Status in “linux” source package in Oneiric:
> Triaged
>
> Bug description:
> This is a regression moving from maverick->natty. With the same sort
> of light interactive usage, Battery life has gone from ~4 hours to
> 2:45 or so.
>
> Running powertop shows the system in P-state "Turbo mode" 10-15% of
> the time. Typically this was almost zero in maverick, 98+% of the
> time maverick was in the lowest state.
>
> wakeups reported in the 5-600/s range where previously (from memory)
> it was 200 ish. i915 driver is high on the list. This is
> irrespective of whether running unity or classic desktop.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: linux-image-2.6.38-8-generic 2.6.38-8.42
> Regression: Yes
> Reproducible: Yes
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic x86_64
> AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
> Architecture: amd64
> ArecordDevices:
> **** List of CAPTURE Hardware Devices ****
> card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC0: james 2068 F.... pulseaudio
> CRDA: Error: [Errno 2] No such file or directory
> Card0.Amixer.info:
> Card hw:0 'Intel'/'HDA Intel at 0xf2620000 irq 47'
> Mixer name : 'Conexant CX20561 (Hermosa)'
> Components : 'HDA:14f15051,17aa20ff,00100000'
> Controls : 16
> Simple ctrls : 8
> Card29.Amixer.info:
> Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30,
> fw 7XHT24WW-1.06'
> Mixer name : 'ThinkPad EC 7XHT24WW-1.06'
> Components : ''
> Controls : 1
> Simple ctrls : 1
> Card29.Amixer.values:
> Simple mixer control 'Console',0
> Capabilities: pswitch pswitch-joined penum
> Playback channels: Mono
> Mono: Playback [on]
> Date: Wed Apr 13 15:03:35 2011
> EcryptfsInUse: Yes
> HibernationDevice: RESUME=UUID=bb479652-f524-4abe-b1b0-27646d6deebc
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate
> amd64 (20100928)
> MachineType: LENOVO 7465CTO
> ProcEnviron:
> LANGUAGE=en_US:en_GB:en
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic
> root=UUID=266abe9a-19c2-4cc3-9ef7-238b729b6044 ro quiet splash
> libata.force=noncq vt.handoff=7
> RelatedPackageVersions:
> linux-restricted-modules-2.6.38-8-generic N/A
> linux-backports-modules-2.6.38-8-generic N/A
> linux-firmware 1.50
> RfKill:
> 0: phy0: Wireless LAN
> Soft blocked: no
> Hard blocked: no
> SourcePackage: linux
> UpgradeStatus: Upgraded to natty on 2011-04-06 (7 days ago)
> dmi.bios.date: 11/10/2009
> dmi.bios.vendor: LENOVO
> dmi.bios.version: 6DET61WW (3.11 )
> dmi.board.name: 7465CTO
> dmi.board.vendor: LENOVO
> dmi.board.version: Not Available
> dmi.chassis.asset.tag: No Asset Information
> dmi.chassis.type: 10
> dmi.chassis.vendor: LENOVO
> dmi.chassis.version: Not Available
> dmi.modalias:
> dmi:bvnLENOVO:bvr6DET61WW(3.11):bd11/10/2009:svnLENOVO:pn7465CTO:pvrThinkPadX200s:rvnLENOVO:rn7465CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
> dmi.product.name: 7465CTO
> dmi.product.version: ThinkPad X200s
> dmi.sys.vendor: LENOVO
>
> === Release Notes ===
>
> Due to a regression inherited from the upstream linux kernel, Natty 11.04
> can exhibit a 10-30% increase in power consumption. This is a known issue
> which is actively being investigated. A SRU will be released onced a viable
> solution is found. For more information, please see
>
> http://www.phoronix.com/scan.php?page=article&item=linux_mobile_uffda&num=1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-release-notes/+bug/760131/+subscriptions
>