Bug 441579 - Issue with hardware state checks after unsupending
Summary: Issue with hardware state checks after unsupending
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.22.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-26 16:30 UTC by rolltime
Modified: 2021-10-26 19:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rolltime 2021-08-26 16:30:52 UTC
SUMMARY
I have a laptop running Arch KDE. After boot, everything is normal. Once I close and reopen the lid, however, and the system returns from suspend, this issue comes up.
 
When I plug in or unplug the laptop, KDE's battery applet takes more than a minute to recognize the change in state. Additionally, the laptop takes many minutes to sleep when the lid is closed. The laptop's charging indicator updates instantly, and running `cat /proc/acpi/button/lid/LID/state` while the lid is closed returns closed, so this is clearly not a hardware issue.
 
To me this seems related to how often KDE is checking hardware states. For some reason after returning from suspend hardware checks happen much less often. 

Sleeping when the lid is closed normally takes a moment, and sleep after the issue happens takes many minutes. Normally the battery applet updates almost instantly, but now it takes more than a minute. This indicates to me that there's some kind of multiplier, since each event is delayed based on how long it normally takes.


STEPS TO REPRODUCE
1. Have this configuration (this problem doesn't happen on my Kubuntu laptop) 
2. Suspend and unsuspend the machine.

OBSERVED RESULT
Laptop takes much more time to sleep when closed or check the battery state.

EXPECTED RESULT
Sleep when closed and battery state are instant/very fast.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.13.2
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
None