• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Ubuntu 12.04LTS battery life

pelov

Diamond Member
I wiped win7 on my X220 and installed Ubuntu 12.04. I've been unimpressed with the battery life, though. My usage pattern is very loose and really not dependent on which OS I use but after years of using Ubuntu and Win7 on my desktop I'd like to give running Linux as my sole OS a try. Here's the kicker, though... I'd actually like some comparable battery life 🙁

There's a few issues I bumped into right away.
The sound wasn't working on Chromium but worked quite well for Firefox. I've fixed that.
The Wifi reception is quite poor. I'm sitting just a few feet from the router and I'm getting 3/4 bars while under win7 I was getting max with no fluctuation. This isn't that big of a problem as I'm going to buy this Intel Centrino card to replace the 1x1 Realtek garbage. I'm guessing this has to do with the poor kernel support for Realtek's WiFi. Alternatively, I can download the Realtek Linux drivers but apparently their drivers are quite characteristically crap:

The Realtek Linux driver for this chip can be downloaded from the Realtek website
More information about using the Realtek native driver in Ubuntu: [1]
Please note: use of this driver on Lenovo systems results in unpredictable fatal crashes on some systems! It's is *not* advised to choose this driver.
One method that appears to drastically reduce the crashes and connection drops is to comment out "-DENABLE_LPS" from the Makefiles while building the Realtek Linux driver. This also reduces the "noise" in the syslog kernel messages generated by LPS. However, it may reduce the battery life since LPS is an acronym for Low Power State.

After receiving the Intel Centrino card I likely won't have any of these issues *crosses fingers* Either way I really need the card as the 2.4ghz signals are very crowded thus moving up to 5ghz should improve things significantly.

Now that I've documented some issues that I've cleared up or will in the near future, we get to the biggest one: battery life. Here's what I've done to improve this thus far

- Installed powertop. Toggling through the recommended settings where all but the WiFi changed to "good", the laptop is sipping a modest 8-10W with a browser open and interrupts in the manageable hundreds. Unfortunately, the interrupts scale quite quickly upwards with any sort of usage of the browser and the wattage too jumps up to ~+20W when loading some lengthy web pages.

- I figured that I should rule out any sort of CPU jumps and installed Jupiter. I enabled the power saving feature and this did decrease power consumption at idle to around 7-9W with the browser open. Decent gain, but unfortunately the power consumption still fluctuates just a bit too drastically, leaping over 20W when tasked with anything.

Now, I really don't think this has to do with the CPU speeds or fan speeds. Fan speeds are modest at 2k RPM and temps are low. Powertop reports idle clocks for an overwhelming majority of the time with only very short sporadic spurts into max speeds. It doesn't seem to be the CPU.

The brightness is set at 40% which is more than enough on the 300nits IPS panel.

I'm getting a wide variety of readings on the battery life due to the high jumps so it's difficult to determine just how much I'd get if I were to use it normally but I'm certain it's considerably less than the 12 hours I got on win7 (9-cell battery). Lenovo has some special home-brewed software that extends win7 battery life considerably but they don't offer the same software for Linux.

So what do? Do you think it might be the WiFi that's causing some of this? That is, maybe whenever it's tasked heavily it gobbles up power? I'm hoping that's the case but I'm sort of stuck here with regards to the next step(s) I should take.

I've read guides and they seem to be roughly in the same area as far as idle power consumption as I am but it doesn't appear to be the idle power consumption that's the issue.

Any help will be greatly appreciated 🙂
 
You could try Xfce. Unity's had some issues with performance, and power use. I haven't paid close attention to what's going on, as I don't use it. It would be easy to try in any case.
 
You could try Xfce. Unity's had some issues with performance, and power use. I haven't paid close attention to what's going on, as I don't use it. It would be easy to try in any case.

It's quite the sipper, actually. 7W at idle and with Jupiter and some tweaking found here I've managed to get it down under 7W idle. If I can tinker with some of the compiz settings, slap on a new theme and wallpaper and a bit more tweaking I have feeling I'll be able to get it down into the mid 6W range. I've also been able to pin down what it and my hunch was right. It is indeed the Realtek Wifi card. Downloading software updates atm an it's consuming over 6.6W of power by itself :/

I'm going to give their proprietary drivers a go and see what that does. If I have to revert to the kernel drivers then I'll do that but at this moment I think I'd rather just give them a shot. If it doesn't work then I might delay my Linux transition until I get my Intel Centrino card.

A bit more info for inquiring minds:

- the touchpad/keyboard consumes about half a watt when in use. It seems to toggle off quite quickly so that's not too bad but still a bit too high. I'm hoping an update in the Synaptics driver will address this

- the fan consumes a bit more power in Linux too. It appears that it's dynamic and I don't know of a software where I can set the fan speed to kick in after the chip hits a certain temperature threshold. A moderate load will increase the fan speed by a moderate amount which seems a bit unnecessary if you ask me. At 3k RPM it's consuming just over a watt of power

- compiz has very few interrupts and takes up minimal wattage. Unity is actually pretty damn efficient in 2D

- Boot time with Jupiter is quite slow. It appears to hang for a few seconds after you log in to user. I'm guessing this has to do with the cycling of options it does at startup

** I've been able to get the power consumption at idle down to 6.5W with only 60 wakes a second.
 
Last edited:
Linux sucks when it come to battery life IMO. 🙁

I'm persistent... or ignorant? Either way I'm going to go the Linux route on the laptop.

At idle I've managed to get it to 13 hours reading text with a browser open at 40% brightness. That's not half bad 😛 It seems the idle power consumption is roughly on par with Windows 7. It decreases when watching videos or under other duress quicker than in Windows. I'm hoping that the watt numbers plummet or at least I get better reception when I receive my Intel Centrino 6205 card. 6 watts while loading a web page for WiFi is just too damn high

For those with Realtek 8188/8192 cards, spare yourselves the trouble and pick up an Intel WiFi card. It appears that for some configurations the Realtek cards work fine while for other systems the card drops and has horrendous speeds.
 
I just spent the last few hours tweaking my system to within an inch of it's life.

I get around 10 watts idle. With Firefox open with just Anandtech open it uses thirteen watts or so. I know that my laptop doesn't sip power so I don't think it's that bad.

EDIT: My usb mouse (1 watt) uses less electricity than my touchpad? (3 watts). 😵
 
What's your fan speed like? It seems like my fan chews up more power than anything else in my system, continually sitting at ~2k RPM and pulling 1-1.5 watts. It consumes more power than the LED backlight :/

Listening to Pandora with AT up I was pulling ~9-12watts. I'd love to get it to sit under 10W but I don't think it's feasible. I've turned off the ExpressCard, USB, WOL, and a whole host of other BIOS settings but it hasn't really budged much since. Unity 2D does seem to pull ~40-200 fewer watts than 3D with Compiz.
 
Listening to Pandora with AT up I was pulling ~9-12watts. I'd love to get it to sit under 10W but I don't think it's feasible. I've turned off the ExpressCard, USB, WOL, and a whole host of other BIOS settings but it hasn't really budged much since. Unity 2D does seem to pull ~40-200 fewer watts than 3D with Compiz.

After tinkering with it most of the morning and cycling through forums, the terminal and various opinions, I've concluded that it appears that it's mostly inefficient drivers to blame for the higher power consumption. Regardless of what I manage to turn off, the power consumption is just a bit too high. Chromium with flash takes up 1W with flash -- uninstalling flash isn't going to happen. The Realtek 8192CE drivers also pull far too much power. By itself it takes up roughly 6W when not under heavy use, climbing over 7-8W when loaded.

More bad news is that Jupiter in its current state isn't very good. I'd advise people to not bother. The configuration options are limited. It only offers easier toggling through CPU power states; high perf, on demand and energy saver. The ondemand state essentially consumes just as much as the low energy state. The rest of the program offers little in terms of savings, only adding significantly to the startup time.

The good news!

- Unity 2D is actually awesome. It sips power. 2D panel and 2D shell together consume a total of 10mWs. That's downright awesome. For those looking to maximize power consumption I'd highly recommend Unity 2D. Unfortunately it's also lacking in any sort of configuration options. Nothing is really customizable so what you see is what you get. The "radiance" theme is the only available option and it appears to have slight graphical errors at the top bar that can be seen in the unclear text. You also can not change the size of the launcher so the icon sizes and color is there to stay. For some that makes Unity 2D a nonstarter :/ All in all, very impressed with the very frugal power consumption but it really needs at least some interface options available.

- Canonical's integration of laptop-mode-tools is very good out of the box. Everything worked quite well and very close to optimally with very little tinkering. The recommendations on Ubuntu's power management page does very little to add to efficiency. The recommendations from lesswatts are mostly already integrated as well.

- Most of the PowerTop recommendations also appear to be toggled to good by default. The remaining options don't make too much a difference and are mostly related to PCIE which can be flipped off in BIOS so you don't need to bother with startup scripts (PowerTop still doesn't save settings automatically) But...

For those looking to hop over to Linux on a laptop and are expecting the same battery life as on Win7, I'm sorry to tell you it just doesn't seem feasible just yet and rather unexpectedly it has to do with the inefficiency of the kernel's drivers. You can definitely get close, I'm getting about 10 hours of battery life on the X220 with a 9-cell, but that's still an hour or two short of what I was getting with a stripped down version of Win7 with Lenovo's Thinkpad battery software. If you do any sort of CPU-intensive tasks then I'd expect that 1-2 hour figure to decrease even further.
 
Last edited:
I don't mind Unity, but Unity 2D's feature disparity and sluggish workspace switching turned me off. I now gnome gnome-fallback, which is a GNOME 3 shell that looks and behaves almost exactly like GNOME 2 did. It's as efficient as Unity 2D without some of the sluggish performance.

As for laptop power usage, you may want to take a look at this link:
http://askubuntu.com/questions/1723...-still-relevant-for-12-04-and-the-3-x-kernels

I've read it. I've read too many! Like I said, most of the features in laptop-mode-tools are enabled by default thus the extras aren't necessary. The only ones that you could try tinkering with that might be worth the effort would be related to disk usage.

Gnome 3 shell takes up wayyyy more power than Unity 2D. It's right up there with Unity 3D. Though neither are necessarily bad, neither can get down to 10mW. I agree with you that having to bear through the lack of options in 2D makes it essentially a nonstarter for most people. I really think Ubuntu has a great interface with Unity 2D for the mobile crowd and some tweaking it would have been even better. Unfortunately it's not garnered any support and they're getting rid of it in 12.10 altogether. Unless some serious improvements have been made with respect to power consumption, I'll be sticking to 2D and 12.04. Personally, I really don't mind the launcher despite it taking up a good bit of screen real estate.

I'm not sure I'm going to stick with 12.04, though. For my usage pattern the battery life just isn't where I'd like it to be, particularly under load, whether lengthy or short. I've ordered the Intel Centrino card and I'm hoping that might decrease my WiFi's power consumption by a good amount. If it does then I can just use another desktop interface and get roughly the same battery life as I was getting in Win7. If it consumes the same 6-10W like the Realtek card does then I'll likely just be using Win7 until we see some better Linux hardware support.
 
Gnome 3 shell takes up wayyyy more power than Unity 2D. It's right up there with Unity 3D. Though neither are necessarily bad, neither can get down to 10mW. I agree with you that having to bear through the lack of options in 2D makes it essentially a nonstarter for most people. I really think Ubuntu has a great interface with Unity 2D for the mobile crowd and some tweaking it would have been even better.

Not GNOME 3 shell, GNOME 3 fallback.

GNOME 3 fallback is essentially GNOME's answer to computers that are incapable of running the full-blown GNOME 3 shell. If you run GNOME 3 fallback without effects, the energy usage should be similar to Unity 2D, without some of Unity's annoyances. As a bonus, the light Radiance theme works properly.

GNOME 3 fallback is listed in Ubuntu's repositories as gnome-session-fallback.
 
Small update:

Gnome fallback isn't quite as efficieny as Unity 2D but it is certainly more configurable. The difference seems to be ~50mW using the same theme/color scheme with no widgets.

Battery life versus win7 appears be a roughly 10% decrease. Linux really has come a long way with respect to battery life
 
Yep. It ranges from 8W to 80W while Unity 2D has a 5W to 60W range. It's close and considering that Gnome fallback has more options I may opt to go with it.
 
It's interesting that the energy usage is that different, since both Unity 2D and GNOME fallback run on top of GNOME 3. Perhaps GNOME fallback has additional background programs generating interrupts, or the power management configuration is different in a way that favors Unity 2D?
 
More updates and useful info

- Stumbled upon this

http://solutionlocker.wordpress.com...-ubuntu-12-04-on-thinkpad-x121e-i3-fan-noise/

After applying the wisdom above, I've managed to turn the fan off completely until it reaches higher temperatures. Considering most of my activities don't rely on any sort of significant lengthy load on the CPU, I've managed to squeeze out an extra 45mins from my laptop. I'm getting roughly 10 hours of battery life which is essentially equivalent to the times I was getting with win7. I am still using Unity 2D though because I lubz me some HUD.
 
update:

I just received and installed the Intel Centrino 6205 2x2 card and the idle wattage with WiFi on reads 6.5W at idle. The battery life is ~14 hours. My battery life has been bumped up by an hour 😀

It appears that the Realtek card is very poorly supported in the kernel. Comparing wattage readings with power saving features on

Intel Centrino 6205 2x2 - ~from 8mW to 400mW when in use
Realtek 1x1 - ~2 watts to 6 watts

The Centrino card has been a significant upgrade overall. Better battery life and snappier browsing. Highly recommend it to those using Linux on a laptop. I bought it on Ebay, but be careful. Many OEMs use specific WiFi cards so you can't buy any which one because the BIOS won't pick it up.
 
Back
Top