Bug 463034

Summary: "Battery low" notification persists even if battery fully charged
Product: [Unmaintained] Powerdevil Reporter: merilius <balwierz>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: coucouf, kde, me, nate
Priority: NOR    
Version First Reported In: 5.26.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot

Description merilius 2022-12-14 11:10:23 UTC
Created attachment 154580 [details]
screenshot

SUMMARY
The notification shows "Battery Low (99% remaining)" which sounds ridiculous.
See the attachment

STEPS TO REPRODUCE
1. Discharge laptop battery to 10%
2. Power Management window appears saying "battery low"
3. Connect your charger

OBSERVED RESULT
The content of the notification keeps updating the percentage up to 100%, still saying battery low

EXPECTED RESULT
Notification disappears after charged above some threshold

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Comment 1 Kai Uwe Broulik 2022-12-14 12:35:09 UTC
Battery monitor doesn't look like your AC is plugged in.
Comment 2 merilius 2022-12-14 14:59:59 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Battery monitor doesn't look like your AC is plugged in.
Yes, I unplugged it for the moment. I closed the notification window, but can try again next time.
Comment 3 Kai Uwe Broulik 2022-12-14 17:33:01 UTC
Hmm, strange, PowerDevil has explicit code to revoke the battery low notification in case the AC adapter is plugged in or battery charge goes above the low threshold again.
Comment 4 Aurélien COUDERC 2022-12-23 21:54:18 UTC
Yes, I can confirm the bug on Debian unstable with the same software versions as the reporter.
Comment 5 Aurélien COUDERC 2022-12-23 22:57:07 UTC
I just had another weird behaviour :
- My battery discharged to 10% and I got the notification.
- I plugged my AC and the notification disappeared.
- I unplugged it, while still at 10%.
- The battery continued discharging below 10% and I didn’t get the notification again (I ended up plugging the AC anyway at 7%).

There seem to be an issue with the interaction between the AC plugging / unplugging and being exactly at 10% or not.
Comment 6 merilius 2022-12-24 14:33:47 UTC
(In reply to Kai Uwe Broulik from comment #3)
> Hmm, strange, PowerDevil has explicit code to revoke the battery low
> notification in case the AC adapter is plugged in or battery charge goes
> above the low threshold again.

I tried to reproduce it again, with no luck. The battery low notification went away as soon as I connected the charger.
Sorry, I must have previously connected the charger when the laptop lid was down (laptop in sleep mode) and I disconnected it also when still in sleep mode. I checked it now, and indeed it shows "Battery Low (99% remaining").
Comment 7 Nate Graham 2023-09-01 16:47:57 UTC
> The battery low notification went away as soon as I connected the charger

Yep, since this bug was reported, we added code to do that!