Bug 480123 - Battery charge level notifications not shown while plugged in but still discharging
Summary: Battery charge level notifications not shown while plugged in but still disch...
Status: RESOLVED WORKSFORME
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-21 10:05 UTC by svroemisse
Modified: 2024-03-16 03:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description svroemisse 2024-01-21 10:05:13 UTC
SUMMARY
 I'd like the "On AC Power" state to be redefined to "Battery not discharging".

ELABORATION
My work laptop has a 150W charger, but it's normally connected to a USB-C hub which delivers less power that that. I believe it's 65W. Normally that's fine but at times a non-KDE browser that shall not be named decides to keep my cores busy. And when that happens, the laptop needs more power than the hub can deliver, drawing the extra power it needs from the battery.

When that happens, because it's technically connected to power, the "On AC Power" settings keep being applied, causing it to ultimately just die without me getting any warning that I'm in trouble beforehand. The battery widget will not raise any alarm and neither is the setting for "At critical level" (shut down in my case) ever applied. This stupid laptop then needs to charge using its own charger for about 12 minutes before it will even turn on again.

I'd therefore like to see the following changes:
1. Redefine the "On AC Power" state to "Battery not discharging" and "On Batter Power" to "Battery discharging" (fwiw, I think the naming doesn't need to change, just the definition)
2. This should be used by both the power state guard thingamajig and the battery widget, so that:
    1. The widget shows that the battery is discharging, even when on AC power
    2. The "On Battery Power" state is used when discharging, even when on AC power
    3. The "Advanced Power Settings" are honored when discharging, even when on AC power

This way, any such future events can be prevented.

STEPS TO REPRODUCE
1. have a power-hungry laptop
2. connect to USB-c hub that can deliver less power than the laptop needs under full load
3. get the CPU busy

OBSERVED RESULT
1. The battery widget doesn't indicate that the battery is discharging
2. The battery widget doesn't raise the alarm when battery power is low
3. The laptop just dies while the power scheme clearly states that it should shut down when reaching 10% battery power

EXPECTED RESULT
1. The battery widget should display, indicating that the battery is discharging
2. The battery widget should raise the alarm when the battery level is low
3. The laptop should honor the "At critical level" setting under "Advanced Power Settings"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2024-02-15 19:43:26 UTC
It sounds like what should happen here is that you should get battery level alerts even when plugged in, because, yeah, sometimes the battery continues to discharge even when plugged in for reasons like the one you've provided. Let's use this bug report to track that.
Comment 2 Nate Graham 2024-02-15 19:44:27 UTC
That said, you're using a fairly old version of Plasma that's no longer supported. Two years have passed since when you're using has been developed, providing the opportunity for many bugs such as this one to be fixed. And I have a dim memory of this bug being fixed at some point. Can you please upgrade to Plasma 5.27 and see if the issue is still reproducible? Thanks!
Comment 3 Bug Janitor Service 2024-03-01 03:46:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2024-03-16 03:47:03 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!