SUMMARY When logging in to KDE Plasma, powermanagement data engine returns incorrect "sleep state" values which breaks dependent plasmoids/widgets. STEPS TO REPRODUCE 1. Install a plasmoid that depends on "sleep states" from powermanagement data engine (such as https://github.com/Musikolo/plasma5-applets-system-panel) 2. Reboot & log in to KDE Plasma 3. powermanagement returns incorrect values of "sleep states" for HybridSuspend, Hibernate and Suspend states. OBSERVED RESULT Because powermanagement returns incorrect "sleep states", dependent plasmoids do not work as expected. The returned "sleeps states" in login time are as shown below: {"Hibernate":true,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} Restarting plasmashell fixes the issue (kbuildsycoca5 && kquitapp5 plasmashell && kstart5 plasmashell). This suggests there might be a race condition on the normal log in process affecting some laptops. EXPECTED RESULT After logging in to KDE Plasma, powermanagement data engine "sleep states" should be correctly provided, as shown below: {"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.16.2 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION I have widget that depends on powermanagement sleep states to decide whether to enable or not some related actions. Some version between KDE Plasma 5.8 & 5.16.2, I noticed my widget was behaving in an unexpected and incorrect way. Recently, I decided to improve the code and debug the issue. Logs when the issue occurs: powermanagement onNewData sourceName=Sleep States - data={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} - Sleep States={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} powermanagement onNewData sourceName=Sleep States - data={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} - Sleep States={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} powermanagement source connected=Sleep States - Sleep States={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} powermanagement source connected=PowerDevil - Sleep States={"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false} suspendToRam - Sleep States={"objectName":"","Sleep States":{"Hibernate":false,"HybridSuspend":false,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":false}} Logs when EITHER the issue does NOT occur OR after restarting plasmashell: powermanagement onNewData sourceName=Sleep States - data={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} - Sleep States={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} powermanagement onNewData sourceName=Sleep States - data={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} - Sleep States={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} powermanagement source connected=Sleep States - Sleep States={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} powermanagement source connected=PowerDevil - Sleep States={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} suspendToRam - Sleep States={"objectName":"","Sleep States":{"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true}} powermanagement source connected=Sleep States - Sleep States={"Hibernate":true,"HybridSuspend":true,"LockScreen":true,"Logout":true,"Standby":false,"Suspend":true} I found the issue is not reproducible in all my 3 laptops: - Slimbook Pro : It does happen - Slimbook Pro2: It does happen - Lenovo E480 : It does NOT happen All these 3 laptops use up-to-date Arch Linux distros. If you need further detail or want me to test anything, please let me know. Thank you!
Hmm possible that plasmashell starts before powerdevil is up and then the dataengine never re-checks
I think I have an issue that has the same root cause: Sometimes when I start my PC, the KDE Application menu does not offer to suspend my PC (the button is just not there). However, using 'systemctl suspend' works just fine. And after a while (I have not determined the pattern yet, but read it as 'days'), the suspend option reappears in the menu. So yesterday, when the suspend entry was missing I tried restarting plasma via 'kbuildsycoca5 && kquitapp5 plasmashell && kstart5 plasmashell' and afterward, the suspend entry was instantly there. My PC is running Arch Linux too and the versions of KDE/Plasma/Qt are the same as Musikolos, but I have this problem for a few months now.
I'm landing some new code that simplifies our power management api for 5.17 Probably not worth spending too much time on till we see if that fixes it.
The issue still persists in KDE Plasma 5.17.1. Is there any tentative version in which this will be fixed? Thank you!
I can confirm the issue is still present in Plasma 5.17.5
Hello and thank you again for the bug report! Unfortunately we were not able to address it yet, nor even manage to reproduce the issue ourselves. Can we ask you to please check if this issue is still happening with Plasma 5.27? If it is, please change the status to REPORTED. Thanks a lot!
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!
With Plasma 5.27.8 I was unable to replicate it. As far as I remember it, the issue did not occur every time, but over the past week, I was unable to recognize it. My system is still the same, but due to other problems with the suspend mode (graphics driver problems), I haven't used it very often for the past months.
Ok, thanks a lot!