Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

+5W power consumption when playing audio on X201 with Linux

Linux on ThinkPads
Post Reply
Message
Author
Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

+5W power consumption when playing audio on X201 with Linux

#1 Post by Mike42 » Mon Sep 12, 2011 4:54 am

Hi folks!

My Thinkpad X201’s power consumption raises from ~12W to ~17W when playing any kind of audio. It seems that the additional power consumption is not caused by interrupts or CPU usage of alsa or pulseaudio. The problem does not occur on Windows XP where the consumption only increases slightly by about half a watt.

I’m using Fedora 15 x86_64 with kernel v2.6.40 (a renamed v3.0 kernel for compatibility reasons) but I’ve also tried a live cd (run from SD-Card) of Bodhi (a minimal Ubuntu derivative which seems to omit PulseAudio) where the problem occurs too.

Since this problem is very annoying I’m highly interested in a solution — any ideas?

Thanks in advance
Michael

€dit: Just wondering if this thread would better fit in the “Thinkpad - General HARDWARE/SOFTWARE questions” subforum. Could an admin please move it if I’m correct?
Last edited by Mike42 on Sun Sep 25, 2011 8:49 am, edited 1 time in total.

Volker
Junior Member
Junior Member
Posts: 482
Joined: Fri Oct 01, 2004 10:21 am
Location: Dublin, Ireland
Contact:

Re: +5W power consumption when playing audio on X201 with Linux

#2 Post by Volker » Sat Sep 17, 2011 11:37 am

Let me start with the obvious... is the Audio power management enabled? E.g. run powertop -> Tunables -> Enable Audio codec power management.

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#3 Post by Mike42 » Sat Sep 24, 2011 1:25 pm

Volker wrote:Let me start with the obvious... is the Audio power management enabled? E.g. run powertop -> Tunables -> Enable Audio codec power management.
Yes.

Code: Select all

[root@hal ~]# cat /sys/module/snd_hda_intel/parameters/power_save
1
[root@hal ~]# cat /sys/module/snd_hda_intel/parameters/power_save_controller 
Y

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#4 Post by Mike42 » Thu Oct 27, 2011 6:18 am

*push* the Problem still exists and is as anoying as ever.

rzr
Posts: 12
Joined: Fri Oct 14, 2011 2:11 am
Location: rennes, france

Re: +5W power consumption when playing audio on lenov with Linux

#5 Post by rzr » Mon Oct 31, 2011 2:26 pm

This is also affecting lenovo g470 , even on idle I donno if this is related to pulseaudio or alsa

Note, I reported this bug on various boards :

http://rzr.online.fr/q/lenovo
http://rzr.online.fr/q/lenovo# Lenovo G470 | Model Name : 20078 | M fg Date: 11/03/23 | BIOS: 40CN23WW(V2.09) 06/20/2011 | OS:GNU/Linux/Debian
http://forum.thinkpads.com/viewtopic.php?f=41&t=100355# Please help to fix : Fan, Acpi, Dsdt, Aspm ...

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#6 Post by Mike42 » Tue Jan 24, 2012 4:05 pm

I just tried Ubuntu 12.04 beta with XFCE. The problem still remains. With everything turned off I can get power consumption as low as 7.5W but as soon as I play any music it raises to 13.2W.
It seems to be somehow CPU/RAM-related. If I stress the CPU with mprime’s Blend-test the power consumption goes up to 42W (what a coincidence ;) ) and barely rises by maybe 0.5W (hard to measure because mprime’s load is not really constant) as soon as I play music. Those 0.5W could be inevitable caused by DACs, amplifiers etc. and would be quite okay.

Can anyone confirm this problem? I don’t want to open a bug report in bugzilla.kernel.org without some backing.

Edit: Just did some more testing with 4 instances of md5sum /dev/zero. As you can see in this picture the power consumption raises from 34W to 35W after I start gmpc+mpd at ~30 seconds: http://www.abload.de/image.php?img=cpu36fc7.png
I used

Code: Select all

while true; do bc -l <<< "$(cat /sys/class/power_supply/BAT0/current_now)/10^6*$(cat /sys/class/power_supply/BAT0/voltage_now)/10^6" | tee -a powerlog.txt; sleep 1; done
to record the power consumption. Used kernel is Linux hal 3.2.1-3.fc16.x86_64 #1 SMP Mon Jan 23 15:36:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux.

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: +5W power consumption when playing audio on X201 with Linux

#7 Post by ThinkRob » Wed Feb 22, 2012 11:13 am

Wait, so it's actually just +1W due to audio?

Well... yeah, that seems pretty reasonable actually.

My bet is that the audio player(s) that you're using are keeping the CPU out of the deeper C-states. Have you tried checking with powertop to see if that's the case? I know you said that they're not generating too many interrupts, but perhaps they're still keeping the CPU out of C6 et al. Recent Intel chips are *very* efficient in their deepest sleep states, but the challenge is often to get them to stay there...
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#8 Post by Mike42 » Thu Mar 01, 2012 3:37 am

ThinkRob wrote:Wait, so it's actually just +1W due to audio?

Well... yeah, that seems pretty reasonable actually.

My bet is that the audio player(s) that you're using are keeping the CPU out of the deeper C-states. Have you tried checking with powertop to see if that's the case? I know you said that they're not generating too many interrupts, but perhaps they're still keeping the CPU out of C6 et al. Recent Intel chips are *very* efficient in their deepest sleep states, but the challenge is often to get them to stay there...
Very good point!
Take a look:
Without music everything’s fine:
http://www.abload.de/image.php?img=2012 ... 84txlg.png
With music the C3 and C6 values are dropping and in “package” they are dropping to a steady 0.
http://www.abload.de/image.php?img=2012 ... 8dbaf6.png

Especially the “package” values are outstanding. I don’t know what they mean with “package” exactly, but something’s apparently preventing it from sleeping.

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: +5W power consumption when playing audio on X201 with Linux

#9 Post by ThinkRob » Thu Mar 01, 2012 11:22 am

Mike42 wrote: Especially the “package” values are outstanding. I don’t know what they mean with “package” exactly, but something’s apparently preventing it from sleeping.
I believe that "package" refers to the CPU package, i.e. the complete CPU (as opposed to the individual cores.) This would be useful since threads can (and will) shift around from core-to-core. [1]

I don't know what player, codec, bitrate, etc. was used for your test, but what you posted doesn't really seem abnormal. Using the CPU will indeed keep it awake more. :D

Music playback is actually one of those things that people tend to forget about, but which can be rather bad for power savings. It requires constant CPU activity, and depending on your OS's process scheduler, thread/core scheduling, frequency scaling algorithms, etc. can make for some interesting edge cases.

[1] When discussing modern Intel CPUs in detail, we're *rapidly* veering out of my realm of expertise. Most of the processors that I grok at a low level are old enough that "superscalar" was a hot new term when they were new...
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#10 Post by Mike42 » Thu Mar 01, 2012 5:11 pm

ThinkRob wrote: I believe that "package" refers to the CPU package, i.e. the complete CPU (as opposed to the individual cores.) This would be useful since threads can (and will) shift around from core-to-core. [1]
Well, that would include PCI Express, DMI and Memory Controller too, since those have been integrated into the Nehalem (Core i) Microarchitecture.
I don't know what player, codec, bitrate, etc. was used for your test,
I’ve tried several different players, codecs and pluseaudio or plain alsa.
but what you posted doesn't really seem abnormal. Using the CPU will indeed keep it awake more. :D
Yes of course, but apparently the cores themself are not the problem (since their Sleep-States only worsen slightly).
Music playback is actually one of those things that people tend to forget about, but which can be rather bad for power savings. It requires constant CPU activity, and depending on your OS's process scheduler, thread/core scheduling, frequency scaling algorithms, etc. can make for some interesting edge cases.
But but but in WindowsXP it only causes a small increase in power consumption! So there has to be some driver issue somewhere.

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: +5W power consumption when playing audio on X201 with Linux

#11 Post by Mike42 » Sun Oct 14, 2012 10:39 am

Someone confirmed my Bugreport :thumbs-UP:
Now we only need a Fix :D

spuhpointer
Posts: 1
Joined: Mon Feb 03, 2014 8:16 am
Location: Riga, Latvia

Re: +5W power consumption when playing audio on X201 with Li

#12 Post by spuhpointer » Mon Feb 03, 2014 8:21 am

Hi Folks,

Any news about this? Mike42 did you manage to fix this?
Seems kernel developers blames some Alsa shared libraries.
I am getting the same issue +5 watt on Linux mint 16, 64bit, kernel 3.11 when playing musing on my lenovo x201.
This really makes the battery to drain two times faster!

Thanks

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 43 guests