You are not logged in.

#1 2012-08-05 15:33:07

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Unable to monitor battery

I'm running Arch Linux with KDE on an older laptop (circa 2007) in which my battery life is literally about 10 minutes. I am trying to get KDE to monitor my battery life but have been unsuccessful. I am studying this documentation: https://wiki.archlinux.org/index.php/La … _Utilities

1.) For some reason, running the acpid daemon causes hitting the Power button on the laptop to do an immediate shutdown despite in System Settings I have chosen it to prompt me what to do. If I stop acpid, the button works as I have configured.

2.) Even with acpid running, the System Tray -> Battery Monitor always says the battery is not present so I cannot monitor it. Even if I unplug and run on battery only, it doesn't find it.


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#2 2012-08-05 17:41:12

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: Unable to monitor battery

You are not supposed to run acpid with desktop environments. DE's usually have their own power management and they conflict which is probably what's causing the unexpected behavior.

Offline

#3 2012-08-05 18:30:18

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to monitor battery

Thanks for the tip; I did not know that. Is there anything special in KDE I need to do to get it to read my battery?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#4 2012-08-05 19:05:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: Unable to monitor battery

Take a look in your /sys directory for the following:

ewaller@odin:/sys/class/power_supply 1014 %ls -l /sys/class/power_supply/BAT0/
total 0
-rw-r--r-- 1 root root 4096 Aug  5 12:00 alarm
-r--r--r-- 1 root root 4096 Aug  5 10:47 charge_full
-r--r--r-- 1 root root 4096 Aug  5 10:47 charge_full_design
-r--r--r-- 1 root root 4096 Aug  5 10:47 charge_now
-r--r--r-- 1 root root 4096 Aug  5 10:47 current_now
-r--r--r-- 1 root root 4096 Aug  5 12:00 cycle_count
lrwxrwxrwx 1 root root    0 Aug  5 12:01 device -> ../../../PNP0C0A:00
-r--r--r-- 1 root root 4096 Aug  5 10:46 manufacturer
-r--r--r-- 1 root root 4096 Aug  5 10:47 model_name
drwxr-xr-x 2 root root    0 Aug  5 12:00 power
-r--r--r-- 1 root root 4096 Aug  5 10:47 present
-r--r--r-- 1 root root 4096 Aug  5 10:47 serial_number
-r--r--r-- 1 root root 4096 Aug  5 10:47 status
lrwxrwxrwx 1 root root    0 Aug  5 10:46 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Aug  5 10:47 technology
-r--r--r-- 1 root root 4096 Aug  5 10:46 type
-rw-r--r-- 1 root root 4096 Aug  5 10:45 uevent
-r--r--r-- 1 root root 4096 Aug  5 10:47 voltage_min_design
-r--r--r-- 1 root root 4096 Aug  5 10:47 voltage_now
ewaller@odin:/sys/class/power_supply 1015 %

You must include the last / in that command because the directory is a link.  Do those files exist?  Do they contain anything interesting?  Especially present  ??

ewaller@odin:/sys/class/power_supply 1015 %cat /sys/class/power_supply/BAT0/present 
1
ewaller@odin:/sys/class/power_supply 1016 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#5 2012-08-05 19:26:15

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to monitor battery

I do see an output similar to that, so my battery seems to be found by the KDE system tray.

[root@arch ~]# ls -l /sys/class/power_supply/BAT0/
total 0
-rw-r--r-- 1 root root 4096 Aug  5 15:23 alarm
-r--r--r-- 1 root root 4096 Aug  5 15:23 charge_full
-r--r--r-- 1 root root 4096 Aug  5 15:23 charge_full_design
-r--r--r-- 1 root root 4096 Aug  5 15:23 charge_now
-r--r--r-- 1 root root 4096 Aug  5 15:23 current_now
-r--r--r-- 1 root root 4096 Aug  5 15:23 cycle_count
lrwxrwxrwx 1 root root    0 Aug  5 15:23 device -> ../../../PNP0C0A:00
-r--r--r-- 1 root root 4096 Aug  5 09:11 manufacturer
-r--r--r-- 1 root root 4096 Aug  5 15:23 model_name
drwxr-xr-x 2 root root    0 Aug  5 15:23 power
-r--r--r-- 1 root root 4096 Aug  5 15:23 present
-r--r--r-- 1 root root 4096 Aug  5 15:23 serial_number
-r--r--r-- 1 root root 4096 Aug  5 15:23 status
lrwxrwxrwx 1 root root    0 Aug  5 09:11 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Aug  5 15:23 technology
-r--r--r-- 1 root root 4096 Aug  5 09:11 type
-rw-r--r-- 1 root root 4096 Aug  5 09:11 uevent
-r--r--r-- 1 root root 4096 Aug  5 15:23 voltage_min_design
-r--r--r-- 1 root root 4096 Aug  5 15:23 voltage_now
[root@arch ~]# cat /sys/class/power_supply/BAT0/present 
1
[root@arch ~]# 

Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#6 2012-08-05 19:38:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: Unable to monitor battery

