Bugzilla – Bug 113056
Battery status can't be detected
Last modified: 2006-02-13 16:25:34 UTC
The battery status can't be detected properly with beta3 kernel on my laptop AVERATEC AV3360. kpowersave shows correctly whether the cable is plugged or not, but it shows either battery 1% or else. Did work fine with beta2.
Strange. Any idea, Thomas?
please add output of lshal.
Created attachment 47659 [details] Output of lshal
Can you also please post the output of /proc/acpi/battery/*/state and /proc/acpi/battery/C1B3/info ?
Created attachment 47741 [details] /proc/acpi/battery/BAT0/info
Created attachment 47742 [details] /proc/acpi/battery/BAT0/state
The proc directory is only /proc/acpi/battery/BAT0, not C1B3. I found the following warnings/errors in syslog: [powersave]: WARNING (initHal:59) could not init hal library: (null) [powersave]: ERROR (getBatteryDetailedInfo:50) Could not get list of batteries in system: The name org.freedesktop.Hal was not provided by any .service files The last one is repeated 4 times. Also, I found that the battery status was once displayed correctly somehow. But after reboot, it's broken again.
Of course I ment the battery in your system below /proc/acpi/battery/BAT0, sorry, my fault. state and info file seems ok. So once again, connection to hal seems to be the problem. But maybe the above mentioned warning and error was during booting, which is known and not critical. Can you please rcpowersaved stop, rchal stop, rchal start wait a second and rcpowersaved start? After that: Does /var/log/messages tell anything suspicious? Is powersave -b and powersave -d showing somehow correct values now?
The stop -> start procedure helps. Now kpowersave shows the correct status. I see warnings: [powersave]: WARNING (filter_function:250) Received message from invalid interface (repeated twice)
So I have no clue at the moment what went wrong. Please try again with beta 4. It is also possible that it lasts up to 2 Minutes after boot until the correct information is available.
I found /proc/acpi/battery/BAT0/status shows also incorrect values. So, the problem might be in ACPI kernel support. Nevertheless, reading info and status proc files takes 2 seconds (for each). Is it normal?
no, please try ec_burst={0,1} and see if it makes a difference. This is an ACPI problem.
ec_burst=0 seems better for reading proc files.
The status is shown correclty after booting with ec_burst=0. So, this looks like the culprit.
I have a similar problem with a notebook HP Omnibook 6100, 1 Ghz After plug off the indicator from kpowersave does´nt changed to battery status. After 10 minutes I started kpowersave and changed "SetCPU Frequence Policy" from "Dynamic" to "Performance". After approx. 2 minutes the indicator changed to status battery with showing 95%. This status does´nt changed over testing 15 minutes. After coldstart the status of the battery was 74%. After plug in the indicator changed to plugged and battery loading and changed to 80% and will never show more. After a next cold start the status was 95%. In logfile messages I can find some errors like: Aug 31 08:27:30 linux [powersave]: ERROR (getBatteryDetailedInfo:50) Could not get list of batteries in system: The name org.freedesktop.Hal was not provided by any .service files /proc/acpi/battery/BAT0/status was already identical to kpowersave information
ec_burst=0 is still required on beta4, too.
Ok. I do not really know to whom to assign this bug then. Taking trenn, he surely knows more... ;-)
Is this one still valid? There was an enhancement of ec_burst mode in RCx (irqs not disabled any more). Can you retry without ec_burst mode param, please.
Well, it seems becoming worse after RC1. On 2.6.13-8 (RC1) kernel, ec_burst=0 works. time cat /proc/acpi/battery/BAT0/state -> 0.06sec On 2.6.13-15 (final), regardless of ec_burst=0 or not, it results in 0.5 to 1.4 sec per read...
Still the case with 10.1 Beta3 or even with a KOTD?
The latest kernel seems working fine. Thanks.