Linux power regression is not improved from Natty to Oneiric to Precise to Quantal - Netbook Zareason Terra HD

Bug #875801 reported by Dragoneyes
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

I' m opening this bug as continuation of bug #760131 [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/760131] (comment 188), since the power consumption in Ubuntu 11.10 is not really reduced, so the power regression in kernel 3.0.0-12 is not fixed for my hardware. Powertop shows a reduction of about 1W (from about 8W to 7W), but battery life is not really improved. Actually, battery (6 cell, Soltech PT20) life is 4h30', but it should be 6h. I'm on a Zareason Terra HD netbook [https://zareason.com/shop/Terra-HD.html], with 3G modem, 1Gb Ram, 40Gb SSD.
This is a fresh installation on Oneiric (not an upgrade).
I'm also adding a lshw output.
Ask me for any more needed information.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-12-generic 3.0.0-12.20
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
ApportVersion: 1.23-0ubuntu3
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: stiu 1471 F.... pulseaudio
 /dev/snd/controlC1: stiu 1471 F.... pulseaudio
CRDA: Error: [Errno 2] File o directory non esistente
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0x40100000 irq 47'
   Mixer name : 'Realtek ALC662 rev1'
   Components : 'HDA:10ec0662,10ec0662,00100101'
   Controls : 17
   Simple ctrls : 10
Card1.Amixer.info:
 Card hw:1 'Camera'/'Vimicro Corp. Venus USB2.0 Camera at usb-0000:00:1d.7-7, high speed'
   Mixer name : 'USB Mixer'
   Components : 'USB0ac8:3420'
   Controls : 2
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Mic',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
   Capture channels: Mono
   Limits: Capture 0 - 48
   Mono: Capture 38 [79%] [11.00dB] [on]
Date: Sun Oct 16 17:33:07 2011
HibernationDevice: RESUME=UUID=9b27c5c0-6de2-4182-bb77-46dca18e8a94
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
MachineType: Zareason Corporation PT20
ProcEnviron:
 PATH=(custom, no user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=9c74d7b3-3d06-4494-b399-4395aac9cbc4 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-12-generic N/A
 linux-backports-modules-3.0.0-12-generic N/A
 linux-firmware 1.60
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/10/2010
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: PT20_B1.1.216_E1.1.351_P0
dmi.board.asset.tag: Not Applicable
dmi.board.name: PT20
dmi.board.vendor: Zareason Corporation
dmi.board.version: MP
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: Zareason Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrPT20_B1.1.216_E1.1.351_P0:bd03/10/2010:svnZareasonCorporation:pnPT20:pvrMP:rvnZareasonCorporation:rnPT20:rvrMP:cvnZareasonCorporation:ct1:cvrN/A:
dmi.product.name: PT20
dmi.product.version: MP
dmi.sys.vendor: Zareason Corporation

Revision history for this message
Dragoneyes (stiu) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the release candidate kernel versus the daily build. Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

tags: added: needs-upstream-testing
Revision history for this message
Dragoneyes (stiu) wrote :

The Linux 3.1 rc9 doesn't improve the situation.
uname -a:
Linux dragonfly 3.1.0-0301rc9-generic #201110050905 SMP Wed Oct 5 11:20:31 UTC 2011 i686 i686 i386 GNU/Linux

Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

Could you attach the dmesg and a powertop estimate from the last 'good' kernel?

Revision history for this message
Dragoneyes (stiu) wrote :

The daily build
-
uname -a:
Linux dragonfly 3.1.0-999-generic #201110181643 SMP Tue Oct 18 17:45:45 UTC 2011 i686 i686 i386 GNU/Linux
-
use more power of the rc9.
The rc9 power consumption is comparable to the 3.0 kernel (about 7W), the daily use 9W!
Powertop shows these devices using 100% of power, that the other releases of kernel didn't use:
 Uso Eventi/s Categoria Descrizione
            100,0% Device Dispositivo USB: Globetrotter HSDPA Modem (Option N.V.)
            100,0% Device Codec audio hwC0D0: Realtek
But my HSDPA modem isn't in use and turned off in network manager.

The first distribution I used on my netbook was Ubuntu 10.10 Notebook Edition, and it has 6 hours of battery life and 7 hours with wireless turned off.
I tried Ubuntu 10.10 by live with a usb drive, but I don't have the results I expected, so I'm going to install that release.

Revision history for this message
Dragoneyes (stiu) wrote :

**ERRATA CORRIGE**
Both daily build and rc9 of kernel 3.1 have the same issue. For them powertop shows a power usage of 9W.
The kernel 3.0 is about 7W.
The extra power top device draining power in the "Device Codec audio hwC0D0: Realtek", present in the daily build and rc9, but not present in 3.0.
The device "Device Dispositivo USB: Globetrotter HSDPA Modem (Option N.V.)" is present both in 3.0 and 3.1 (rc9 and daily).
As mentioned before, my HDSPA modem is not in use and turned of in network manager.

tags: removed: needs-upstream-testing
Revision history for this message
Dragoneyes (stiu) wrote :

I've attached the powertop overview and statistics about the kernel linux:
3.0.0-12
3.1.0-0301rc9-generic
3.1.0-999-generic

Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report at bugzilla.kernel.org? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

If you are comfortable with opening a bug upstream, It would be great if you can report back the upstream bug number in this bug report. That will allow us to link this bug to the upstream report.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Dragoneyes (stiu) wrote :

1) Disabling the HDSPA modem by bios, the situation is the same, and the device continues to drain power. The only way seems to tweak the device by powertop, enabling the autosuspend.

2) Now I'm on Ubuntu Maveric 10.10 with updated kernel
stiu@test:~$ uname -a
Linux test 2.6.35-30-generic #61-Ubuntu SMP Tue Oct 11 15:29:15 UTC 2011 i686 GNU/Linux
and the power consumption is 6,8 W, with a battery life of 5h30'.
I'm adding the powertop output and th dmesg as requested.

Summary:
2.6.35 - <7 W
2.6.38 - 8 W
3.0 - >7 W
3.1 - 9 W

The difference between 2.6.35 and 3.0 in battery life is about 1h.

Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :

From yesterday bugzilla.kernel.org is down, I will report the bug when the site returns up.

Revision history for this message
Dragoneyes (stiu) wrote :

Where can I report bugs since bugzilla.kernel.org is down?

Revision history for this message
Dragoneyes (stiu) wrote :

Disabling the HDSPA modem by Powertop, i.e. activating auto-suspending for the device (actually the only way), reduces the power consumption to 6.6W and increase the battery life up to 5h30'. Like in Maverick with 2.6.35 kernel. So I think that the management for that device in my case is the biggest problem in kernel 3.0 and higher.

Moreover, I see more other tunables stuff in Powertop. For example, enabling the energy management for the SATA connection, reduces even more the power consumption, to about 5.9W, and increasing battery life to about 5h50'.

Totally, I can do 17 tunings in Powertop! (in Linux 3.0)
I'm not an expert or a kernel programmer, but I think that the latest version of kernel have a great regression in the device energy management. Most of that device have a little power usage, but a few have a great power consumption, even if it is not necessary. At least in my case.

Revision history for this message
Dragoneyes (stiu) wrote :

bugzilla.kernel.org is still down.
I found that was published a patch to solve the linux aspm problem for linux 3.2. Link: http://www.phoronix.com/scan.php?page=article&item=linux_aspm_solution&num=2
I would like to know when and what upstream ubuntu kernel have this patch, so I can test if that patch can improve the state of my power regression bug.
Thanks

Revision history for this message
Dragoneyes (stiu) wrote :

The kernel 3.2 rc2 have the same issue of 3.0, i.e. the hdspa modem drains a lot of power. Disabling it from powetop, and activating also the powersave mode for /dev/sda from powertop, it falls to 6.5 watts, like the 2.6.35 kernel. For now I don't see the Device Codec audio hwC0D0: Realtek consuming power (like in 3.1 kernel), but this need more verifications to be sure.

Revision history for this message
Dragoneyes (stiu) wrote :

The patched Kernel (patch by Matthew Garrett for ASPM) https://wiki.ubuntu.com/Kernel/PowerManagementASPM has not improved the situation, that remains the same as the others 3.0 kernels. The HDSPA Modem is contiunues to use power despite it's turned off.

More investigation on the other problem: the "Device Codec audio hwC0D0: Realtek". This problem is present in all kernel from 3.0 and over, but the problem occurs only randomly. When the problem occurs, the device drains the 100% of power (about 1W) all the time with no reason.

Moreover, also mentioned before, activating the power management for the device "SATA /dev/sda" causes a saving in power of about 0.8W

Incredibly, activating powersave "Runtime PM for PCI Device Corporation WiFi 5100" increase the power consumption of about 0.5W. Same strange situation for "Runtime PM for PCI Device Intel Corporation N10/ICH 7 Family PCI Express Port 1" and "Runtime PM for PCI Device Intel Corporation N10/ICH 7 Family PCI Express Port 2" (not Port 3)

Revision history for this message
Dragoneyes (stiu) wrote :

