Bug 3143

Summary: LXDE battery monitor reporting two different levels.
Product: Mageia Reporter: Brian Durant <globetrotterdk>
Component: RPM PackagesAssignee: QA Team <qa-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: derekjenn, filip.komar, lists.jjorge, oliver.bgr, sysadmin-bugs, tmb
Version: 1Keywords: PATCH, UPSTREAM, validated_update
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: lxpanel CVE:
Status comment:

Description Brian Durant 2011-10-23 10:32:30 CEST
The Mageia LXDE battery monitor reports a high level, but a prompt keeps popping up reporting that the battery is low.
Comment 1 Manuel Hiebel 2011-10-30 15:09:21 CET
Seems an upstream bug.
http://sourceforge.net/tracker/index.php?func=detail&aid=3006059&group_id=180858&atid=894869

Patch:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580509

Bug assigned to the package maintainer.

Keywords: (none) => PATCH, UPSTREAM
Assignee: bugsquad => oliver.bgr
Source RPM: (none) => lxpanel

Oliver Burger 2011-11-01 22:48:15 CET

Status: NEW => ASSIGNED

Comment 2 Filip Komar 2011-11-01 23:39:18 CET
Maybe related:

I have trouble with low battery alarm.
Charging and discharging time is always 0:00 so it nags me all the time when disconnected from power supply.

CC: (none) => filip.komar

Comment 3 Filip Komar 2011-11-02 00:00:01 CET
Sorry, more info: this happens on Asus eee PC 701.

Kernel is netbook-latest: kernel-netbook-2.6.38.8-6-1.1.mga.

acpi reports charging and discharging correctly, but adds "rate information unavailable". Is it kernel problem and not LXDE?
Comment 4 Oliver Burger 2011-11-02 19:38:01 CET
I just submitted a patched version to updates_testing.

Please test and report back if it's working.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED
Assignee: oliver.bgr => qa-bugs

Comment 5 Manuel Hiebel 2011-11-02 20:09:34 CET
so reopen

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 6 Filip Komar 2011-11-02 23:15:01 CET
Sorry, no difference for me. I still suspect kernel because acpi response didn't change. At least if I understand this correctly. I tried desktop kernel with the same results.
Comment 7 claire robinson 2011-11-03 01:29:55 CET
adding obgr to CC.

CC: (none) => oliver.bgr

Comment 8 Derek Jennings 2011-11-08 22:10:24 CET
(In reply to comment #3)
> Sorry, more info: this happens on Asus eee PC 701.
> 
> Kernel is netbook-latest: kernel-netbook-2.6.38.8-6-1.1.mga.
> 
> acpi reports charging and discharging correctly, but adds "rate information
> unavailable". Is it kernel problem and not LXDE?

It is not a kernel or LXDE problem. The battery in Asus eee 701 just does not report the discharge current
/sys/class/power_supply/BAT0/current_now

The power monitor is unable to estimate discharge time if it does not know the discharge current.

CC: (none) => derekjenn

Comment 9 Oliver Burger 2011-11-23 22:40:04 CET
According to my tests, the patch solves the battery monitor as far as it's related to lxpanel.
Could anyone check it?
Without the patch it doesn't work at all.

It doesn't resolve the eee701 problem, but that's outside of my power to fix.
Comment 10 Filip Komar 2011-11-24 07:24:17 CET
Asus eee 701 is not available for me anymore. So I'm unable to test. But I think notification should be different if there is no report about the battery current. Time 0:00 just don't tell anything useful ;-) about charging or discharging.
Comment 11 Derek Jennings 2011-11-24 14:04:48 CET
I have tested lxpanel-0.5.6-2.2.mga1.i586.rpm on an Asus eee 701
and found that I did not get pop up messages saying the battery was low when it was not as reported in the original bug report. So the original bug appears to be fixed.

Having said that there are still serious issues with the lxpanel battery monitor

1/ The default configuration sends alarm messages using xmessage which is not a dependency of lxpanel and so is not installed by default. Consequently by default lxpanel battery monitor does not give pop up messages at all.

