Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

Linux on ThinkPads
Post Reply
Message
Author
dexterous_21
Posts: 4
Joined: Sat Jan 10, 2015 5:03 am
Location: Manila, Philippines

Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#1 Post by dexterous_21 » Sat Jan 10, 2015 5:10 am

I'm having an issue with the battery of my X240 Thinkpad. It is a newly issued TP and I noticed that the battery won't last more than 2 hours upon full charge. I asked my colleagues who use X240 but on a Windows platform, and they said their battery lasts about 5-6 hours. 
Is this a bug on Linux? I am using RHEL 6.5 OS with Windows 7 KVM.
I would appreciate your help and insights on this.

Thanks!

RealBlackStuff
Admin Emeritus
Admin Emeritus
Posts: 19497
Joined: Mon Sep 18, 2006 5:17 am
Location: Mt. Cobb, PA
Contact:

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#2 Post by RealBlackStuff » Sat Jan 10, 2015 7:56 am

Please don't double-post, thank you.

ajkula66
SuperUserGeorge
SuperUserGeorge
Posts: 16347
Joined: Sun Feb 25, 2007 11:28 am
Location: Brodheadsville, Pennsylvania, USA

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#3 Post by ajkula66 » Sat Jan 10, 2015 8:38 am

dexterous_21 wrote:I'm having an issue with the battery of my X240 Thinkpad. It is a newly issued TP and I noticed that the battery won't last more than 2 hours upon full charge. I asked my colleagues who use X240 but on a Windows platform, and they said their battery lasts about 5-6 hours. 
Is this a bug on Linux? I am using RHEL 6.5 OS with Windows 7 KVM.
I would appreciate your help and insights on this.

Thanks!
Welcome to the forum!

You can expect a significantly worse battery life under almost any *nix flavour when compared to Windows, at least in my experience.
...Knowledge is a deadly friend when no one sets the rules...(King Crimson)

Cheers,

George (your grouchy retired FlexView farmer)

AARP club members:A31p,T43pSF

Abused daily: T61p

Work in progress: X60T

PMs requesting personal tech support will be ignored.

dexterous_21
Posts: 4
Joined: Sat Jan 10, 2015 5:03 am
Location: Manila, Philippines

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#4 Post by dexterous_21 » Sat Jan 10, 2015 12:39 pm

Thanks for the reply ajkula66.

My old X230 lasts 5 hours with RHEL 6.5 and Windows 7 KVM on top. As per Lenovo, battery performance of X240 should be better than X230.

Any thoughts?

Thanks again!

ajkula66
SuperUserGeorge
SuperUserGeorge
Posts: 16347
Joined: Sun Feb 25, 2007 11:28 am
Location: Brodheadsville, Pennsylvania, USA

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#5 Post by ajkula66 » Sat Jan 10, 2015 1:05 pm

dexterous_21 wrote:Thanks for the reply ajkula66.
You're very welcome.
My old X230 lasts 5 hours with RHEL 6.5 and Windows 7 KVM on top. As per Lenovo, battery performance of X240 should be better than X230.

Any thoughts?
I've never worked for Lenovo so I can't speak for them BUT the only way to test the battery life properly as per Lenovo's guidelines would be to install a Windows OS of some kind and check how the battery behaves there. Behaviour in an "alternate" OS is not something they would care about one iota.

Is there a way of telling the battery wear (in percents) through some utility in RHEL?
...Knowledge is a deadly friend when no one sets the rules...(King Crimson)

Cheers,

George (your grouchy retired FlexView farmer)

AARP club members:A31p,T43pSF

Abused daily: T61p

Work in progress: X60T

PMs requesting personal tech support will be ignored.

dexterous_21
Posts: 4
Joined: Sat Jan 10, 2015 5:03 am
Location: Manila, Philippines

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#6 Post by dexterous_21 » Sat Jan 10, 2015 1:26 pm

My colleagues who use X240 with Windows 7 OS would say their batteries last 5-6 hours and I have verified it.

Battery info from battery icon in RHEL shows excellent status upon full charge, but only lasts 2 hours.

RealBlackStuff
Admin Emeritus
Admin Emeritus
Posts: 19497
Joined: Mon Sep 18, 2006 5:17 am
Location: Mt. Cobb, PA
Contact:

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#7 Post by RealBlackStuff » Sat Jan 10, 2015 2:48 pm

Try your battery in that friend's X240 and see how long yours lasts there...
Lovely day for a Guinness! (The Real Black Stuff)

Check out The Boardroom for Parts, Mods and Other Services.

ajkula66
SuperUserGeorge
SuperUserGeorge
Posts: 16347
Joined: Sun Feb 25, 2007 11:28 am
Location: Brodheadsville, Pennsylvania, USA

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#8 Post by ajkula66 » Sat Jan 10, 2015 4:38 pm

dexterous_21 wrote:
Battery info from battery icon in RHEL shows excellent status upon full charge, but only lasts 2 hours.
Does it show battery condition as in wear level or anything along those lines?
...Knowledge is a deadly friend when no one sets the rules...(King Crimson)

Cheers,

George (your grouchy retired FlexView farmer)

AARP club members:A31p,T43pSF

Abused daily: T61p

Work in progress: X60T

PMs requesting personal tech support will be ignored.

ch27
Posts: 21
Joined: Fri Jan 27, 2012 9:14 am
Location: Landenberg, PA

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#9 Post by ch27 » Sat Jan 10, 2015 5:04 pm

It looks like powertop will tell you how many watts each process is using. Probably need to run 'yum install powertop'.
T60p sxga+ FlexView
R50p uxga FlexView
T42 sxga+ FlexView

Dekks
Senior Member
Senior Member
Posts: 554
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platfo

#10 Post by Dekks » Sat Jan 10, 2015 5:47 pm

TP batteries usually perform about 20% less in stock Linux compared to Windows in my experience. You can reduce it by installing TLP & deps if older an older CPU or laptopmodetools if the last 2 Gen Intel CPU's. Then install Thinkfan and powertop.

Run Su Powertop --html, view the printout and change the power settings as required.

Then configure Thinkfan and TLP/LMT as required, googling will help as will archwiki which is a good starting place for that but be prepared to know how to edit text files as root. Thinkfan in particular needs plenty of work to optimise fan speeds. As your running whats considered a server OS then optimise what modules you want to run and shut off those that are not needed.

Also my general rule of thumb is if your CPU temp is approaching 50C under office type loads - not surfing flash websites - then you may need to clean the fan assy and re-apply paste on the heatsinks. I wouldnt expect it your case but if you live with a pack of shedding pets that are heavy smokers you never know ;)
Home Win10/i5 Arch//i3-gaps T61//GNOME 3/X230 Tablet //Spectrwm X61 Bunsenlabs 9.4/X32/X201i
Work - Win7/X220T BunsenLabs 9.4 T60p
Retired T60/X30/X31/X61S RIP R61/T400/T21/T43/X61T/X200T

jaspen-meyer
Senior Member
Senior Member
Posts: 829
Joined: Wed May 19, 2010 11:21 pm
Location: Pardubice, Czech Republic
Contact:

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#11 Post by jaspen-meyer » Tue Dec 08, 2015 7:52 pm

If your cpu is always running at it's max frequency that can eat away at your battery.
A 'cpu governor' needs to be running.

Check the files in these directories:
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0/cpufreq

Paths may be different on RHEL.
T420 i7 3612QM seabios; T420 i7 3630QM; T400 Q9100 seabios; T61 P9600; T60 libreboot; x62; x60s libreboot, led; x24 xiphmont led

axur-delmeria
Senior ThinkPadder
Senior ThinkPadder
Posts: 2000
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#12 Post by axur-delmeria » Tue Dec 08, 2015 10:33 pm

Maybe RHEL 6.5 isn't a good match for your X240. I mean, the kernel is old (2.6.32), among other things.
And as others have suggested, TLP and other power management tools help a lot.
Daily driver: X220 4291-C91 i7-2620M

Backup: X220 4291-P79 i5-2520M
Toy: X60F Core Solo U1300
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod
:cry:

kony
Sophomore Member
Posts: 230
Joined: Wed Aug 28, 2013 4:18 pm
Location: Poland

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#13 Post by kony » Wed Dec 09, 2015 1:26 am

You need to install TLP or other power management as someone already mentioned, Linux distributions don't include them by default or at least I haven't ever seen one that does. With TLP your battery life should be as long as in Windows 7.
My T430 with GTX 560 Ti (Now with GTX 670)
T430: i5-3320m, 8 GB, SSD + HDD, 1600x900.

hhhd1
Junior Member
Junior Member
Posts: 499
Joined: Mon Nov 17, 2014 7:23 pm
Location: Cairo, Egypt

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#14 Post by hhhd1 » Wed Dec 09, 2015 8:37 am

x240 should last for a bit less than 2 hours when under maximum load and maximum brightness.

2 hours means there is either something stressing the laptop to near its limits all the time, or there is something wrong with the batteries (it should have 2 batteries, one internal, and another removable).
===

axur-delmeria
Senior ThinkPadder
Senior ThinkPadder
Posts: 2000
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#15 Post by axur-delmeria » Wed Dec 09, 2015 10:29 am