In Linux Kernel 3.3 daily
- #uname -a → Linux dragonfly 3.3.0-999-generic-pae #201201290405 SMP Sun Jan 29 09:20:35 UTC 2012 i686 i686 i386 GNU/Linux -
all the power issues are confirmed.
Powertop shows a power usage of 7.7W, and "Dispositivo USB: Globetrotter HSDPA Modem (Option N.V.)" is used at 100% with 1.08W.

(In "tunables" I see a new voice "NMI watchdog should be turned off", but turning it off, makes no changes in power usage)

Revision history for this message
Dragoneyes (stiu) wrote :

Bug reported to bugzilla.kernel.org as requested:
https://bugzilla.kernel.org/show_bug.cgi?id=42690

Revision history for this message
Maarten Bezemer (veger) wrote :

Thanks for taking the time to report this bug in the upstream bug tracking system this is a tremendous help. Launchpad has the ability to watch lots of upstream bug trackers and this can be done by following the procedure documented at https://wiki.ubuntu.com/Bugs/Watches. I've added the bug watch for this bug report.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Incomplete
Dragoneyes (stiu)
summary: - Linux power regeression is not improved from Natty to Oneiric - Netbook
- Zareason Terra HD
+ Linux power regeression is not improved from Natty to Oneiric to Precise
+ - Netbook Zareason Terra HD
Revision history for this message
Dragoneyes (stiu) wrote : Re: Linux power regeression is not improved from Natty to Oneiric to Precise - Netbook Zareason Terra HD

Now I'm in a fresh new installation of Ubuntu 12.04.
The situation has WORSENED.
Now (with kernel 3.2.0-24-generic-pae #37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012 i686 i686 i386 GNU/Linux) powertop shows a power usage of 7.50W. Up to this point, the situation is more or less the same with Oneiric (3.0 kernel).
The problem is that now with Precise, enebling power save state for the usual "Dispositivo USB: Globetrotter HSDPA Modem", that drains 1.30W (like Oneiric), DOESN'T HAVE ANY EFFECT!
So, enabling the power save option from powertop, it changes to "Negative" to "Positive" in the tuneables tab, the Globetrotter modem disappear from the overview tab (i.e. no power consumption from this device are detected any more), but the total system power usage remain the same, at 7.30W.
So I have no more the ability to deactivate this device in any way, and the result is a DECREASE OF 1 HOUR of battery life.
Moreover, enabling power save for all the devices suggested by powertop, the situation remains the same.

---

There are also a few strange things in powertop overview:
if you compare powertop of Oneiric with Precise, you'll see significantly increase of power consumption of:
1. "/usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none" from 21.3 mW to 176 mW.
2. "compiz" from 12.3 mW to 141 mW.
3. "conky" from 7.77 mW to 141 mW (the code is always the same).
4. [46] i915 from 553 µW to 158 mW.
5. hrtimer_wakeup from 587 µW to 80.6 mW.

---
SUMMARY:
2.6.35 - 6.5 W (Maveric)
2.6.38 - 8 W
3.0 - 7.2 W (Oneiric, but tunable to 6.6 W)
3.1 - 9 W
3.2 - 7.3 W (Precise, NOT tunable = REGRESSION)

Please someone take care of this issues, is very frustrating to have a netbook with 6 cells battery, with only 4h30' of autonomy. With a declared autonomy of about 7 hours ad 6 hours with a power efficient kernel/distribution.

Thanks,
ask me for any information/test needed.

[I'm going to attach powertop overview, devices statistics, tuneables and devices statistics with powersave activate for globetrotter modem, for "Precise Pangoline"]

Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Dragoneyes (stiu) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

I'd like to chime in here with a few observations.

1) When gathering data from powertop one needs to ensure the sample time is long enough and also one takes a bunch of samples to ensure you are getting valid data.
2) The power consumption measurements from some batteries is tricky to estimate using tools like powertop because the battery sometimes re-calibrates the battery capacity measurements and this gives false estimations in userspace tools.
3) Twiddling all the powertop settings to GOOD settings may in fact on some hardware not actually do anything helpful, and in some cases may cause worse effects. I've measured this using a high precision multimeter and I can back this assertion with hard data.

I've got a bunch of tools in my ppa which may be useful - ppa:colin-king/powermanagement

do:

sudo add-apt-repository ppa:colin-king/powermanagement
sudo apt-get update
sudo apt-get install powerstat

and then run powerstat to see what kind of power consumption you get over a long period of time:

sudo powerstat

Powerstat will calculate average, min/max and standard deviation (the latter is useful to see how accurate+reliable your battery measurements are).

Also, I recommend taking measurements when you battery is fully charged and using this as a starting point for all your testing to ensure you are starting from a known baseline.

