Article ID : S500026395 / Last Modified : 11/04/2018

How to measure battery life performance on Linux operating system?

How to measure battery life performance on Linux operating system?

Applicable Products and Categories of This Article

Download Version 1.0.9, extract bltk.1.0.9.tar.gz and get the file bltk.1.0.9.tar. Copy bltk.1.0.9.tar to /home.

Click Start -> System -> Terminal and run the command below.
[username@username-host ~]#tar -xvf bltk.1.0.9.tar
[username@username-host ~]#cd bltk
[username@username-host bltk]#make
[username@username-host bltk]#cp bin/* /bin/
[username@username-host bltk]#cp lib/libxse.so /usr/lib/ ; ln -s /usr/lib/libxse.so /usr/lib/libxse.so.0

Test Environment

  1. Close all applications before testing.
  2. Remove all external devices (e.g.USB Mouse, Keyboard, LAN wire).
  3. Launch Mozilla Firefox application, confirm all the terms and close it.
  4. Switch off the wireless.
  5. Fully charge the battery.
  6. Turn off the screen saver.
  7. Follow the steps below to stop command crond.
    [username@username-host ~]#systemctl stop crond.service
     
  8. Close battery warning message.
    1. [username@username-host ~]#sudo killall upowerd
    2. Right click the battery icon at the right corner, select Battery Monitor Settings. On left side, choose the Advanced Settings.
    3. Click Configure Notifications button.
    4. For the options below, please uncheck Play a sound and Show a message in a popup.
      • Low Power
      • Battery at warning level
      • Battery at critical level
      • Performing a suspension job
    5. Click OK after finishing all setting.
       
    6. Go back to Battery Monitor Settings, select the Energy Saving on the left side.
    7. Switch to On Low Battery tab and uncheck Display Brightness, Dim Display, Screen Energy Saving, Suspend Session.
       
  9. Turn off all networks.
    [username@username-host ~]# sudo systemctl stop NetworkManager.service (Beware of case)
     
  10. Set the brightness as minimal level.
  11. Press Fn + F5/F6 to set the brightness as minimal level.

Start Testing 
[username@username-host ~]#cd bltk
[username@username-host bltk]#sudo bltk –R
If your AC adaptor is connected, it is suggested that you plug it off. Be sure not to do any processing on your computer. The test would continue and your computer will automatically power off. Plug on the AC adaptor and restart the computer.

Test Report 
After back to desktop, click Start>System>Terminal and run the command below.
[username@username-host ~]#cd bltk
[username@username-host  bltk]# ./bltk_report reader.results
The system would create reporter file as “Report.txt” under /home/”username”/bltk/reader.results.