2/ If xmessage is installed then low battery messages do appear, but xmessage looks so old fashioned it is hard to imagine anyone wanting to use it. Since Mageia loads notification-daemon by default it seems much more sensible to configure lxde battery monitor to send messages through 'notify-send' which requires installation of the libnotify package. Messages will then have the same look and feel as other system messages.

3/ Having installed libnotify and configured lxde battery monitor to send low battery messages through it, then Low battery alarms pop up when the battery reaches 40% charge.  Unfortunately the low battery pop ups are repeated every 30 seconds ad infinitum  (Incidentally they do the same if xmessage is used)


It may be I only experience this problem because I have an eee701. Perhaps someone could repeat the test on other hardware.

By contrast the gnome-power-monitor applet works perfectly under LXDE.
Comment 12 Derek Jennings 2011-11-30 16:57:20 CET
Anyone have an x86_64 laptop to try this on?
Comment 13 Oliver Burger 2011-11-30 17:02:48 CET
Not with Mageia 1 or I would have tested already...
Comment 14 claire robinson 2011-12-05 10:48:17 CET
I can usually test x86_64 but it's a desktop so no good here.
Comment 15 claire robinson 2011-12-08 16:36:15 CET
Adding Jose into CC as I know he has an x86_64 laptop and may be able to help to validate this one too :)

Thanks Jose if you can.

CC: (none) => lists.jjorge

Comment 16 José Jorge 2011-12-08 21:34:33 CET
(In reply to comment #15)
> Adding Jose into CC as I know he has an x86_64 laptop and may be able to help
> to validate this one too :)
> 
Good idea. I opened a LXDE session and added the battery applet.
It shows a nice green bar and reports 100%.
Then yellow when on battery and reports 99%, 5hours remaining. All seems OK to me.
Comment 17 claire robinson 2011-12-14 15:03:12 CET
I think Derek has a point in comment 11.

xmessage is suggested by task-lxde

http://sophie.zarb.org/rpms/cbed812bbe177f4f6967868ea0d21f8e/deps

but it is very ugly by today's standards and not really what we ought to be pushing. Is it possible to suggest/use libnotify instead, even if it is only suggested by lxpanel?
Comment 18 claire robinson 2011-12-14 15:11:54 CET
I set a high alarm level to test this i586 and it doesn't appear to have fixed the repeated messages. They reappear as quickly as I can dismiss them even when above the alarm level.

I've logged out and back in but it remains the same. I'll try a reboot.
Comment 19 claire robinson 2011-12-14 15:25:49 CET
The battery level being reported is up and down, all over the place. It seems to dip rapidly on disk activity and then rise just as quickly after it has finished, up to half an hour or so either way.

The repeated low battery reports must have been just dipping below the high alarm level I had set whenever the disk was accessed with any vigour.

Setting the alarm level back to a low level has remedied the repeated alarms. Should it be less reactive than that, dampened somehow?

It is probably just a symptom of setting the alarm level by battery time remaining instead of battery level remaining in %.

It would be good to hear from Brian Durant who reported this initially as to whether the problem is fixed for him with the new package.
Comment 20 Derek Jennings 2011-12-14 17:11:53 CET
Claire : LXDE battery monitor has already been modified to use libnotify in Cauldron. I did not ask for it to be backported into Mageia 1 because that was not the subject of this bug report.

As for the continuous alarms that seems to be a 'feature'. Upstream would have to fix it.


I suggest we validate this update and raise a bug on upstream for the continuous alarms.
Comment 21 claire robinson 2011-12-21 13:00:29 CET
Missed this one. Thanks Derek.

I agree this would be best fixed upstream, I think the bouncing around is due to trying to estimate battery time left based on current usage levels with no apparent smoothing. 

Suggest reporting upstream :)


Validating the update.

Advisory
--------------
This update corrects an issue where the LXDE battery monitor was not working correctly.
--------------

SRPM: lxpanel-0.5.6-2.2.mga1.src.rpm


Could sysadmin please push from core/updates_testing to core/updates

Thankyou!

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs
Hardware: i586 => All

Comment 22 Thomas Backlund 2011-12-21 19:22:13 CET
Update pushed.

Status: REOPENED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED