| Summary: | The battery meter always shows "0%" ! | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Maurice Batey <maurice77> |
| Component: | RPM Packages | Assignee: | QA Team <qa-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | balcaen.john, lmenut, mageia, mageia, maurice77, pmdenielou, sysadmin-bugs, tmb |
| Version: | 4 | Keywords: | validated_update |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | MGA4-32-OK MGA4-64-OK advisory | ||
| Source RPM: | upower | CVE: | |
| Status comment: | |||
|
Maurice Batey
2014-02-09 18:34:03 CET
CC:
(none) =>
maurice
Manuel Hiebel
2014-02-09 19:27:03 CET
CC:
(none) =>
tmb I think this might be a problem in KDE. I'm having similar problem. Maurice, what happens if you pull the plug for a few minutes - does it start showing correct value? Keywords:
(none) =>
NEEDINFO > what happens if you pull the plug for a few minutes -
> does it start showing correct value?
'fraid not! I had already tried that for a minute or so, and I have now tried pulling the plug before booting Mageia-4, but as soon as was logged in it threatened to close the session because of low battery, so had to re-plug smartly! (On Mageia-3, the meter showed 99%)
N.B. The netbook has exactly the same KDE Mageia-4 install, but the battery reading is normal...
what does upower tells about the battery ? upower --monitor-detail
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[19:41:20.168] device changed: /org/freedesktop/UPower/devices/battery_BAT1
native-path: BAT1
model: G71C0001R11E
serial: 0000000000
power supply: yes
updated: Tue 11 Feb 2014 19:41:20 GMT (0 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: fully-charged
energy: 41.013 Wh
energy-empty: 0 Wh
energy-full: 41.013 Wh
energy-full-design: 47.52 Wh
energy-rate: 0 W
voltage: 11.38 V
percentage: 0%
capacity: 81.9087%
technology: lithium-ion
History (charge):
1392147597 0.000 unknown
History (rate):
1392147597 0.000 unknown
Something inconsistent is going on! I've just tried booting into Mageia-4 with the charger disconnected (Mageia-3 showing 98%) and the battery meter is correctly reporting that, including (after re-connecting charger) change to "100%". I had not done a s/w update (but will now do one). Same if I boot Mageia-4 with charger connected. Will keep checking... Then you are seeing the same issue that I'm seeing. When the percentage changes then KDE displays it correctly and after that it's correct on 100% too. Just done the update (incl. -->3.12.9-desktop-1.mga4) and the battery meter is once again showing "0%"... Mmm... (In reply to Maurice Batey from comment #7) > Just done the update (incl. -->3.12.9-desktop-1.mga4) and the battery meter > is once again showing "0%"... > > Mmm... As I said, disconnecting will probably bring it back again.. No, whether I boot Mageia-4 with or without the charger connected, it always shows 0%. (With charger disconnected at bootup I get a "low battery; shutdown in 30 secs" warning, and if I then re-connect the charger it announces "Charger connected" but still shows "0%"...) So at the moment I can't use the laptop unless the charger is connected. Boot it up, don't log in. Let it run a minute or two. What does it show then? And you should be able to configure KDE to not turn of the system when battery is low. Other DEs probably report the correct charge? I have always been *booting* Mageia-4 to check this thing, though tried logging out/in as well. I don't understand your "boot it up, don't log in", though. It's the user's battery meter I need to see! Or do you mean "Do not log in for a few minutes after booting"? (In reply to Maurice Batey from comment #11) > Or do you mean "Do not log in for a few minutes after booting"? Yes, let it run on battery for a few minutes and then log in and connect charger. OK - tried several combinations: (1) Charger unplugged, boot, wait 3-4 mins, login: 0% (2) " connected, " " " 99% (3) " unplugged, " login immediately: 99% (4) " connected, " " " : 98% Make of that what you will! So inconsistent... Interesting discovery! If I boot up, wait, login with charger disconnected, Mageia-4 shows "0%" and then puts the laptop to sleep. If I then connect the charger and wake the system, it shows "99%"... Just tried again. This time upower reports an empty battery:
upower --monitor-detail
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[11:32:51.510] device changed: /org/freedesktop/UPower/devices/battery_BAT1
native-path: BAT1
model: G71C0001R11E
serial: 0000000000
power supply: yes
updated: Fri 14 Feb 2014 11:32:51 GMT (0 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
energy: 40.694 Wh
energy-empty: 0 Wh
energy-full: 40.694 Wh
energy-full-design: 47.52 Wh
energy-rate: 18.822 W
voltage: 11.38 V
percentage: 0%
capacity: 81.9087%
technology: lithium-ion
History (rate):
1392377571 18.822 charging
1392377555 19.448 charging
1392377539 19.186 charging
1392377523 20.108 charging
1392377507 20.097 charging
1392377491 19.801 charging
1392377475 20.074 charging
1392377459 20.267 charging
^C
[mab@laptop ~]$ upower --monitor-detail | grep %
percentage: 0%
capacity: 81.9087%
percentage: 0%
capacity: 81.9087%
percentage: 0%
capacity: 81.9087%
^C
thanks, this prove this is not a KDE issue \o/ Thanks Nicolas for proving me wrong! :) That made me google a bit more and I think I found the problem. At least for my own problem. I hope Maurice has the same issue. It seems to be upower: https://bugs.launchpad.net/bugs/1240673 Maurice, I submitted upower into core/updates_testing - can you please install (will take some time until it reaches mirrors) it and see if it fixes your problem too. Else I have to make a new bug to let QA test that update as it fixes my problem and fixes it probably for many other users too. Hardware:
i586 =>
All Sander said:
> I submitted upower into core/updates_testing - can you please install (will
> take some time until it reaches mirrors) it and see if it fixes your problem
Will do, as soon as I know it is there!
(How shall I know? Is there a command for installing just one particular package from that repository? [I'm not used to doing that...] )
If you are running i586 then these commands (as root) should help you: urpmi.update Core\ Updates\ Testing urpmi upower libupower-glib1 --media Core\ Updates\ Testing For x86_64 it's "urpmi upower lib64upower-glib1 --media Core\ Updates\ Testing" If urpmi complains about other upower related packages then install those too. Did: urpmi.update Core\ Updates\ Testing urpmi upower libupower-glib1 --media Core\ Updates\ Testing - rebooted, and (32-bit,KDE) Mageia-4 now correctly reports "100%". So, the fix worked! Well done, Sander! Regards, /\/\aurice So it's time to pass it to the QA.
Tests for the fix are actually done. I tested it on x86_64 and the reporter tested it on i586. So the QA should mostly test it for regressions as it's probably not that easy to reproduce (one would need a battery that reports charge over 100%).
So to test, just install the update and see that upower is still reporting ( upower -d|grep percentage) correct charge for your battery.
Suggested advisory:
========================
Some batteries report energy > energy_full and a percentage ("capacity" attribute) > 100%. This update clamps these within 0 and 100% for both plausibility and avoids setting an out-of-range property which would then become 0%.
References:
https://bugs.mageia.org/show_bug.cgi?id=12687
https://bugs.launchpad.net/bugs/1240673
========================
Updated packages in core/updates_testing:
========================
lib(64)upower-glib1-0.9.23-1.1.mga4
lib(64)upower-gir1.0-0.9.23-1.1.mga4
lib(64)upower-glib-devel-0.9.23-1.1.mga4
upower-0.9.23-1.1.mga4
Source RPMs:
upower-0.9.23-1.1.mga4.src.rpm
This is one of those updates that should end up on new ISOs as w/o fix it might be impossible for new user to even install update if the system wants to turn off computer before you see any available updates.Keywords:
NEEDINFO =>
(none) Tested on both i586 and x86_64 and it works. and going by the code in the patch I dont see how it could cause any breakage. So validating and advisory uploaded Keywords:
(none) =>
validated_update Update pushed: http://advisories.mageia.org/MGAA-2014-0052.html Status:
NEW =>
RESOLVED > I dont see how it could cause any breakage
Famous last words ...CC:
(none) =>
pierre-malo.denielou Well, that did fix the Mageia-4 problem, but now - on a fully-updated 32-bit Mageia-3 on my laptop, the battery indicator has regressed to show 0% when it is actually 100% (just as Mageia-4 was doing before fixed).
upower --monitor-detail
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[18:32:59.199] device changed: /org/freedesktop/UPower/devices/battery_BAT1
native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT1
model: G71C0001R11E
serial: 0000000000
power supply: yes
updated: Sat May 3 18:32:59 2014 (0 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: fully-charged
energy: 41.013 Wh
energy-empty: 0 Wh
energy-full: 41.013 Wh
energy-full-design: 47.52 Wh
energy-rate: 28.108 W
voltage: 11.38 V
percentage: 0%
capacity: 81.9087%
technology: lithium-ion
Also, if I disconnect the charger, then the system warns of shutdown, presumably meaning that the system regards that "0%" as correct!
Is there a fix for Mageia-3, please?
|
Description of problem: Battery meter in Panel always shows "0%" (on Toshiba Satellite A120 laptop) (However the same Mageia release installed on a Samsung NC110 netbook *does* show the correct battery meter reading, as does Mageia-3 on the same laptop.) Version-Release number of selected component (if applicable): N.B. cat /etc/sysconfig/cpupower shows: CPUPOWER_START_OPTS="frequency-set -g ondemand CPUPOWER_STOP_OPTS="frequency-set -g ondemand - and cpupower is running. How reproducible: Steps to Reproduce: 1. Boot into 32-bit Mageia-4 (KDE) on laptop 2. See that battery meter reports "0%" (with or without charger connected) 3. (See also that the alternative battery meter package ("Pyrtool Battery SystemTray") also reports "0%") Reproducible: Steps to Reproduce: