x60s and linux battery time

X60/X61 series specific matters only.
Post Reply
Message
Author
tyanlion
Sophomore Member
Posts: 169
Joined: Thu Feb 15, 2007 12:30 pm
Location: Singapore

x60s and linux battery time

#1 Post by tyanlion » Mon Feb 19, 2007 6:46 am

Hi.

Has anyone here installed linux on the X60s and tested its battery time? Just curious to know how long the x60s can last in linux(we all know vista eats battery like mad how abt a different OS?).

Pls state your battery type

techflavor
Freshman Member
Posts: 119
Joined: Sun Jan 29, 2006 1:55 am
Location: Baton Rouge, LA
Contact:

#2 Post by techflavor » Mon Feb 19, 2007 11:37 am

Each distribution of Linux will be different. It will also depend on what has been compiled in the kernel.

For what its worth.. I get about 4-5 hours in Slackware compared to about 7 in XP.

I haven't booted into Ubuntu in awhile but I remember it being close to the same as Slackware--normally ~2 hours less than XP.

Edit: Failed to mention that this is with an 8 cell battery.

tyanlion
Sophomore Member
Posts: 169
Joined: Thu Feb 15, 2007 12:30 pm
Location: Singapore

#3 Post by tyanlion » Mon Feb 19, 2007 12:09 pm

Thanks that was the info i needed to know.

Turbo Audi
Senior Member
Senior Member
Posts: 509
Joined: Thu Jul 20, 2006 7:40 am
Location: Sudbury, Massachusetts.
Contact:

#4 Post by Turbo Audi » Mon Feb 19, 2007 9:13 pm

techflavor wrote:Each distribution of Linux will be different. It will also depend on what has been compiled in the kernel.

For what its worth.. I get about 4-5 hours in Slackware compared to about 7 in XP.

I haven't booted into Ubuntu in awhile but I remember it being close to the same as Slackware--normally ~2 hours less than XP.

Edit: Failed to mention that this is with an 8 cell battery.
4-5 hours in Slackware? [censored].
ThinkPad user and ThinkPads.com member since summer, 2006. That was a good summer.

T60---> X60s---> X200s

pimlottc
Posts: 22
Joined: Mon Feb 19, 2007 2:25 am
Location: Melbourne, Australia

8 Hours under linux

#5 Post by pimlottc » Fri Feb 23, 2007 9:03 am

I came across a great presentation from Pavel Machek, a SUSE Labs employee, examining the biggest power culprits in laptops. Lucky for us, his test system is a X60. It's more an exploratory paper about possible system and UI changes to improve battery life, but some of the ideas are actionable (if you know your way around a kernel).

8 hours of battery life on
your lap(top) - PDF

jon
Posts: 42
Joined: Thu May 20, 2004 9:24 am
Location: Coonabarabran

#6 Post by jon » Fri Feb 23, 2007 4:44 pm

I got about 6 hours the other day, out of the 8-cell battery.

Doesn't seem much, if any worse than Windows.

CPU at lowest speed, brightness 5/7, laptop-mode enabled. Only used wireless for about 10 mins though.

tyanlion
Sophomore Member
Posts: 169
Joined: Thu Feb 15, 2007 12:30 pm
Location: Singapore

#7 Post by tyanlion » Fri Feb 23, 2007 10:58 pm

still can't beat the windows time ..........sad

Turbo Audi
Senior Member
Senior Member
Posts: 509
Joined: Thu Jul 20, 2006 7:40 am
Location: Sudbury, Massachusetts.
Contact:

#8 Post by Turbo Audi » Sat Feb 24, 2007 1:44 am

jon wrote:I got about 6 hours the other day, out of the 8-cell battery.

Doesn't seem much, if any worse than Windows.

CPU at lowest speed, brightness 5/7, laptop-mode enabled. Only used wireless for about 10 mins though.
When I got my new 8 cell for my x60s I got 9 hours out of it with wireless on the entire time in XP. Now I get about 7 with screen brightness at 5. Win has far better power management.
ThinkPad user and ThinkPads.com member since summer, 2006. That was a good summer.

T60---> X60s---> X200s

tackat
Posts: 11
Joined: Sun Jan 07, 2007 6:41 am
Location: Juelich, Westphalia, Germany

x60s and linux battery time

#9 Post by tackat » Sat Feb 24, 2007 5:07 pm

Using linux there are two major things that you should take care of wrt your X60s to increase battery time:

1.) Put your WLAN card into powersave mode by adding the following line to your start scripts:

iwpriv eth1 set_power 7

(or use "iwpriv eth1 set_power 1"). This will also reduce the heat problem that some people experience to a normal level.

2.) Permanently remove the UHCI-USB driver by adding the following line to one of your start scripts:

rmmod uhci_hcd

This won't affect USB support as the EHCI module will still be there to support USB. However it will significantly increase the battery time.

Following that advice should extend your battery time by 1-2 hours. I'm using Kubuntu with KPowersave (which takes care of laptop mode being enabled as well) on the X60s and enjoy about 6.5 hours in average using the 8 cell battery.

Tackat

tyanlion
Sophomore Member
Posts: 169
Joined: Thu Feb 15, 2007 12:30 pm
Location: Singapore

#10 Post by tyanlion » Sun Feb 25, 2007 11:29 pm

wait so is that time with wireless?

and if so what is the time without wireless on?

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

Re: x60s and linux battery time

#11 Post by cb474 » Wed Feb 28, 2007 3:08 am

tackat wrote:Permanently remove the UHCI-USB driver by adding the following line to one of your start scripts:

rmmod uhci_hcd

This won't affect USB support as the EHCI module will still be there to support USB. However it will significantly increase the battery time.
Wow! Thanks for that incredibly useful piece of advice. Not only did it cut 2 Wh off my battery discharge rate, but it eliminated and incredibly annoying crackling high pitched noise that my T60 makes when running on battery. I was beginning to give up on finding effective advice for improving battery life in Ubuntu, which I've found hard to find despite it being a widespread and well known problem in Linux.

By the way, what does the UHCI-USB driver do? If USB works without it, what is it for?

em500
User with bad email address, PLEASE fix!
Posts: 69
Joined: Wed Jun 23, 2004 6:16 am

#12 Post by em500 » Wed Feb 28, 2007 11:53 am

UHCI is the driver for USB 1.0/1.1 controllers. EHCI is for USB 2.0 controllers. I was always under the impression that EHCI also needed UHCI to be present but apparently that's not the case. If your USB devices work fine with only the EHCI driver, just go with that. You can always do a "modprobe uhci-hcd" whenever you need it.

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

#13 Post by cb474 » Thu Mar 01, 2007 12:08 am

Thanks for the explanation.

Any advice about how to disable the uhci module at startup, or have it just not load in the first place? And then how to undo it if I need it? Thanks.

em500
User with bad email address, PLEASE fix!
Posts: 69
Joined: Wed Jun 23, 2004 6:16 am

#14 Post by em500 » Thu Mar 01, 2007 5:20 am

Putting uhci_hcd in /etc/modprobe.d/blacklist should do the trick for most distros.

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

#15 Post by cb474 » Fri Mar 02, 2007 3:20 am

Apparently, after putting uhci_hcd in the blacklist, you also have to issue this command:

sudo update-initramfs -u -k `uname -r`

Which I found in this post:

http://ubuntuforums.org/showthread.php?t=363259

I have no idea what that command does, but it worked for me.

tackat
Posts: 11
Joined: Sun Jan 07, 2007 6:41 am
Location: Juelich, Westphalia, Germany

#16 Post by tackat » Fri Mar 02, 2007 3:53 am

> I have no idea what that command does, but it worked for me.

Theoretical background: The (K)Ubuntu kernel tries to load the uhci_hcd module on system start at a point of time where no filesystems have been mounted yet. Without a file system usually this wouldn't work unless the module was compiled into the kernel.
However the kernel does also have access to all data located in an archive file called "initramfs" which contains the uhci_hcd module in (K)Ubuntu.
Without updating the initramfs file the entries listed in the blacklist won't apply to the initramfs but only to the modules that are stored on your filesystem. Which is the reason why you've got to issue that command to blacklist the uhci_hcd module.

Completely unrelated but another good idea for X60s linux users:

While blacklisting the uhci_hcd driver it might be a good idea to also blacklist the "video" module as well. If you are using Bios 2.06 (or if you are planning to do so) this will make your lcd brightness keys work properly again.

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

#17 Post by cb474 » Tue Mar 06, 2007 10:03 pm

tackat, thanks for the explanation. So how would one blacklist the video modules? Just put "blacklist video" in the blacklist file and update the initramfs? Would this help with a T60 also? Does it affect battery life or is it just an issue of the brightness keys. My brightness keys already work.

On another note, I've found that blacklisting the uhci_hcd module (on my T60) allows a USB ram stick to work, but my printer was not recognized without reloading the module. Is this to be expected? Any solution other than reloading the module? I supposed it would be nice to at least have the module unload when running on battery, but be loaded on AC.

tackat
Posts: 11
Joined: Sun Jan 07, 2007 6:41 am
Location: Juelich, Westphalia, Germany

#18 Post by tackat » Wed Mar 07, 2007 4:03 am

> Does it affect battery life or is it just an issue of the
> brightness keys. My brightness keys already work.

If your brightness keys work fine already there's no need to change anything.

> tackat, thanks for the explanation. So how would one blacklist
> the video modules? Just put "blacklist video" in the blacklist
> file and update the initramfs? Would this help with a T60 also?

just putting "blacklist video" into the blacklist would be enough already, as that particular module isn't required by the kernel early at boot time.

> On another note, I've found that blacklisting the uhci_hcd
> module (on my T60) allows a USB ram stick to work, but my
> printer was not recognized without reloading the module.
> Is this to be expected?

AFAIK all newer devices don't need uhci_hcd. If you should find out that you need it anyways read on.

> Any solution other than reloading the module?

Ideally the module would only be loaded if the hardware is actually attached to the Notebook. No idea how to accomplish this properly.
This could either work through inotify-tools or in the case of the printer maybe using cups directly. I don't have a ready-made solution for these cases though.

> I supposed it would be nice to at least have the module
> unload when running on battery, but be loaded on AC.

Please have a look at the existing scripts in:

/etc/acpi/ac.d

and

/etc/acpi/battery.d

Using these as a template it should be easy to create your own script that inserts the module and removes it. It should basically be just a matter of pasting "modprobe uhci-hcd" and "rmmod uhci-hcd" into the respective files (don't forget to include "#! /bin/sh" into the very first line) and making them executable.

cb474
Sophomore Member
Posts: 128
Joined: Thu Jan 04, 2007 10:04 pm
Location: Washington, DC

#19 Post by cb474 » Wed Mar 07, 2007 3:29 pm

thanks for the great explanations! i will look through this and see if i can figure out how to make some scripts.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Thinkpad X6x Series incl. X6x Tablet”

Who is online

Users browsing this forum: No registered users and 7 guests