Revision history for this message
Dragoneyes (stiu) wrote :

My powertop test were all at battery fully charged, in the same conditions (display backlight, wifi turned on, ecc.), with a record time of a few minutes (about 3-4). I hope these were enough accurate tests. If not, tell me what other test is needed.

---

I used powerstat as you have suggested, this is the summary:
     9.05 Watts on Average with Standard Deviation 0.63

I'm also attaching the complete results.

Revision history for this message
Dragoneyes (stiu) wrote :

I'm investigating the issue.
Changing the /sys/bus/usb/devices/usb4/4-1/power/control from "on" to "auto", have the right effect to auto-suspend the HDSPA modem. This will save about 500 mW. More investigations revealed that in Ubuntu 12.04, this device has the maximum power usage setted to 500mW (found with the command "lsusb -v", at the line "MaxPower"). So suspending this device has less effect on power consumption compared to previous version of Ubuntu (~ 1W).
This mean that there is something else that had raised its power usage.

However, the changes at the file /sys/bus/usb/devices/usb4/4-1/power/control will reset at the next reboot of the netbook.
1) So, how can I make that changes be permanent?
2) If these are not permanent, this means that some other process at the boot will automatically check the devices and will sets the power properties to them. Can someone tell me which process do this control (because is obviously bugged)?

If someone can help me with these questions, I can continue to investigate this issue.

Thanks.

Revision history for this message
Dragoneyes (stiu) wrote :

Device Descriptor

Revision history for this message
Dragoneyes (stiu) wrote :

Now I'm on a fresh new installation of Ubuntu 12.10.
I have some bad and good news.

Bad:
the problem is not solved.
The HSDPA Modem continues to drain a lot of power even with the 3g connection disabled.
I can tune it by powertop enabling power save mode for this device.
By default (in the same conditions of previous test), the Modem use about 450 mW, and overall power is about 7.35 W.
Since here, nothing was changed so much from the previous release.

Good:
Powertop reveals a base power system of only 4.35 W, against about 6 W of the previous release of Ubuntu.
Tuning the HSDPA modem, overall power drops to 7.1 W (250 mW saved, I don't know why, because 7.35 - 0.450 = 6.95 ).

Moreover, I have new tuneables things in powertop:
- PM runtime for device PCI Intel Corporation NM10/ICH7 Family USB2 EHCI Controller: a little save of about 20 mW - 50mW
- PM runtime for device PCI Intel Corporation NM10/ICH7 Family USB UHCI Controller #4: a little save of about 10 mW - 20 mW

Revision history for this message
Dragoneyes (stiu) wrote :

SUMMARY:
kernel 2.6.35 → 6.5 W (Maveric)
kernel 2.6.38 → 8 W
kernel 3.0 → 7.2 W (Oneiric, but tunable to 6.6 W)
kernel 3.1 → 9 W
kernel 3.2 → 7.3 W (Precise, NOT tunable = REGRESSION)
kernel 3.5 → 7.3 W (Qunatal, but tunable to 6.7 W)

summary: - Linux power regeression is not improved from Natty to Oneiric to Precise
- - Netbook Zareason Terra HD
+ Linux power regression is not improved from Natty to Oneiric to Precise
+ to Quantal - Netbook Zareason Terra HD
Revision history for this message
Dragoneyes (stiu) wrote :

Powerstat results by default:
9.03 Watts on Average with Standard Deviation 0.06

Powerstat results with powertop tweaks:
6.67 Watts on Average with Standard Deviation 0.23

(Tests in the same conditions and fully charged battery)

Changed in linux:
status: Incomplete → In Progress
Revision history for this message
Dragoneyes (stiu) wrote :

According to the Linux kernel bug tracker related to this bug:
http://bugzilla.kernel.org/show_bug.cgi?id=42690
this is not a bug of kernel, but it is a bug of the Ubuntu mainline kernel.

In brief, I tried a Debian precompiled kernel, and it didn't shows this kind of bug (but produce a different power issue, see the previous link to the whole description).
So it seems to be a bug related to the patches applied from the Canonical Kernel Team on the vanilla kernel (and the bug on kernel.org is now closed).

If you need other informations or tests please tell me.

Best regards and thanks.

Changed in linux:
status: In Progress → Fix Released
Revision history for this message
Dragoneyes (stiu) wrote :

This bug is not fixed because this is not a vanilla kernel bug, but it is an distro specific related bug (see http://bugs.launchpad.net/ubuntu/+source/linux/+bug/875801/comments/38)

Revision history for this message
penalvch (penalvch) wrote :

Dragoneyes, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available (not the daily folder) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.12.1

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.