Bug 115030 - Battery not properly detected
Summary: Battery not properly detected
Status: VERIFIED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Mobile Devices (show other bugs)
Version: Beta 3
Hardware: x86-64 All
: P5 - None : Major
Target Milestone: ---
Assignee: Holger Macht
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-02 17:48 UTC by Beau Steward
Modified: 2007-06-05 10:01 UTC (History)
2 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Output of lshal command (90.88 KB, text/plain)
2005-09-02 18:47 UTC, Beau Steward
Details
cat_bat file from shell one liner (803 bytes, text/plain)
2005-09-02 18:48 UTC, Beau Steward
Details
messages log showing output of verbose haldaemon (1.03 KB, text/plain)
2005-09-03 06:20 UTC, Beau Steward
Details
hal log (327.73 KB, text/plain)
2005-09-03 16:50 UTC, Beau Steward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beau Steward 2005-09-02 17:48:34 UTC
I am running Suse 10.0 Beta 3 on a HP Pavilion ZE2000z. Mainboard is ati  
radeon xpress 200m and cpu is amd turion 64 ml-30.  
  
It appears that the battery is not being set up as powersaved is expecting it  
to be. I've read through other bug reports with references to BAT0  
in /proc/acpi/battery, but I don't have this. Instead, I have a BAT1.  
Powersaved is reporting that my battery is not being detected and I suspect  
it's not even attempting to look at BAT1 as it is reporting battery status  
just fine. Unpluggin ac results in the system warning me there is no battery 
life remaining and so acpi becomes rather useless for battery management.
Comment 1 Danny Al-Gaaf 2005-09-02 18:27:25 UTC
please add this outputs (and please also try Beta4): 
- powersave -B
- lshal

and the file generated by this command:
for F in `find /proc/acpi/battery/* -type f`; do echo "File:$F" >> cat_bat; cat 
$F >> cat_bat ;  done;
Comment 2 Beau Steward 2005-09-02 18:47:20 UTC
Created attachment 48641 [details]
Output of lshal command
Comment 3 Beau Steward 2005-09-02 18:48:02 UTC
Created attachment 48642 [details]
cat_bat file from shell one liner
Comment 4 Beau Steward 2005-09-02 18:48:58 UTC
I've attached cat_bat and the output of lshal. Below is from powersave -B:

linux:~ # powersave -B
Battery: error.
AC is online.
Battery0: 0
Comment 5 Forgotten User ZhJd0F0L3x 2005-09-02 19:41:29 UTC
Danny: "present voltage: unknown" might confuse hal?
suspicious items:
  battery.charge_level.current = 0  (0x0)  (int)
this might come from "unknown voltage == 0" and multiplying with the voltage in
the calculation. We love Richard ;-)

Beau: please try "time cat /proc/acpi/battery/BAT1/*", maybe this takes
excessively long (more than, say, 0.5 seconds), which would lead to bug #113056.

I think this might be a duplicate of bug #113056, so you should maybe try the
ec_burst options mentioned there.
Comment 6 Beau Steward 2005-09-02 19:50:27 UTC
I didn't notice it being excessive when I was browsing around and checking
various things, such as this. That report stats it's taking multiple seconds to
check a single file there, but checking all three reports:

real    0m0.721s
user    0m0.000s
sys     0m0.036s

I will go ahead and try the ec_burst option and see what happens.
Comment 7 Forgotten User ZhJd0F0L3x 2005-09-02 19:55:07 UTC
700msec might be too long for hal (i am not familiar with it), but the "voltage
unknown" will more likely confuse it (this is a case that nobody has considered
yet, i suppose). Danny will tell us more about HAL :-)

Thanks for the report, this is something we did not encounter on our test machines.
Comment 8 Beau Steward 2005-09-02 20:07:40 UTC
Using ec_burst=0 did bring the time down (to <120 ms), but it did not fix the
battery problem. lshal appears to report similar values which you had described
as possibly problematic.

One thing I have noticed with ec_burst=0 is that the laptop responds a lot
faster when changing ac state (unplugging and plugging back in).
Comment 9 Danny Al-Gaaf 2005-09-02 20:18:58 UTC
The time is no problem. This worked also with machines which needed much more 
time for this. This should work.

But the bug is really strange! Could you please do this:

- Change line in /etc/init.d/haldaemon:
  from:
    HALDAEMON_PARA="--daemon=yes --retain-privileges";
  to:
    HALDAEMON_PARA="--daemon=yes --retain-privileges --verbose=yes";

- restart hal with rchal restart
- wait 10 seconds
- unplug the AC adapter
- wait 30 seconds
- insert the AC adapter
- wait 10 seconds

Now attach your /var/log/messages since the last boot or since the HAL restart.
Comment 10 Danny Al-Gaaf 2005-09-02 20:22:20 UTC
to #5: the unknown voltage should not be problem, but you found the point of 
problem ;-) R.

No jokes more! The problem: the voltage should also in this code be never 0. If 
unknown HAL should use there the design voltage value. But wait for the log.
Comment 11 Danny Al-Gaaf 2005-09-02 20:25:00 UTC
other question to reporter: what say "ps aux | grep acpi" ?
Comment 12 Beau Steward 2005-09-03 06:19:41 UTC
Here is ps aux | grep acpi:

linux:~ # ps aux | grep acpi
root         7  0.0  0.0      0     0 ?        S<   Sep02   0:04 [kacpid]
root      4768  0.0  0.1   2572   592 ?        Ss   Sep02   0:00 /usr/sbin/acpid
root      5143  0.0  0.4  14292  2300 ?        S    Sep02   0:07
/usr/sbin/powersaved -d -f /var/run/acpid.socket -v 3
root     12972  0.0  0.1   5960   776 ?        S    01:13   0:00 hald-addon-acpi
root     13061  0.0  0.1   2920   680 pts/5    R+   01:18   0:00 grep acpi
linux:~ #

Attachment coming up with messages log from verbose haldaemon.
Comment 13 Beau Steward 2005-09-03 06:20:34 UTC
Created attachment 48678 [details]
messages log showing output of verbose haldaemon
Comment 14 Danny Al-Gaaf 2005-09-03 11:59:45 UTC
hm ... my mistake. Please do this:

- stop hal (with 'rchal stop')
- hald --verbose=yes --daemon=no --retain-privileges > /tmp/hal_log 2>&1
- wait 10 seconds
- unplug the AC adapter
- wait 30 seconds
- insert the AC adapter
- wait 10 seconds

attach the file /tmp/hal_log to the bug
Comment 15 Beau Steward 2005-09-03 16:50:22 UTC
Created attachment 48703 [details]
hal  log
Comment 16 Beau Steward 2005-09-03 16:57:42 UTC
I was finally able to download beta 4 (most mirrors have incomplete files) so I
am going to try a fresh install.
Comment 17 Danny Al-Gaaf 2005-09-03 17:24:47 UTC
As I realised that you used a Beta 3: This should be fixed already in Beta4. 
Please retry.
Comment 18 Beau Steward 2005-09-03 18:07:42 UTC
I apologize. I've been trying to get beta 4 since the 1st. It is in fact fixed
in beta4. I'm in the process of checking the other bugs I submitted, one of
which still looks unresolved.
Comment 19 Holger Macht 2005-09-03 18:24:42 UTC
Therefore setting to fixed...