Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#23834 - [upower] [kernel26] System claims no battery is present, but it is!

Attached to Project: Arch Linux
Opened by Jeremy LaCroix (jlacroix) - Monday, 18 April 2011, 21:08 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 16 February 2012, 17:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Ionut Biru (wonder)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
I have a Latitude E6410 laptop with KDE 4.6 installed on 64-bit Arch. Sometimes KDE's power management widget (by the clock) will show the battery as empty with a little red x on it, and when you click on it, it will show "battery not present," even when I'm actually running on the battery. Other times I boot up and it's fine, it seems to happen one out of every three boots.

I attached the output of "cat /proc/acpi/battery/BAT0/state" while this issue is happening.

Additional info:
If it matters, I also attached my rc.conf in case I did something wrong. Note that I do not have this problem when testing other distributions, if that means anything.

Steps to reproduce:
1.) Start up the computer
2.) Log in
3.) If the battery shows as present, great. If not, reboot again and again until it shows up.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 16 February 2012, 17:53 GMT
Reason for closing:  Upstream
Comment by Jeremy LaCroix (jlacroix) - Monday, 18 April 2011, 21:10 GMT
And here is a screenshot.
Comment by Andrea Scarpino (BaSh) - Tuesday, 19 April 2011, 00:08 GMT
please run:
$ solid-hardware query 'IS Battery'
Comment by Jeremy LaCroix (jlacroix) - Tuesday, 19 April 2011, 01:34 GMT
Here is what I get:

Object::connect: No such signal QDBusAbstractInterface::Changed()
udi = '/org/freedesktop/UPower/devices/battery_BAT0'
Comment by Jeremy LaCroix (jlacroix) - Tuesday, 26 April 2011, 21:48 GMT
Update: Still not working with all updates. I tried the "solid-hardware query 'IS Battery'" command as suggested on Kubuntu (which doesn't have this bug at all, same kernel and KDE version) and the output is exactly the same as I wrote above.
Comment by Andrea Scarpino (BaSh) - Wednesday, 27 April 2011, 10:27 GMT
please paste the output of
$ solid-hardware details '/org/freedesktop/UPower/devices/battery_BAT0'
Comment by Jeremy LaCroix (jlacroix) - Wednesday, 27 April 2011, 13:38 GMT
udi = '/org/freedesktop/UPower/devices/battery_BAT0'
parent = '' (string)
vendor = '' (string)
product = '' (string)
description = '' (string)
Comment by Andrea Scarpino (BaSh) - Wednesday, 27 April 2011, 13:51 GMT
That isn't good. UPower doesn't recognize your battery, I don't know if this could be related to the kernel too.

That's an example of what you should get:
udi = '/org/freedesktop/UPower/devices/battery_BAT1'
parent = '/org/freedesktop/UPower' (string)
vendor = 'SANYO' (string)
product = 'PA3593U-1BRS' (string)
description = 'Lithium Ion Battery' (string)
Battery.plugged = true (bool)
Battery.type = 'PrimaryBattery' (0x3) (enum)
Battery.chargePercent = 100 (0x64) (int)
Battery.rechargeable = true (bool)
Battery.chargeState = 'NoCharge' (0x0) (enum)
Comment by Jeremy LaCroix (jlacroix) - Wednesday, 27 April 2011, 13:53 GMT
It does detect my battery some boots. It's seemingly random. When it doesn't detect my battery I just reboot. I rebooted just now and it is detecting it this time, so here is the output:

udi = '/org/freedesktop/UPower/devices/battery_BAT0'
parent = '/org/freedesktop/UPower' (string)
vendor = 'Samsung SDI' (string)
product = 'DELL C207206' (string)
description = 'Lithium Ion Battery' (string)
Battery.plugged = true (bool)
Battery.type = 'PrimaryBattery' (0x3) (enum)
Battery.chargePercent = 100 (0x64) (int)
Battery.rechargeable = true (bool)
Battery.chargeState = 'NoCharge' (0x0) (enum)
Comment by Andrea Scarpino (BaSh) - Wednesday, 27 April 2011, 14:00 GMT
and now the battery applet in KDE is working or not?
Comment by Jeremy LaCroix (jlacroix) - Wednesday, 27 April 2011, 14:02 GMT
Yup, the KDE battery applet is working perfectly. If I reboot, the battery may or may not be detected next time. As I said, it appears to be completely random. I'm trying really hard to find a trigger, and so far I'm not successful.
Comment by Andrea Scarpino (BaSh) - Wednesday, 27 April 2011, 14:08 GMT
  • Field changed: Summary ([KDE] 4.6 Power Management claims no battery is present, but it is! → [upower] [kernel26] System claims no battery is present, but it is!)
  • Task reassigned to Tobias Powalowski (tpowa), Ionut Biru (wonder)
Not a KDE bug.
Comment by Ionut Biru (wonder) - Wednesday, 27 April 2011, 14:34 GMT
report upstream. i cannot do anything
Comment by Jeremy LaCroix (jlacroix) - Wednesday, 27 April 2011, 15:02 GMT
Thank you for looking into it.

I have another note to add as I did some more testing today. If I install hal and start the hal demon, the problem is resolved instantaneously. I removed hal because when KDE moved to version 4.6, they declared it no longer necessary. I guess it's still required for now?
Comment by Ionut Biru (wonder) - Wednesday, 27 April 2011, 15:06 GMT
then is a kde problem and they don't really use fully upower features
Comment by Greg (dolby) - Wednesday, 27 April 2011, 15:09 GMT
Try the kde-hardware-devel mailing list: https://mail.kde.org/mailman/listinfo/kde-hardware-devel
Comment by Andrej Podzimek (andrej) - Sunday, 29 May 2011, 02:23 GMT
I can see exactly the same problem on my Lenovo W510. But there are a couple of differences:

1) It used to work perfectly fine without HAL.
2) Enabling HAL does not solve the issue, nothing changes.
3) The battery monitor never works, there are no random boots when it would work.
Comment by Jeremy LaCroix (jlacroix) - Sunday, 29 May 2011, 02:39 GMT
I was wrong on my previous note, hal doesn't fix it. I thought it did but it doesn't actually make a difference. I have worked around it a bit by creating a script and putting this in it:

cat /proc/acpi/battery/BAT0/state

I have that script in a bash file I have KDE run on startup. As soon as I run that command, the battery widget sees the battery and it starts working. I have no idea why this works. I've tested Kubuntu for over a month on a separate hard drive, and it never has this issue on the same laptop, but I tried Googling to see what they may have done to fix it, but there's no trace of this problem ever occurring in Kubuntu.
Comment by Jelle van der Waa (jelly) - Monday, 27 June 2011, 21:05 GMT
hal is depreacated, nothing uses it anymore. Is this still a problem?
Comment by Jeremy LaCroix (jlacroix) - Monday, 27 June 2011, 21:10 GMT
Yes, this is still a problem. In Kubuntu it is perfect, but in Arch I still have this problem. Lately this happens even without HAL. I solved it by creating a shell script with the following contents:

cat /proc/acpi/battery/BAT0/state

And then I just set it to startup in KDE. Whenver I run that script, KDE finds the battery immediately.
Comment by Thomas Dziedzic (tomd123) - Thursday, 25 August 2011, 13:48 GMT
status?
Comment by Jeremy LaCroix (jlacroix) - Thursday, 25 August 2011, 13:55 GMT
Still the same. If I run "cat /proc/acpi/battery/BAT0/state" the battery will appear in the task tray. I wrote a script with that command on startup to work around it. If I don't run that command, it will often report I don't have a battery installed, even when running on it.
Comment by Jeremy LaCroix (jlacroix) - Thursday, 06 October 2011, 04:38 GMT
Update: This problem is now worse after recent updates. It's worse as in the command I posted above (cat /proc/acpi/battery/BAT0/state) no longer makes the battery show up in the KDE panel. Now running that command tells me "no such file or directory" and the only way to fix it is to reboot the entire machine.
Comment by Thomas Dziedzic (tomd123) - Thursday, 06 October 2011, 13:07 GMT
This needs to be reported upstream. As ioni said back in april...
otherwise expect this bug to not get fixed soon.
Comment by Jeremy LaCroix (jlacroix) - Thursday, 06 October 2011, 13:13 GMT
Reporting the bug upstream is fine, but in order to do that it has to be determined what is causing it. It could be a KDE bug, it could be a upower bug, or even a kernel bug. Once it's been established what to blame, I can file the necessary bug.
Comment by Ionut Biru (wonder) - Thursday, 06 October 2011, 13:42 GMT
so you need 6 months to find that?

upower -d
Comment by Thomas Dziedzic (tomd123) - Thursday, 06 October 2011, 16:57 GMT
"It could be a KDE bug, it could be a upower bug, or even a kernel bug."

You need to work with upstream.
Send a mail for further assistance from them.
If you can't round it down, send an email to all 3 of them explaining your situation.

Upstream wont fix this if they don't know it's broken.
Comment by Jeremy LaCroix (jlacroix) - Sunday, 09 October 2011, 17:31 GMT
I determined that the problem lies with upower. I filed the bug upstream. Thank you for your help.

Here is the upstream bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=41623

And to Ionut Biru, I found your comment to be rude. If I knew how to troubleshoot this and isolate the problem myself, I wouldn't have needed to post it here in the first place, now would I? I've been Googling this since I originally posted the report, and I isolated the problem using your upower -d command (so thank you for that).

Loading...