Ubuntu – Specific short battery life problem with Sony VAIO laptop

12.04batteryvaio

(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.


Details

(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.

Best Answer

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.

 #!/bin/sh

 # 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;
 done

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

 else

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

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

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

 fi

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

Related Question