SUMMARY It seems a recent update to Powerdevil broke the connection to the Wayland compositors used to set brightness on displays. I have a Framework Laptop (AMD 7840U processor) and the Powerdevil service fails to connect to the Wayland compositor to request/set the display's brightness, and I thus lose all access to brightness control *as well as battery information*, even though the two are unrelated enough. STEPS TO REPRODUCE 1. Start a user session in Plasma. 2. See the brightness isn't modifiable. Check `systemctl --user status plasma-powerdevil.service` and see it has an exit code of 255 (exception). 3. Try to "replace" it using `/usr/libexec/org_kde_powerdevil --replace` 4. Notice the error message is specifically pointing out an error in the `kde_external_brightness_device` protocol, specifically this message: ``` wl_display#1: error 1: invalid method 5, object kde_external_brightness_device_v1#39 The Wayland connection experienced a fatal error: Invalid argument ``` OBSERVED RESULT The brightness is non-controllable, and the battery reporting as well as the "Power management" KCM are unavailable. EXPECTED RESULT The process should fail "gracefully", and still allow for charge reporting to work when the brightness cannot be controlled for some reason. SOFTWARE/OS VERSIONS Operating System: Fedora Linux 41 KDE Plasma Version: 6.3.2 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.13.6-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics Memory: 30.6 GiB of RAM Graphics Processor: AMD Radeon 780M ADDITIONAL INFORMATION It seems to have happened around ~4 weeks ago, maybe the regression happened with Plasma 6.3? I do not know how I could bisect the commits to find the issue without having to recompile all Plasma components depending on Powerdevil, I'd appreciate some guidance.
Weird question, but could you confirm that the kwin, libkscreen and powerdevil packages were all updated to a 6.3.x version? If I look into the generated file powerdevil/daemon/wayland-kde-external-brightness-v1-client-protocol.h, it defines the constant KDE_EXTERNAL_BRIGHTNESS_DEVICE_V1_SET_OBSERVED_BRIGHTNESS as 5 and I think this might be your "invalid method 5" from the logs. The set_observed_brightness() Wayland request (method) was added in Plasma 6.3, so if one of the involved packages is still on 6.2, I could see things going wrong somewhere. I'm also not an expert on Wayland tooling though, and I don't have the experience to tell under which exact conditions you'd see the pasted error. You're right though that this is where the problem is going to be. Then again, it's Fedora and I wouldn't expect them to hold back one of the packages either. So I'm not quite sure where to start looking.
Ah, it seems you've found the problem. Kwin was still at version 6.2.5, because the window decorations I was using (klassy) were not updated to 6.3.x, and thus required the old libkdecorations2 shared lib. Removed klassy, and force-upgraded kwin to the latest version and it all works now. Thanks for the help. While that's fixed, my original bug report still seems valid in the sense that powerdevil should not unconditionally fail when the Wayland connection cannot be established. For example, it handles just fine the fact my battery has no charge thresholds that can be user-settable. But losing battery information because of a conflict of my window manager seems a bit unrelated...
(In reply to thibaulltt from comment #2) > While that's fixed, my original bug report still seems valid in the sense > that powerdevil should not unconditionally fail when the Wayland connection > cannot be established. Yeah, that's fair. Thanks for pointing this out, or I would have probably marked the bug as resolved :)
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/539