hhhd1 wrote:x240 should last for a bit less than 2 hours when under maximum load and maximum brightness.

2 hours means there is either something stressing the laptop to near its limits all the time, or there is something wrong with the batteries (it should have 2 batteries, one internal, and another removable).
Alternatively, some components of his Linux distro is not new enough to properly handle the power management features of a Haswell-based machine.

This can be diagnosed by monitoring CPU usage (using top or any other task manager), and power consumption (powertop).
:D
Daily driver: X220 4291-C91 i7-2620M

Backup: X220 4291-P79 i5-2520M
Toy: X60F Core Solo U1300
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod
:cry:

Pokrzept
Sophomore Member
Posts: 186
Joined: Sat Mar 29, 2014 3:45 pm
Location: Lodz, Poland

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#16 Post by Pokrzept » Wed Dec 09, 2015 4:49 pm

OP definitely need to update his kernel and distro at this point. At this moment it is like installing Windows 2000 on a brand new machine. Most of CPUs and power-saving features are inactive due to hella-old kernel.
P70 / W530 / W700 and 30 more :roll:

hhhd1
Junior Member
Junior Member
Posts: 499
Joined: Mon Nov 17, 2014 7:23 pm
Location: Cairo, Egypt

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#17 Post by hhhd1 » Wed Dec 09, 2015 8:48 pm

axur-delmeria wrote:
hhhd1 wrote:x240 should last for a bit less than 2 hours when under maximum load and maximum brightness.

2 hours means there is either something stressing the laptop to near its limits all the time, or there is something wrong with the batteries (it should have 2 batteries, one internal, and another removable).
Alternatively, some components of his Linux distro is not new enough to properly handle the power management features of a Haswell-based machine.

This can be diagnosed by monitoring CPU usage (using top or any other task manager), and power consumption (powertop).
:D
IMO, that is unlikely, 2 hours is way to slow, even if power management is not fully enabled.

I second the use of software like powertop, because it should display rate of discharge of the battery.

with a battery capacity of 47 Wh, a power usage of 23.5w, should give you 2 hours of runtime.
===

evening_hunger
Junior Member
Junior Member
Posts: 264
Joined: Thu Nov 26, 2015 2:55 pm
Location: Normandy, France

Re: Battery drains too fast on X240 Thinkpad RHEL 6.5 platform

#18 Post by evening_hunger » Thu Dec 10, 2015 5:38 am

Linux distributions have abundance of power-control and power-saving software, especially for thinkpads.
Powertop, exposes more than 40 tunables (to a user with admin rights that is). Show me a M$ software that does it. Now, the problem is that with great power, comes great responsibility. In Windows you have zero power (I mean freedom), but you have nearly zero responsbility, as everything has been done for you. And, I admit, has been done wery well! That goes to show the world is not an adventure built upon binary choices.
Okay, enough philosophy:)
Now to get more down to it, you can try (as first step) obviously:
$acpi -V
which will yield as standard something like this:

Code: Select all

Battery 0: Unknown, 83%
Battery 0: design capacity 7115 mAh, last full capacity 3528 mAh = 49%
Adapter 0: on-line
Thermal 0: ok, 47.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 99.0 degrees C
Cooling 0: x86_pkg_temp no state information available
Cooling 1: LCD 15 of 15
Cooling 2: intel_powerclamp no state information available
Cooling 3: Processor 0 of 10
Cooling 4: Processor 0 of 10
Cooling 5: Processor 0 of 10
Cooling 6: Processor 0 of 10
That's a prequsite if we're gonna have any serious conversation about battery usage in linux. Then, using tp_smapi (a module available e.g. in Debian) one can get even more knowledge. For example, realtime data of power drain per battery:

Code: Select all

# tail -f /sys/devices/platform/smapi/BAT0/power_now 
-10773 mW -906 mA
-10773 mW -906 mA
-10773 mW -906 mA
-10985 mW -922 mA
-10985 mW -922 mA
-10985 mW -922 mA
and so on. It is also posible to set custom thresholds for battery charging to prolong its life (e.g. avoid charging the battery to 100%, stop at say 90% and only go up to 100% when preparing for a long flight...). tp_smapi also exposes an utter mountain of data concerning the battery (the make, date of first use, software version... )

All in all, there is a bunch of toys and the way is paved.
x320/i7-2620M/8GB/256gb.ssd/FHD13.3''IPS/debian_testing (main driver)
x230/i5/8GB/500gb.hdd+256gb.m2ssd/IPS/debian_stable+win7 (better half)

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 29 guests