2

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

Qasim
  • 22,162
Eray
  • 1,820

2 Answers2

1

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

Qasim
  • 22,162
0

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.

Alex
  • 1,508
  • 6
  • 16
  • 29