Intel Powertop is great (with a twist)
Posted on September 28th, 2007 at 22:09 in Linux
I’ve been playing around with my Gutsy install on the laptop. Since it uses a tickless kernel (2.6.22), I decided to give powertop a chance and see what’s ticking away my computer. To do a somewhat informed analysis, I tried a couple of scenarios, all with wireless transmitting and without to see how that affects things. Here is what I’ve found so far, in a couple of powertop pastes:
Scenario 1. Default boot with no wireless data:
Wakeups-from-idle per second : 117.8 interval: 15.0s Power usage (ACPI estimate): 18.7W (2.5 hours) Top causes for wakeups: 52.5% ( 60.2) uhci_hcd:usb1, yenta, fglrx 19.1% ( 21.9) uhci_hcd:usb2, ipw3945, HDA Intel
Note: My how usb misbehaves even with nothing plugged in. And what is yenta doing there, since I have no card in the pcmcia slot ? Also, somebody give fglrx a valium.
Scenario 2. Default boot - wireless full steam
Wakeups-from-idle per second : 482.7 interval: 15.0s Power usage (ACPI estimate): 20.1W (2.3 hours) Top causes for wakeups: 87.4% (881.6) uhci_hcd:usb2, ipw3945, HDA Intel 6.0% ( 60.2) uhci_hcd:usb1, yenta, fglrx
As expected, full steam wireless transfers brings up the wakeup count.
Powertop optimizations: powertop provides a series of suggestions that supposedly save power. Here is what powertop suggested and I willingly complied to:
- Wireless powersaving
- Usb autosuspend
- Vm dirty writeback from 5 to 15 seconds
- laptopmode 5
- Remount the filesystem with noatime
And next is what I found.
Scenario 3. Powertop optimizations and no wireless
Wakeups-from-idle per second : 111.2 interval: 15.0s Power usage (ACPI estimate): 17.4W (2.6 hours) Top causes for wakeups: 48.8% ( 60.2) : uhci_hcd:usb1, yenta, fglrx 33.0% ( 40.7) : uhci_hcd:usb2, ipw3945, HDA Intel
After all the optimizations, only a few less wakeups per second. That weird, because usb and yenta are still up there, along with wireless (ipw3945) and sound (HDA Intel) for some odd reason. fglrx is on steroids.
Scenario 4. Powertop optimizations and wireless
Wakeups-from-idle per second : 367.0 interval: 15.0s Power usage (ACPI estimate): 19.1W (2.4 hours) Top causes for wakeups: 83.3% (599.7) : uhci_hcd:usb2, ipw3945, HDA Intel 8.4% ( 60.2) : uhci_hcd:usb1, yenta, fglrx
Now here is something interesting. Probably wireless powersaving, but it saves around 115 wakeups per second. This is nice.
Afterwards I started removing stuff that just seams to take up space.
rmmod uhci_hcd pcmcia yenta_socket
This is because I don’t have pcmcia cards or usb stuff connected to the laptop.
Scenario 5. Powertop optimizations, Modules removed, no wireless
Wakeups-from-idle per second : 96.5 interval: 15.0s Power usage (ACPI estimate): 17.1W (2.6 hours) Top causes for wakeups: 63.1% ( 60.3) : fglrx 14.9% ( 14.3) : ipw3945, HDA Intel
Now we are getting somewhere. About 20 wakepus less. That seems to be misbehaving modules (pcmcia, usb). fglrx is still jumpy (how sad).
Scenario 6. Powertop optimizations, Modules removed, Wireless
Wakeups-from-idle per second : 259.7 interval: 15.0s Power usage (ACPI estimate): 18.2W (2.4 hours) Top causes for wakeups: 73.4% (324.5) : ipw3945, HDA Intel 13.6% ( 60.2) : fglrx
Now that is a boost. About 100 less wakeups per second. Strange, but nice. What does usb/pcmcia have to do with wireless transfers ?
So I took it another notch and removed the two Intel modules - ipw3945 and HDA Intel (sound).
rmmod snd_hda_intel ipw3945
Scenario 7. Powertop opts, more modules removed, wireless removed
Wakeups-from-idle per second : 69.6 interval: 15.0s Power usage (ACPI estimate): 17.6W (1.8 hours) Top causes for wakeups: 84.2% ( 60.2) : fglrx
Nice, but maybe just for offline usage. Comparing this with the other results, well, it seems that even on idle wireless takes up space. Down fglrx, down boy!
Now here is the final twist : Stopped X and remove that nasty fglrx
Scenario 8. Powertop opts, modules removed, wireless removed, fglrx removed
Wakeups-from-idle per second : 4.8 interval: 15.0s Power usage (ACPI estimate): 19.3W (1.6 hours) Top causes for wakeups: 23.3% ( 1.3) kernel core: queue_delayed_work_on 22.1% ( 1.3) acpi
A comfortable 4.8 wakeups per second. I just wish my laptop was like this while on idle (with all my apps running) …
Scenario 9. Powertop opts, clean boot, wireless stopped, running the vesa driver instead of fglrx:
Wakeups-from-idle per second : 6.1 interval: 15.0s Power usage (ACPI estimate): 15.3W (3.0 hours)
That’s really nice. On a clean boot, with vesa, wakepus go down. Nor USB nor pcmcia stick out like a sore thumb. It seems almost magical. Those 6 wakeups are with X server running. But this made me wonder. Did I foul up with fglrx ? I redid the test, in the same conditions as the previous (#9), but with fglrx.
Scenario 10. Powertop opts, clean boot, wireless stopped, fglrx:
Wakeups-from-idle per second : 69.8 interval: 15.0s Power usage (ACPI estimate): 16.8W (2.7 hours)
That’s more than a 1W of power draining towards fglrx. I noticed that powertop seems to bundle things. Maybe the yenta stuff is fine, and fglrx reports it with along with flgrx, since it probably can notice the difference from the bunch who is causing the wakeps, just like ipw3945 and the snd_hda modules.
Final thoughts
- Intel, what a twist! Powertop is really useful,. But in a twist of fate, the modules that take up more wakeups, and keep my intel cpu from going into C3 state are Intel modules. This
couldshould be fixed. This might be a buggy wireless driver. Also there can be lack of means for powertop to tell the difference between ipw3945 from snd_hda_intel wakepus, since using just the snd_hda_intel module (with no wireless), the wakeups stop. - I noticed that using the touchpad or the keyboard yield about 500-800 wakepus per second. Is this really necessary ?! Or is there a fix for this. I seen a fix for the macbook on www.linuxpowertop.org, maybe my thouchpad needs something of the kind… Here is a sample:
47.4% (494.2) PS/2 keyboard/mouse/touchpad
- The ATI Video Driver (fglrx) is high on caffeine. It does a constant 60 wakeups per second. It’s not on behalf of any X app, because I killed most of them while testing it (by advice of powertop’s online tips). There is probably a bug in there somewhere that makes this very annoying and jumpy. But I haven’t complained, since this might have a _solution_ in the near future… Going with Vesa saves me over a 1 Watt of power.
This is just using stock ubuntu packages. I’m still to follow some of powertop’s tips, that are online. Really nice when running powertop+vesa driver, this really gives me more battery time. I started out with 18.7 and ended up with 16.8, almost 2 watts of power, which is something to notice.
UPDATE:
Updating the fglrx binary driver to the lastest version 8.41 fixes the jumpiness and dramatically cuts down the wakeups per second. Don’t believe me ? Here’s the result with all the powertop suggestions activated:
Wakeups-from-idle per second : 7.5 interval: 30.0s
Pretty damn sweet! Bring on the Gutsy Gibbon.

So, with all this tips two questions remain:
I mean, without wifi and sound, I think it will be not good to me. I use the web as reference (google is your friend) and listen to a lot of music while coding. It helps my concentration.
Removing all the modules was just a test case, to isolate the *evil* modules. But, if you check the UPDATE, that is just changing fglrx into vesa, and running powertop (with wireless disconnected but not removed). Bringing wireless up will bring about 30 wakeups more, so if you are mostly idle and powersaving, than there is a real advantage as far as i can see it. From 150-300 wakeups, to 40 (with wireless) seems like a big deal to me.
nice study… lenghty and complete!
but does it relate to your previous post
?
Well, i guess it does in a way. This is what I do on my free time. So I am getting things done even on my hobbies. Who said GTD was just for work
?
WoW, interesting study, not only because you have performed it (the patience, the patience…) but also because you shared it with us (the patience doubled!). Great study, and interesting to know that WiFi ON/OFF button is really useful when you don’t need WiFi.
Rafael, there are times when you do not need the wireless, for instance, when you are on the train, when you have a ethernet connection lying around or when you don’t have any WiFi coverage.
About the fglrx thing: I had that same issue. I added
Option “NoDRI”
to the “Device” section. Took it right out.
So maybe you can go fglrx driver. I think DRI is needed for 3D acceleration, though (Which I don’t use
)