8

Just a quick question: I have noticed when I boot into Ubuntu my battery goes empty faster, and checking the "time left" option in Leopard and Ubuntu it says Mac will last 3 hours where Ubuntu will last 1.

Is that normal?????

Chan-Ho Suh
  • 7,562
aderojas
  • 467

3 Answers3

9

I would say battery life issues are not uncommon with specialized hardware. Particularly with Apple laptops, you will find many such issues in the Ubuntu forums. But the good news is usually you can tweak and adjust your laptop performance until it gets to pretty normal.

For example, with my Macbook Air, currently I get about 5 hours in OS X. With similar usage, I found I got about one hour of battery life on 11.10.

But it turns out 11.10 has some power management issues due to the 3.0 kernel. Supposedly 12.04 would fix that and I had a couple other issues anyway, so I upgraded to the alpha version. After that, I got about 2 - 2.5 hours. Then I learned about laptop-mode-tools (given how useful people find this, it's amazing this is not part of the default install for laptops...). Now I find I get about 4 hours. So I'm satisfied.

I've made a comparison of watts used and clearly Ubuntu is just using more than OS X. At idle, OS X is using 9-10 watts, while 12.04 is using 12-13. Part of it is due to this mysterious "display backlight" issue I'm running into, which takes about 2-2.5 watts.

Update: Here's more info about laptop-mode-tools. This is the website for it. From its FAQ, if you want to check if it's running, type cat /proc/sys/vm/laptop_mode at the command line; nonzero value means its running. Also, the configuration file is at /etc/laptop-mode/laptop-mode.conf. To read the manual for it, type man laptop-mode.conf at the command line. To alter the config file you will need to do it as root, e.g. gksu gedit /etc/laptop-mode/laptop-mode.conf. Be careful doing that! If you want to disable it, to test your system, near the beginning of the file, you should see the option ENABLE_LAPTOP_MODE_TOOLS with the value of 1 -- change it to 0 and shutdown/restart.

Chan-Ho Suh
  • 7,562
  • I'll look into 'laptop-mode-tools'. Any idea what am I looking for there? – aderojas Feb 14 '12 at 18:47
  • 2
    The beauty of laptop-mode-tools is that it configures a lot of stuff automatically for you. I haven't had to make any adjustments to its configuration file. But if you google, you can find the developer webpage and other useful sites that will explain how to tweak your configuration. I'd also recommend powertop -- it is a diagnostic tool that will show you what is consuming the most energy and it also makes recommendations of what to adjust (but unfortunately it doesn't let you save those recommendations). – Chan-Ho Suh Feb 14 '12 at 19:15
  • I installed the laptop-mode-tools via de synaptic package manager. Now what? I don't see any new application installed or how to set up stuff.... how do I know if it's already working? – aderojas Feb 14 '12 at 22:11
  • Apparently there is a bug and that's why it doesn't work. I get the exact same thing when trying sudo /usr/sbin/laptop_mode: https://bugs.launchpad.net/ubuntu/+source/laptop-mode-tools/+bug/824643 – aderojas Feb 14 '12 at 22:29
  • This seems to solve it: http://stevenprc2-blog.blogspot.com/2011/11/ubuntu-1110-fix-for-laptop-mode-utils.html Now... do I have to run it everytime I boot into Linux? Do I have to edit /usr/sbin/laptop_mode? Is there anyway to turn off the option that "disconnects" the mouse if I don't move it for a few seconds until I click again? – aderojas Feb 14 '12 at 22:37
  • Hi, sorry, I have to run off now; I'll be back in 2 hours. Anyway, I don't have time to check your 2nd link, but note that there isn't a bug now. Your version is new enough it includes the fix. I think you're confused as to how the program works. Once you installed it, it is running immediately. There is no GUI for it, it is something that runs in the background like many other programs. You can configure its configuration file which is a text file somewhere (I'll find it later for you). And yes, it will be automatically running each time you boot up. – Chan-Ho Suh Feb 14 '12 at 23:09
  • Thanks. I found the text files to edit and seems to be working fine. I was even able to change the USB mouse stop working ;) – aderojas Feb 14 '12 at 23:38
  • That's great! By the way, I don't know what error you got after you installed, but I don't think you should be running that command you tried. As for how you can tell it's doing something, I had run powertop before I installed, and after installation, I noticed that a lot of powertop's recommendations were now enabled (even though powertop doesn't save them, only suggests). So I figured it was laptop-mode-tools doing its thing. I also didn't have my laptop die so easily on me. That was a big indicator :-). – Chan-Ho Suh Feb 15 '12 at 01:07
  • Okay, so I added more info in my answer above. Disable laptop-mode-tools and use powertop to watch your power consumption. Note it is a text-based programs but there are menus along the top you can choose with the left/right arrow keys. Then enable laptop-mode and check using powertop again. You should see an improvement. The power management of the 3.0 kernel is supposed to be dismal though...I don't know how much of an improvement you'll get. – Chan-Ho Suh Feb 15 '12 at 01:33
  • How do I disable laptop-mode-tools? – aderojas Feb 15 '12 at 14:11
  • See the added info to my original answer. – Chan-Ho Suh Feb 15 '12 at 16:26
  • I'm thinking about buying a Macbook Air, but I'm hesitant because of battery life. You say you get about 4 hours now- is that the 11" or the 13"? – Nathan Dyer Mar 22 '12 at 02:38
  • The 13". It is about 1.5 years old using the original battery. I think 5 hrs in OS X after that long is still pretty good (although originally I was getting at least 7 with the same usage). I usually dim it to like 90% or slightly less. I've recently found that I can actually match my OS X battery life in Ubuntu. The trick was to switch to proprietary drivers for the graphics card and wireless. – Chan-Ho Suh Mar 22 '12 at 17:47
3

The real issue here is the graphic card, this part use a lot of power. Natively, the Leopard OS will manage and switch automatically between the more and the less powerful graphic card.

On Ubuntu, you will need to use a patch to be able to select which graphic card you want to use according to what you are doing.

I hope it will help you and you will see some improvements.

Octavian Helm
  • 14,355
Thomas
  • 76
0

3 times is a bit extreme. I suspect at least part of the difference may be due to the difference in algorithms estimating battery usage. Try running your laptop until the battery is dry with MacOS and Ubuntu - you may find that Ubuntu lasted 1.5 hours and MacOS lasted 2 - that would be more likely.

I mean - I'm getting 1 hour of battery life with Ubuntu from a cheap 6-year old Compaq laptop... Apple must be making very bad hardware for it to last 1 hour :)

Sergey
  • 43,665
  • Thanks. I understand that different OS calculate it in different ways, but I definitelly notice Ubuntu needing more resources. It also heats up the computer more and the vent has to go crazy once in a while. I'll run your test using the computer for the same stuff to see what happens. Thanks. – aderojas Feb 13 '12 at 21:42
  • Battery usage depends strongly on the OS and OS configuration. Additionally, the estimates may not be reliable. But, we cannot reasonably expect battery times to be the same between different OSs. – Jan Feb 13 '12 at 22:07
  • Thanks Jan, I understand that. But I'm still surprised that Ubuntu uses so much more resources and heats up the computer so much. I'm looking for solutions to manage that better, since I'm afraid this overusage might damage the hardware. – aderojas Feb 14 '12 at 00:38
  • If your laptop is constantly hammering at 100%, overheats, coolers work at 100% all the time, screen does not dim etc. - this is not a normal operation for Ubuntu. I would expect Ubuntu to have slightly bigger (or similar) power consumption compared to MacOS - when working normally. So, to directly answer your question: NO, this is not normal. – Sergey Feb 14 '12 at 00:57
  • System Monitor shows CPU1 and CPU2, and it seems that one of them is always at 100%. I have been reading in the Ubuntu forum and apparently this is a known issue, and I should do some stuff to manage the NVIDIA card so it uses less resources. Any ideas?? – aderojas Feb 14 '12 at 01:26
  • Can you see which processes use the CPU? – Sergey Feb 14 '12 at 01:30
  • I can, none of them seems to be using that much CPU. But I just change the NVIDIA additional drivers to version current-updates, and now both the CPU's seem to be working better (both below 30%). Maybe this was it :) – aderojas Feb 14 '12 at 01:37
  • Today it happen again. It was a process called "seahorse". I killed it and he computer went back to normal... but I have no idea what that process does! – aderojas Feb 14 '12 at 22:31