SUMMARY Since Plasma 5.20.0, powerdevil won't start anymore and thus doesn't try to keep my space awake or reports about the battery level of my laptop. Trying to launch it manually (which previously worked fine in case of it crashing, which it would like to do sometimes) gives me "Session bus not found\nTo circumvent this problem try the following command (with Linux and bash)\nexport $(dbus-launch)" STEPS TO REPRODUCE 1. Get an Alpine Linux system 2. Start a Plasma session 3. Check if powerdevil is running OBSERVED RESULT Powerdevil isn't running and won't be launched manually. EXPECTED RESULT Powerdevil to launch normally. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Alpine Linux edge (available in About System) KDE Plasma Version: 5.20.2 KDE Frameworks Version: 5.75.0 Qt Version: 5.15.1 ADDITIONAL INFORMATION This is an Alpine Linux system and thus based on Musl rather than glibc.
> Session bus not found Seems like a problem.
Yes it definitely is a problem ;) D-Bus itself is however running fine, and besides Powerdevil I don't notice anything else broken that might be related to the system session bus not being present.
Created attachment 134099 [details] Plasma session log So the same packages are used to run Plasma Mobile on postmarketOS as well and I noticed Powerdevil is running fine there. The main difference I could see is that the mobile session is launched with "dbus-run-session" where the desktop session isn't, but changing that didn't make Powerdevil launch. I've checked the SDDM log but didn't see much useful besides the session bus not being found message. Maybe the log is useful for others however.
Ok this is probably not a Powerdevil issue but something else, and Powerdevil not launching is a sympton of it. I just noticed the Night Color KCM fails to connect to the window manager, which I assume has the same cause. And here I was wondering why my screen didn't look any different in the evening as on bright day... I don't know what component this bug applies too then
Powerdevil has the same problem as kwin does for me in https://bugs.kde.org/show_bug.cgi?id=417227, and the workaround from there worked here too. Meaning I have had a working Powerdevil for quite a while again, but by removing Powerdevil's capabilities (most notably CAP_WAKE_ALARM).
I feel like this needs taking up with musl and/or dbus upstream. The way I understand it we have this capability specifically for plasma mobile, so we can't just get rid of it.