Forgot your password?
typodupeerror
Power Portables Software Hardware Linux

Why Is Linux Notebook Battery Life Still Poor? 907

Posted by timothy
from the have-seen-the-same dept.
Ganty writes "I recently purchased a Lenovo W500 notebook, and after 'downgrading' to XP and creating a dual partition, I found that I had a battery life of nearly three hours using the long-life battery, at this point I was a happy camper because it means that I can watch a DVD during a flight. I then tried various Linux distributions and found the battery life under FOS to be very disappointing, with an average of 45 minutes before a warning message. After settling on Ubuntu I then spent three days trying various hardware tweaks but I only managed to increase the battery life to one and a half hours. Unwanted services have been disabled, laptop mode has been enabled, the dual core CPU reduces speed when idle and the hard drive spins down when not needed. Obviously Apple with their X86 hardware and BSD based OS have got it right because the MacBooks last for hours, and a stock install of MS Windows XP gives me three hours of life. Why is battery life on notebooks so poor when using Linux? Some have suggested disabling various hardware items such as bluetooth and running the screen at half brightness but XP doesn't require me to do this and still gives a reasonable battery life."
This discussion has been archived. No new comments can be posted.

Why Is Linux Notebook Battery Life Still Poor?

Comments Filter:
  • by Alzheimers (467217) on Tuesday August 25, 2009 @12:02PM (#29187831)

    Is your screensaver running SETI?

    Probably not a good idea if you want to conserve battery life.

    • Re: (Score:3, Informative)

      I know the "never assume" thing in IT, but here, I do assume that

      ...the dual core CPU reduces speed when idle...

      means that he is NOT running BOINC or other numbers-crunching software...

    • by ksatyr (1118789) on Tuesday August 25, 2009 @12:22PM (#29188221)
      Is the kernel compiled to be tickless? http://kerneltrap.org/node/6750 [kerneltrap.org]
      • by Anonymous Coward on Tuesday August 25, 2009 @12:32PM (#29188423)
        And people expect an average computer user to want to use Linux when they have to make sure their kernel is compiled right to do basic power management?
        • by Otto (17870) on Tuesday August 25, 2009 @01:32PM (#29189337) Homepage Journal

          And people expect an average computer user to want to use Linux when they have to make sure their kernel is compiled right to do basic power management?

          No, you expect the average computer user to install the mobile or laptop version on a laptop, which come premade specifically with optimizations like these.

          One size does NOT fit all.

          • by mikefocke (64233) <[moc.liamg] [ta] [ekcof.ekim]> on Tuesday August 25, 2009 @01:42PM (#29189487)

            But why should the average user have to worry about tickless
            after all other OSs figure out your hardware and install the right options. A distribution could worry about the user experience and take care of this automatically or, at worst, ask you if you are installing on a battery powered system.

            There is utility in having one entity responsible for the ease of installation and not punting it to the varying knowledge/skill levels of the user.

            If Microsoft and Apple can do it....

            • by Otto (17870) on Tuesday August 25, 2009 @02:38PM (#29190377) Homepage Journal

              First, Microsoft doesn't "do it". Without specific drivers provided by the OEM, the power-save functionality doesn't work well on Win either. The fact that all OEMs provide these is simply a matter of scale, Windows is 90% of the market, after all.

              Secondly, Apple controls the hardware. They can do what they like and make sure it works because it's a limited subset. You pay extra for that too.

              What you're basically asking for is "why can't this free software made by volunteers be as instantly capable with any hardware on the planet as the big corporate monopoly that spends zillions on the same thing"?

              Do you now see the idiocy of the question?

              Hey, the fact that it works at all is the miracle here. Okay, so you might have to tweak it. Generally speaking, you don't have to, but there's always edge cases.

              Also, the existence of differing distributions reflects different needs. There's stuff in any install of Windows that people often don't need. So why install it? Linux being customizable for the task at hand is a feature, not a drawback.

              • by jeremyp (130771) on Tuesday August 25, 2009 @03:56PM (#29191547) Homepage Journal

                What you're basically asking for is "why can't this free software made by volunteers be as instantly capable with any hardware on the planet as the big corporate monopoly that spends zillions on the same thing"?

                Do you now see the idiocy of the question?

                No, I don't see the idiocy of the question. The answer gives an important insight into one reason why Linux isn't more successful on the desktop.

                Users of computers don't care that Linux is partly made by volunteers. They want their computers to last as long as possible on a battery. They don't want to hear excuses about how Apple and Microsoft have better access to the hardware suppliers than the Linux developers. The fact is they do have better access and that leads to better power management.

                I'm afraid you just have to find a way to deal with it. In fact, bleating that it's not fair because Linux developers are volunteers may make things worse. You're basically saying Linux is amateur. People want their software to be professional.

            • by budgenator (254554) on Tuesday August 25, 2009 @03:19PM (#29190955) Journal

              I bet if you installed Windows Server 2008 on your laptop the battery life would kinda suck to; Server OSes tend to expect they'll be running balls to the wall ready to spawn new processes by the hundreds, not conserving a few mAHrs of battery life.

            • by DangerFace (1315417) on Tuesday August 25, 2009 @03:23PM (#29191023) Journal

              The last time I installed XP on my laptop I had lost some, but not all, of the OEM-supplied driver disks, and it ended up taking me a total of about eighteen hours of solid graft to get it to work. Incidentally, I grew up on Windows, and have only really gotten into FOSS stuff in the last three or four years, and the last time I installed Ubuntu (which took about twenty minutes) it had already configured my screen to the right resolution, got the wi-fi and bluetooth working, got the frickin' bog standard ethernet adapter working, and suggested that I might want to download the right drivers for my GPU by clicking OK and typing my password.

              When people say these things, I always have to wonder whether they have ever actually installed Windows. Maybe it's just me, but it takes longer for XP or Vista to simply copy the base installation to the hard drives than it does for me to set up Ubuntu, and I still have to look up which packages I need to install to listen to MP3s or watch DVDs.

          • by JudasBlue (409332) on Tuesday August 25, 2009 @01:55PM (#29189675)

            Would you? Really? Cause I have been using Linux exclusively for my servers, desktops and notebooks for years and I didn't know there was a "laptop" ubuntu. Or suse. Or redhat.

            Actually, I still don't know that. But I will take your word for it that something like that exists in some niche under a rock. Everything does. Linux distros are like porn on the net, if you can think of it, someone has done it. And heck, there are probably even supported ones from the three distros above maybe. Just I never heard of them because I haven't cared enough to look.

            Which brings us to the odds of "the average computer user" having heard of them: Zero. Zip. None, Nil.

            Plus, they have absolutely no conditioning for it, coming from either Mac or Win, where you don't need a magic special install to make your laptop work with your OS. You just do it.

            So basically this isn't negating the OP's point, but instead reinforcing it. It is just another reason for people who aren't geeks to say: linux, I tried that but my battery life cut in half, so I put Win back on my machine.

          • by bobbuck (675253) on Tuesday August 25, 2009 @01:58PM (#29189735)
            I'm running a stock Ubuntu install (except Nvidia drivers) and my battery life is great. The sleep mode works, too. The key to running Linux is using compatible hardware and it works very well. Ubuntu really has made the user experience better than Windows. I'm not saying that Linux offers the same breadth of software but on compatible hardware is really is slick. I was at my brothers and wanted to print a file. I plugged the USB cable in and the selected the printer while printing from the application. No downloading drivers, no loading crapware from a CD, just plug in and print.
      • by terraformer (617565) <tpb@pervici.com> on Tuesday August 25, 2009 @01:18PM (#29189169) Journal
        Ding Ding Ding. We have a winner folks. This is the answer. You need to have a tickless kernel otherwise the tick timer keeps the CPU from ever making it to those deep C states for any decent amount of time. In effect, the kernel keeps asking everything,"got anything for me". The CPU equivalent of "are we there yet" or "can you hear me know".
      • by bflong (107195) on Tuesday August 25, 2009 @01:47PM (#29189571)

        A quick Google search shows that the basic kernel for all versions of Ubuntu has been tickless since 7.10.
        http://www.ubuntu.com/news/ubuntu-server710 [ubuntu.com]
        I know my system (karmic) does. You can check with:
        $ grep CONFIG_NO_HZ /boot/config-`uname -r`
        CONFIG_NO_HZ=y

  • by SendBot (29932) on Tuesday August 25, 2009 @12:05PM (#29187885) Homepage Journal

    I may sound like a jerkwad here, but why waste all that battery power watching a dvd when you could watch the divx version off local storage?

  • RTFM (Score:5, Funny)

    by eln (21727) on Tuesday August 25, 2009 @12:06PM (#29187899) Homepage
    I don't know how you can expect us to fix your problems when you won't even take the time to read the documentation provided with the release.

    In order to solve your problem, you need to set the RANDOMLY_DISCHARGE_BATTERY flag in the kernel source to "0" at compile time. Ubuntu, as well as other "desktop" distributions, set this flag to "1" by default for some reason, but simply installing the source packages and recompiling your kernel will fix the issue.

    Honestly, a simple well-tailored Google search and a few measly days of sifting through the docs would have given you this answer without having to waste everyone else's time.
    • hah! (Score:5, Funny)

      by neo (4625) on Tuesday August 25, 2009 @12:10PM (#29187965)

      He only wasted you time and informed me and about everyone else who didn't know this. Thanks eln!!

    • Re: (Score:3, Funny)

      by Shakrai (717556)

      In order to solve your problem, you need to set the RANDOMLY_DISCHARGE_BATTERY flag in the kernel source to "0" at compile time. Ubuntu, as well as other "desktop" distributions, set this flag to "1" by default for some reason, but simply installing the source packages and recompiling your kernel will fix the issue.

      Recompile the kernel? You n00b. Just add this to your rc.local file:

      echo 0 > /proc/sys/kernel/randomly_discharge_battery

  • Drivers (Score:5, Informative)

    by stei7766 (1359091) on Tuesday August 25, 2009 @12:07PM (#29187925)

    I was able to get my X41 tablet to have good battery life (a bit better than windows actually), but it took some doing. Powertop is a godsend, it pointed me to the i915 intel drivers as the culprit. Disabling DRI made a huge difference.

  • Powertop (Score:5, Informative)

    by Uberdog (73274) <jay-slashdot DOT org AT 4st DOT org> on Tuesday August 25, 2009 @12:08PM (#29187931) Homepage
    If you're running on an Intel platform, try running powertop [lesswatts.org]. I can easily gain over an hour of battery life by disabling the services it recommends and reducing the screen brightness.
    • Re:Powertop (Score:5, Informative)

      by RiotingPacifist (1228016) on Tuesday August 25, 2009 @12:28PM (#29188343)

      +1 powertop will also give suggestions, you can permanently configure sutff.

      on my Acer i also managed to get more battery life than windows by:
      switching my DE to fluxbox
      not running anything in the background (except kpowersave)
      turning off unused peripherals (wireless chips eat power with their scans, webcams hold charge in their CCD, etc)
      using buttons/keys over mouse where possible (I think most of the touchpad drivers run in software, thus prevents the CPU reaching lower sleep levels)

      • Re:Powertop (Score:4, Insightful)

        by Hurricane78 (562437) <deleted@slashBLUEdot.org minus berry> on Tuesday August 25, 2009 @01:05PM (#29188999)

        But the problem still is: On windows, it has tons of background stuff active, you use the mouse, you have a colorful UI with FX, and full brightness, while your wlan scans the surroundings, and you *sill* get nearly as much battery life. Something is wrong there...

        • Re:Powertop (Score:5, Informative)

          by RiotingPacifist (1228016) on Tuesday August 25, 2009 @02:01PM (#29189781)

          your wlan scans the surroundings

          Windows has better ACPI stuff because most of the drivers are 3rd party, so while its not scanning the card sleeps, eventually NM+well supported cards will catch up, e.g ath5k now handles me turning the card on/off, this is a big improvement from custom rmmod scripts (if you want it sooner, go do it)

          it has tons of background stuff active

          The background stuff isn't "linux's" fault, its down to whatever distro/setup you have, e.g if doubt slackware/arch users bitch about battery life. For example, i run crap loads of background stuff that requires a net connection, it can't magically know that I've decided to watch a film on batteries without a net connection.

          you have a colorful UI with FX

          I think a lean KDE3 install might compete with XP, running fluxbox wasn't because the DE is particular efficient (which it is), it's because it didn't suit my setup.
          Perhaps KDE4 might compete with Vista, but i don't know i ran vista once and it ate my batteries.

          and full brightness,

          Again changing brightness affects both OSes equally or do you think linux has some allergy to light?

          you use the mouse

          While the linux touchpad drivers probably aren't as good as the windows driver, my advice stands for windows too, using keyboard/button inputs uses much less cpu than a touchpad.

          So what was the point of your post? To bitch about how the background processes and drivers in linux arn't as efficient as those in windows? How about you go fireup powertop and file some bug reports. If you'd understood the point of my post (which ill go out on a limb and say you had no fucking clue), it was that the problem doesn't lie in the kernel (although for the wlan scanning it may), but rather in the background processes (looks at pulseadudio, though it saves audio card power im sure it wastes more in CPU wakeups) and Desktop environment, which over time do actually improve (firefox is still a bad offender but its gone from ~100 wakeups/s to ~40 in 3.5), however if you want to see battery life improve quicker then do something (just filing bugreports helps [1] [lesswatts.org] bitching about it on slashdot does not!)

  • by pantherace (165052) on Tuesday August 25, 2009 @12:11PM (#29187983)
    This really is an issue, and hardware support varies. Your notebook seems to include an ATI graphics card. That's probably your problem. Last I looked neither the open source, nor the ATI graphics drivers supported power savings on the ATI cards. I have an Asus F8Sv, which actually gets longer battery life in Linux, about 10 minutes, even though when running Linux, I have an external hard drive connected. It's got an Nvidia Geforce 8600 graphics card, with Nvidia's drivers. (Mind you, this is with OpenGL composting enabled, under Kubuntu (both 9.04 and 9.10) The other big one is Intel cards, which are supported for most of their power management features under the driver Intel helped write.
  • by jo_ham (604554) <(moc.liamg) (ta) (999mahoj)> on Tuesday August 25, 2009 @12:12PM (#29188001)

    I dragged my old 15" Powerbook (1Ghz G4) out of retirement to have a look at Ubuntu, and while this may be a totally unfair comparison since the PPC build is hardly going to be the major focus of their optimising, but the PB did run much hotter under Ubuntu than it did under 10.4, and fan control was much less precise. It's not surprising, since Apple made the thing and obviously designed OS X around all the various controllers and sensors in it and Ubuntu has to run on anything you can throw it at, but that would be what I put this down to.

    I was not sufficiently experienced at the time to do much to cure it, but I did install some software that had been written to make the fan control better which did help a little to keep it cool, but I'm not sure it would last long away from the power adapter.

  • by nweaver (113078) on Tuesday August 25, 2009 @12:12PM (#29188011) Homepage

    This is just the same problem Noted in XKCD [xkcd.com].

    Good battery life is not cool. Open source software, especially a mutt like linux, is all about cool.

    Good battery life requires annoyingly huge amounts of microoptimizations and chipset-dependent tricks. Which is most definatly NOT cool.

    • by Kjella (173770) on Tuesday August 25, 2009 @01:06PM (#29189007) Homepage

      No, power saving is all about very detailed specs on how a chip can be powered down while in different states. Oh sure from the user side it might look like a simple low-high slider but in practise it's dynamically changing clock speeds, voltages, disabling parts of the chip and so on. I've been following the AMD open source driver development and basicly for full power management you'll need a whole new documentation package. They're still working on making it work right under full speed before power management will be a big priority.

    • Re:BIOS (Score:3, Interesting)

      Really? I wondered why since most laptops have myriad settings in their BIOS for power management that they say to turn off BIOS power management when using software power management. I always wondered what exactly was the advantage of using software power management at all. I mean why not turn off software power management and use the BIOS settings exclusively? Are these 'microoptimizations' the reason?

    • by Ephemeriis (315124) on Tuesday August 25, 2009 @01:28PM (#29189287)

      This is just the same problem Noted in XKCD [xkcd.com].

      Good battery life is not cool. Open source software, especially a mutt like linux, is all about cool.

      Good battery life requires annoyingly huge amounts of microoptimizations and chipset-dependent tricks. Which is most definatly NOT cool.

      Incorrect, at least in this case.

      This problem has nothing to do with whether it is cool or not to squeeze and extra hour or two out of your notebook... This problem has to do with hardware support.

      Linux developers continue to have trouble getting access to the hardware they need. Hardware developers are frequently unwilling to divulge the necessary secrets for F/OSS developers to write good drivers... And those same hardware developers are frequently unwilling to devote the time/money/effort necessary to write good drivers themselves...

      So you wind up with half-crippled hardware under Linux. You get video cards, motherboards, hard drives, motherboards, etc. that won't properly spin down or hibernate or sleep or whatever.

      Other folks in this thread have mentioned that this particular notebook ships with an ATI video card. ATI has notoriously crappy Linux support. This is a video card we're talking about... Geeks love video cards. It doesn't get much cooler than 3D graphics - look at all the time and effort going into projects like Compiz [compiz-fusion.org].

      I can almost guarantee that if ATI would open up their documentation you'd see better battery life just as quickly as folks could code it.

  • Distro Choice (Score:3, Informative)

    by MonsterTrimble (1205334) <monstertrimble@h ... m ['il.' in gap]> on Tuesday August 25, 2009 @12:21PM (#29188205)
    I would like to know which version of Ubuntu he has chosen and what other distros he's done. Off the top of my head for distros I'd try:

    1) Ubuntu Netbook Remix (Both Gnome and KDE)
    2) Moblin
    3) Puppy
    4) Macpup Opera
    5) Xubuntu
    6) gOS
    7) Damn Small Linux

    Yep - either those who target netbooks or those which try to be resource friendly. If one can run on a much older system well then a newer system it should hum, plus not be such a big hit on the battery life.
  • by anss123 (985305) on Tuesday August 25, 2009 @12:22PM (#29188231)

    Some have suggested disabling various hardware items such as bluetooth and running the screen at half brightness but XP doesn't require me to do this and still gives a reasonable battery life

    Are you sure? My netbook dims the screen when I pull the power cord on both XP and Win7... though it might be the BIOS doing that.

    Anyway my suggestion is checking if ACPI works as it should. AFAIK laptops are notorious for buggy ACPI implementations that are only tested with Windows. Linux now pretends to be Windows XP when doing ACPI stuff, before that they noped out some part of the BIOS to make it work with Linux but that wasn't reliable. Look into if you can change how Linux does ACPI and try that.

  • by erroneus (253617) on Tuesday August 25, 2009 @12:33PM (#29188437) Homepage

    While I can't say that my Dell laptop's power management has been piss-poor under Windows (I can't really say that I used Windows on THIS particular computer that much, but I did on previous Dell models) and the power management was pretty excellent especially when the Intel speedstep software was running. If it helps, I run Fedora and Fedora and Dell laptops have been getting along fabulously for at least the past 6 or 7 version releases.

    But one thing about running Windows that has always been a complaint and that's it's estimation for "time remaining." Whether looking at file transfers or remaining battery life, Microsoft ALWAYS seems to over-estimate "time remaining" or has at least reported the most optimistic figure possible. What I'm getting at is that it is QUITE possible that the Windows battery life you are reading is either untrue or unrealistically optimistic.

    I know on my Dell Mini 9 running XP and watching video on battery power initially claims I have like 3 or 4 hours battery remaining, but before the two hour movie is complete, it wants to die.

    The biggest source of battery drain on my netbook is CPU processing. No doubt with my other notebook, it would be hard drive usage followed closely by processor/gpu usage. This leads me to the next suggestion when using Linux -- use the graphics driver provided by nvidia or ati. They manage power better because they have the "secrets" that the GPL drivers don't have access to. Remember that a GPU is still a processor and eats power when processing.

    Power management on laptops is all about paying attention to everything that draws power and being aware of it. For example, if it generates heat, it's using power... usually lots of it and cooling systems draw even more power as a consequence. Dial that speedstep down WAY low when unplugged.

  • Turn Syslog off (Score:4, Informative)

    by flyingfsck (986395) on Tuesday August 25, 2009 @12:39PM (#29188535)
    It is no use setting sleep mode on the HDD if you leave Syslog running.
  • by xeno (2667) on Tuesday August 25, 2009 @12:47PM (#29188665)

    I'm surprised, my experience with Ubuntu 9.04 is very good on similar Thinkpad hardware. After upgrading from a decrepit IBM T42p to a Lenovo T61p (UXGA->WUXGA = similar screen size/power demands to the hi-res W500), I still get ~4:00 out of the Thinkpad extended battery.

    Some ideas; perhaps these will be useful:
    - There is a bios setting on the Lenovo-era Thinkpads where you can force the screen to high brightness. My Ubuntu install manages this correctly (i.e. turns it on when on line power, off when on battery). However if yours does not kick the brightness to the normal range off line power, it'll kill the battery faster than any other factor. On high display brightness, you will be lucky to get more than 90min on battery.
    - Hard drive power consumption does make a significant difference, and for that, Windows does tend to spin down the drive more frequently. With a high-load drive the difference can be pretty dramatic, but a more efficient drive closes the performance gap even if Linux isn't as aggressive with drive power management. For example, with the last upgrade to the T42, I replaced the old 1.1A IBM drive with a .45A Seagate, and my experience was dramatic: 30-45min more battery time from that change alone. When I upgraded the recent hdd, I made sure to select one with less than .5A consumption.
    - Check your display drivers. On the T61 with the default Ubuntu installation, the CPU load increased with the open-source video driver, because it's compensating for certain unknowns in the GPU by offloading to the CPU/being more inefficient. Loading the Nvidia driver not only increased performance (a lot), but (again) noticeably reduced power consumption.

    In short, optimize, optimize, optimize.... and sometimes that means installing the right driver, not stripping things down.

  • No problems (Score:5, Funny)

    by mgichoga (901761) on Tuesday August 25, 2009 @12:49PM (#29188695)
    What do you mean? I just turned on my laptop linux and it always lasts ove
  • A Few More Pointers (Score:5, Informative)

    by cfriedt (1189527) on Tuesday August 25, 2009 @12:51PM (#29188755)
    • You should probably eliminate your screensaver altogether and set the windowing environment to power-off the monitor after a certain timeout occurs.
    • Your web browser (e.g. Firefox) should be set to use browser.disk.cache.parent_dir=/tmp in about:config (mount /tmp as tmpfs). Really anything creating or writing files periodically should write them to tmpfs. Also, you might want to just make a symbolic link from ~/.mozilla/firefox/[profile]/Cache -> /tmp.
    • Eliminate ALL logging - it will wake up the hard disks every time a message is logged, unless you log to tmpfs.
    • With Ubuntu 9.04, also keep in mind that video / 2D / 3D operations are not accelerated because Canonical chose to use FLOSS-only drivers on this release. That means, your CPU works overtime to account for all of Ubuntu's fancy compositing. Apparently with Ubuntu 8.10 restricted drivers are still allowed, so you might want to consider downgrading. They have the added benefit of lowering the work of the main CPU (i.e. less power is used), using silicon to accelerate graphics rather than software.
    • User powertop
    • Tweak the kernel to enable dynamic ticks (i.e. a 'tickless' system)
    • Really look through your ~/.xyz files to see which of them contain logs and caches. Redirect those to /tmp using a symbolic link.

    It's sadly true that almost all Linux applications / distributions have not taken writing-to-disk into account to reduce power. On the other hand, video / 2G / 3G graphics acceleration in hardware makes a huge difference, which is why I would really like to see more companies offering more in terms of stable hardware acceleration.

  • Buggy DSDT in BIOS (Score:5, Interesting)

    by SoCalChris (573049) on Tuesday August 25, 2009 @12:53PM (#29188775) Journal
    I've personally experienced issues with my laptop BIOS. It works properly in Windows, but a lot of the ACPI functions just flat out don't work in Linux. This is due to a compiler that lets the code compile with errors (Mainly functions that don't return a value when they should). This allows the BIOS programmers to be lazy, and write half assed power functions that don't work properly.

    You can fix a lot of these issues by following the instructions in one of the links below to decompile that portion of the BIOS, and recompile it using the Intel compiler. It isn't easy, and certainly isn't something an user should ever have to do. It did fix a lot of the power issues with my HP laptop though (Running hot, not booting on battery power unless a key was pressed, hibernation).

    See
    http://www.osnews.com/thread?230516 [osnews.com]
    http://ubuntuforums.org/showthread.php?t=1036051 [ubuntuforums.org]
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272247?comments=all [launchpad.net]


    In this instance, you can blame MS's poor compiler for Linux's poor battery life.
  • by mzs (595629) on Tuesday August 25, 2009 @12:56PM (#29188811)

    Look in cron and disable stuff you do not use, especially locate.

    Do not use the optical drive and make sure you are quiescing it.

    Turn-off access time modifications for the hard disk.

    Turn off fsck on boot.

    Turn off periodic SMART status checking (on some drives this spins it up).

    Tune the time to idle the drives and the periodic disk flusher (you have basically UPS with a laptop anyway).

    Turn off swap.

    Use a light simple window manager such as fvwm2 instead of something like gnome where lots of files are being accessed all of the time and you have many procs/threads running and the neat effects burn the battery.

    Find the docs to your graphics drivers and tweak the tunables to use as little power as possible (this will give you much more than you likely expect).

    Turn off bluetooth and wireless when you are not using it.

    Don't use any of the crazy sound daemons.

    You probably don't need wake-on-magic-packet for a laptop, turn it off, it helps a lot for some NICs.

    Do you use multicast for wireless, most likely not, read the docs and figure-out how to get your driver to ignore that, it can conserve more power on some cards.

    With some of the older chips USB was very power hungry in sleep (if that's your case tweak what you can so that it does as little as possible, likely turning off the wake on keyboard and mouse since you shutting and opening the lid should handle that).

    Install a flash blocker and/or ad blocker and use gnash where you can instead of the adobe version.

  • by sampson7 (536545) on Tuesday August 25, 2009 @01:01PM (#29188929)
    As one of those non-techies who enjoys reading /. for the brilliant article summaries, insightful commentary and the sterling sense of humor of many posters, this little tale explains exactly why I am not willing to switch away from a mainstream operating system. I think I'm reasonably tech savy for someone who's never taken a computer programming class, but wow -- none of this makes the slightest degree of sense to someone like me. Can anyone explain why my initial gut sense is an over-reaction? Should my replacement computer (another laptop) be Linux (other than Apple)?
    • by bperkins (12056) on Tuesday August 25, 2009 @01:40PM (#29189451) Homepage Journal
      Here's the short answer:

      Guy buys a laptop which has been designed and optimized to run under windows, which has been pre-installed. Any necessary configuration to optimize battery life was done when the laptop was imaged.

      Now someone takes said laptop and installs Linux on it. That particular hardware combo may never have been tested before and no optimizations have been done on it.

      It would be unsurprising to me if the latter situation didn't work very well.

      I run Linux on my laptop exclusively, but getting the pm stuff optimized is a big pain. The amount of fighting to get broken drivers and BIOSes working is not for the faint of heart.

      Your best bet for a Linux laptop would be a pre-installed version that's more than a windows laptop with Ubuntu slapped on it.

      Otherwise you'll be in for a a lot of fiddling.
    • Re: (Score:3, Informative)

      by Shatrat (855151)
      Try it, it's free.
      Download a LiveCD and just boot up and click around. If it piques your interest, it's quite easy to resize your hard drive to create a Linux partition next to your windows partition and choose your OS at boot time.
      Articles like this make things sound harder than they actually are. The great thing about linux is that common questions and problems are documented to DEATH on various how-tos and forums. The linux community isn't satisfied until there are 5 How-Tos to fix any given issue.
      In
  • by rainmaestro (996549) on Tuesday August 25, 2009 @01:24PM (#29189247)

    Just my own experience, but I've never seen differences in battery life that are this extreme. Linux has always been worse, but never more than about 10% on the laptops I've used, with one exception.

    The only time I've seen a huge difference is on an HP laptop that I currently use as an SVN/Trac/CUPS server. The machine has a BIOS bug that prevents me from using ACPI in Linux, and HP never released a patch to fix it. The only way to keep the machine stable in Linux is to boot "acpi=off, noapic, nolapic". With no real power management, it drains mighty fast, even with all the hardware that gets disabled booting this way (webcam, wireless, etc).

    On the other hand, a few years ago I owned a wonderful Sager laptop. With two double capacity batteries and a regular capacity battery, I could get a full 20 hours of battery life from the three (8 hours for double, 4 for regular) running Linux (Gentoo at the time), which was within 1 hour of the average total when I ran XP.

    Linux does have worse battery life, for a number of reasons, but the difference doesn't seem significant on most hardware. It all seems to depend on hardware quirks in your machine.

  • by Tweenk (1274968) on Tuesday August 25, 2009 @01:49PM (#29189609)

    It is notoriously hard to work with power management features of notebooks, because it is hard to find a really ACPI-compatible BIOS. Most of them are broken in some way, or require undocumented voodoo and magic values to behave. There is really no solution to this unless: a) Manufacturers get their shit together and ship functioning hardware, not hardware that accidentally happens to work under Windows (systemic approach); b) Linux gets more mindshare and those issues get sorted out on a per-device basis (band-aid approach). a) is very unlikely, since shipping functioning hardware brings no obvious reward to the manufacturer. Therefore we can only hope for b).

    Note that this is not limited to ACPI. In almost every area, there are hardware products that do not comply with specifications they are supposed to comply with, lie about supported features when probed, have bogus device descriptors, reuse the product ID of a different device, do stupid things when supplied valid commands it doesn't expect, etc.

  • Missing The Point? (Score:5, Insightful)

    by DavidD_CA (750156) on Tuesday August 25, 2009 @02:07PM (#29189879) Homepage

    I think many of the posters here, who all have great ideas and suggestions, are missing the point of the OP.

    Why is an out-of-the-box XP machine performing better than an out-of-the-box Linux machine?

    The Linux community shouldn't be saying "try this" or "tweak that" or "install this device driver" or "switch your hardware"... they should be working on building those into the next revs of the OS and making them part of the default configuration (or at least an easy prompt like XP offers).

  • by Urza9814 (883915) on Tuesday August 25, 2009 @02:12PM (#29189979)

    Well, perhaps it's the distro? Or the hardware. On my Dell Vostro 1000 with a 6 cell battery, I get at absolute maximum 4 hours of battery live on WinXP. On a slightly stipped-down Mandriva Linux I've managed to squeeze 6 hours of use out of it while watching movies. Of course, you could say this isn't an _entirely_ fair test as I was running both the system and the movie from a USB flash drive, but considering I did nothing special in the installer, just told it to install to the flash drive, I'd say it's fair - if you could install Windows to flash that easily I'd run it from one too. Plus with my full version of Mandriva 2009.1 using KDE4 I still get at least as much battery life as I get on XP - and it actually last longer than XP does for gaming (specifically World of Warcraft).

"Love is an ideal thing, marriage a real thing; a confusion of the real with the ideal never goes unpunished." -- Goethe

Working...