I am not sure what is going on.  Let me think on it...
I do note that you are logged in as root.  Please verify that you are not running KDE as root, but rather as a normal user.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#7 2012-08-05 20:27:52

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to monitor battery

I am logging into KDE as a non-root user, in my terminal I just su'd to root to install some packages. Here is what I see in the KDE System Tray.

batterymonitor.png


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#8 2012-08-07 23:05:27

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to monitor battery

I did some more studying and playing around with things but nothing seems to work. This is especially a problem for me as the battery is old and literally lasts about 10 minutes, so if I unplug to move, I want to track the battery's life. Does anyone have any ideas on this?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#9 2012-08-08 04:10:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: Unable to monitor battery

I am perplexed.  Take a look at some of the files we discussed and see if there are any clues in there.  Any mention of the battery in dmesg or the logs?

ewaller@odin:~[1] 1009 %cat /sys/class/power_supply/BAT0/*    
0
4111000
4400000
4111000
0
0
cat: /sys/class/power_supply/BAT0/device: Is a directory
Hewlett-Packard
Primary
cat: /sys/class/power_supply/BAT0/power: Is a directory
1

Full
cat: /sys/class/power_supply/BAT0/subsystem: Is a directory
Li-ion
Battery
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Full
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000
POWER_SUPPLY_VOLTAGE_NOW=12482000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CHARGE_FULL_DESIGN=4400000
POWER_SUPPLY_CHARGE_FULL=4111000
POWER_SUPPLY_CHARGE_NOW=4111000
POWER_SUPPLY_MODEL_NAME=Primary
POWER_SUPPLY_MANUFACTURER=Hewlett-Packard
POWER_SUPPLY_SERIAL_NUMBER=
10800000
12482000
ewaller@odin:~[1] 1010 %ls /sys/class/power_supply/BAT0/
alarm        charge_full_design  current_now  device        model_name  present        status     technology  uevent              voltage_now
charge_full  charge_now          cycle_count  manufacturer  power       serial_number  subsystem  type        voltage_min_design
ewaller@odin:~ 1011 %

Also (just checking) are you fully up to date? (Pacman -Syu)  Are you running testing?

Edit:
In what groups are you  ?

ewaller@odin:~ 1003 %groups
sys lp wheel log http mpd games dbus avahi network video audio scanner power users vboxusers
ewaller@odin:~ 1004 %

Last edited by ewaller (2012-08-08 04:13:16)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#10 2012-08-10 21:19:39

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to monitor battery

Here's the output of that command. Things seem OK to me...

cat: /sys/class/power_supply/BAT0/device: Is a directory

PA3399U-2BAS/BRS
cat: /sys/class/power_supply/BAT0/power: Is a directory
1
60BA
Unknown
cat: /sys/class/power_supply/BAT0/subsystem: Is a directory
Li-ion
Battery
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=15000000
POWER_SUPPLY_VOLTAGE_NOW=15000000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CHARGE_FULL_DESIGN=256000
POWER_SUPPLY_CHARGE_FULL=256000
POWER_SUPPLY_CHARGE_NOW=266000
POWER_SUPPLY_MODEL_NAME=PA3399U-2BAS/BRS
POWER_SUPPLY_MANUFACTURER=
POWER_SUPPLY_SERIAL_NUMBER=60BA
15000000
15000000

I frequently run "pacman -Syu" to stay updated.

I'm in the following groups:

lp wheel games network video audio optical storage scanner power users

Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

Board footer

Powered by FluxBB