On Mon, 19 March 2012 12:59:59 -0400, Jörn Engel wrote:
> 
> It looks as if gkrellm is using the wrong sysfs files in the bad case.
> /sys/class/power_supply/BAT0/energy_full does not exist on my system
> and therefore things shouldn't have worked before suspend either.
> Which seems to imply that logs don't quite match actual behaviour.
> 
> But after looking at src/sysdeps/linux.c, this looks more like a case
> of sysfs files being changed across suspend.  I haven't caught it in
> the act yet, though.

And bingo.  After suspend gkrellm lost the battery again.  And this
time I see:
# ll /sys/class/power_supply/BAT0/
total 0
-rw-r--r-- 1 root root 4096 Mar 19 20:17 alarm
-r--r--r-- 1 root root 4096 Mar 19 20:17 cycle_count
lrwxrwxrwx 1 root root    0 Mar 19 20:17 device -> ../../../PNP0C0A:00
-r--r--r-- 1 root root 4096 Mar 19 20:17 energy_full
-r--r--r-- 1 root root 4096 Mar 19 20:17 energy_full_design
-r--r--r-- 1 root root 4096 Mar 19 20:17 energy_now
-r--r--r-- 1 root root 4096 Mar 19 20:17 manufacturer
-r--r--r-- 1 root root 4096 Mar 19 20:17 model_name
drwxr-xr-x 2 root root    0 Mar 19 20:17 power
-r--r--r-- 1 root root 4096 Mar 19 20:17 power_now
-r--r--r-- 1 root root 4096 Mar 19 20:16 present
-r--r--r-- 1 root root 4096 Mar 19 20:17 serial_number
-r--r--r-- 1 root root 4096 Mar 19 20:16 status
lrwxrwxrwx 1 root root    0 Mar 19 20:16 subsystem -> 
../../../../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Mar 19 20:17 technology
-r--r--r-- 1 root root 4096 Mar 19 20:16 type
-rw-r--r-- 1 root root 4096 Mar 19 20:16 uevent
-r--r--r-- 1 root root 4096 Mar 19 20:17 voltage_min_design
-r--r--r-- 1 root root 4096 Mar 19 20:17 voltage_now

So I have proven that my systen can switch between energy_full and
charge_full or vice versa across suspend.  Which pretty much means bad
news to everyone involved.  The kernel should get fixed to stop such
ludicrous behaviour.  And gkrellm should probably also get patched to
work in the presence of broken kernels, as they are simply a fact of
life now.

I'll see if I can cook up a patch to gkrellm.

Jörn



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to