Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

(I'm using Ubuntu 12.04 LTS 64 Bit)

I have some problems with my laptop's (Sony VAIO VPC-F22S1E) battery . It's fullly charging about 3-4 hours (while using) and 2-3 hours (when shutdowned) . And it's duration is only 1-2 hours . After 2 hours using, it's completely empty (actually i'm praising, if it longer for 2 hours). Also, i'm checking Ubuntu's remaining battery time panel,

enter image description here

As you see, it says 1 hour 39 minutes. But when i check it 10 minutes later, it's 1 : 09 , and 20 minutes later 1 : 35 . As you see, it's very unstable.

I went to Sony's technical service. They measure somethings and tell me "battery's all values are normal, there is no problem with your battery" . This is my battery details :

enter image description here enter image description here

I'm not sure why there is a problem.


(command > results of command)

lspci | grep VGA > 01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1)

My PC usage details

  1. I'm not playing games on my PC (seriously)
  2. I'm a web developer, and always working with text editors (Sublime Text 2)
  3. Apache2 web server always online on my computer, but i'm not sure how much battery using
  4. Bluetooth always disabled .
  5. I'm using Wireless network connection, always.

(please comment, if you need other details)

What i need ?

  1. Advices for finding problem with my battery
  2. Finding my battery drainer applications, and kill them.
  3. Advices for charging (for example, should i use voltage protected power socket? and Shouldn't i use my computer while charging it)

Why it's NOT duplicated with other questions.

Because every computer user different, installed different applications, using at different places and users have different computer knowledge (I'm not a Linux expert because of this i need step by step answers , generally).

Done a quick search but couldn't find any enough information about my problem. Beause of this, i'm asking this question. Please don't tell me "IT's duplicated with blah blah blah , close this question !" .

Thank you :)

About (Sony VAIO VPC-F22S1E)

The graphics chip, HD Graphics 3000, in the processor is disabled (no Nvidia Optimus). The Geforce GT 540M can therefore not be disabled.

share|improve this question
what is your graphics card? is it nvidia optimus/ hybrid graphics enabled laptop? if you are not sure, post result of lspci | grep VGA. The battery reading is not unstable, it is like that. You open up processor intensive application (or start extra hardware like wifi), battery will drain quickly. Close that application it will show increased time. That's normal accross all OS/devices. –  Web-E Aug 26 '12 at 15:58
@Web-E, thank you. Please check Details section of my question. –  Eray Aug 26 '12 at 16:01
Secondly your battery capacity is reduced to 85%. It can't hold charge as it was at first time. On each recharge life cycle some cells in lithium ion battery dies. Thus reducing capacity. about update: Nvidia 540m is generally a optimus enabled GPU.Notsure why you are having only one entry in lspci. If it has optimus use bumblebee –  Web-E Aug 26 '12 at 16:06
I've read your comment and details edit here and edited my answer to highlight the section about Bumblebee. If you have a GeForce 540M card active on your machine, that is no doubt responsible for some power drain. –  Alex Aug 26 '12 at 16:08
@Web-E , On each recharge life cycle some cells in lithium ion battery dies what do you mean with recharge life cycle exactly ? Notsure why you are having only one entry in lspci. If it has optimus use bumblebee and? :) –  Eray Aug 26 '12 at 16:08

2 Answers 2

Do the following steps and i hope your laptop battery consumption will be better

powerstat: Power Consumption Calculator for Ubuntu Linux

sudo apt-add-repository ppa:colin-king/powermanagement
sudo apt-get update
sudo apt-get install powerstat

After that checking you power comsumption

sudo powerstat

Check the output mine was around 16 to 18 Watts

Now making battery life better

 sudo apt-get install ethtool

Put the given below in rc.local before exit 0

sudo nano /etc/rc.local

rfkill block bluetooth
ethtool -s eth0 wol d
exit 0

This save around 1 to 2 watts battery.

Install power top and check its suggestion ( Optional )

After that saving real battery consumption

 sudo gedit /etc/pm/power.d/power

and paste the following lines in it.


 # Shell script to reduce energy consumption when running battery. Place
 # it in /etc/pm/power.d/ and give execution rights.

 if on_ac_power; then

 # Start AC powered settings --------------------------------------------#

 #NMI watchdog should be turned on
 for foo in /proc/sys/kernel/nmi_watchdog;
 do echo 1 > $foo;

 # CPU Governor: Performance
 for foo in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
 do echo performance > $foo;
 # End AC powered settings ----------------------------------------------#


 # Start battery powered settings ---------------------------------------#

 #NMI watchdog should be turned on
 for foo in /proc/sys/kernel/nmi_watchdog;
 do echo 0 > $foo;

 # Select Ondemand CPU Governor
 for foo in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
 do echo ondemand > $foo;
 # End battery powered settings -----------------------------------------#


Save and Exit & Now you need to assign execution permission of power script

 sudo chmod +x /etc/pm/power.d/power

After that

 cd /usr/lib/pm-utils/power.d
 sudo cp anacron /etc/pm/power.d/
 sudo cp intel-audio-powersave /etc/pm/power.d/
 sudo cp laptop-mode /etc/pm/power.d/
 sudo cp sata_alpm /etc/pm/power.d/
 sudo cp sudo cp /etc/pm/power.d/ /etc/pm/power.d/

Disabling ‘Wake On LAN’ in Ubuntu might save a Tiny Bit of Power on your Laptop

 sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/power.d/
 gksudo gedit /usr/lib/pm-utils/power.d/disable_wol

Once opened locate a code called ‘wol g’ (you can search for it in the editor) as shown below then simply change the letter ‘g’ to ‘d’. enter image description here

After that you can see the pic below my battery life after full recharged. 5 Hours 25 Mints enter image description here

After that reboot your laptop and after fully charged check the battery life and run again power stat

 sudo powerstat

I hope it will be better now

Now mine is

Summary: 10.86 Watts on Average with Standard Deviation 1.07

share|improve this answer
Can you tell me why we are installing ethtool and doing some modifications on /etc/rc.local ? –  Eray Mar 31 '13 at 17:58
rfkill block bluetooth > this will disable blue tooth from activating and you can still activate it by enabling blue tooth from blue tooth panel icon. ethtool -s eth0 wol d < and this will disable wakeup on lan feature which probably no one use it. so it save power consumption around 1 to 2 watts, i hope you understand my point –  Qasim Mar 31 '13 at 18:05

Install PowerTop. You can run it for a while when your laptop is unplugged and it should give you a rough estimate of where your energy is going.

Edit; especially note this part: I've also noticed that (according to your link, unless I am mistaken) your laptop comes with a GeForce GT540M GPU installed. Dedicated graphics cards can be quite a power drain on laptops. Many laptops with dedicated GeForce cards use the NVIDIA Optimus driver to switch between the built in GPU (usually Intel HD3000 or something). You'll know this is the case if you have a switch on your laptop to disabled/enable the dedicated graphics card. Since this driver doesn't work for Linux, it is possible that your computer is for some reason running the dedicated graphics by default. You can simulate the effects of Optimus and thus ensure you are using your lower power processor with Bumblebee.

Also, make use of Ubuntu's laptop-mode setting, which will throttle unnecessary processes when you run on battery. Try installing apps like Granola and Jupiter to save your power (I found the latter to be somewhat useless, however).

It is also possible that your laptop's specs are a bit tall for the battery. The link you posted says your laptop has an i7 processor and a 16.4 inch display, both of which will require more power to run fully. Programs such as laptop-mode and Granola may be able to throttle your processor usage (I'm not sure about that), and reducing your screen resolution could save a tiny bit of power.

Also, to state the obvious, make sure your battery is decently new (if it's old, it could just be dying). In terms of charging, there isn't a whole lot you can do to help. It used to be that batteries could suffer from "overcharging", but modern batteries employ built-in switches to stop charging just below 100%. Just start by using PowerTOP to find out what the culprit processes are and work from there.

share|improve this answer
I just installed Bumblebee and restart my computer. Result : 640*480 screen resolution and this error : none of the selected modes were compatible with the possible modes: Trying modes for CRTC 310 CRTC 310: trying mode 640x480@73Hz with output at 1920x1080@51Hz (pass 0) CRTC 310: trying mode 640x480@73Hz with output at 1920x1080@51Hz (pass 1) –  Eray Aug 26 '12 at 17:06
and result of sudo bumblebeed is [ 9553.465399] [ERROR]No Optimus system detected, quitting. –  Eray Aug 26 '12 at 17:08
i solved that problem, and remove comments about that. Btw, i have an option on BIOS screen, something like Intel Accelerated Graphic ... . Is it means integrated graphic ? –  Eray Aug 26 '12 at 23:37
I did some more reading on the link you sent me - which I should have done in the first place - and it states that it does not feature NVIDIA Optimus and that the Intel HD3000 integrated graphics are, for some bizarre reason, disabled permanently. Sorry, but it looks like you'll have to let your GeForce card run. Still, try to use PowerTOP to see what exactly is costing so much battery life. –  Alex Aug 27 '12 at 1:14
this is results of PowerTOP : i.imgur.com/qMAVp.png I'm not sure, how can i read this results. –  Eray Aug 27 '12 at 13:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.