Summary: | Keyboard brightness no longer showing up until logging out and back in again | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Mike Lothian <mike> |
Component: | Power management & brightness | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | anhollander516, bairiaravind2, isma.af, jpetso, m.kurz, mariusz.libera, me, michael, natalie_clarius, nate, nicolcheung521, rhansen, thisisarealmailbox |
Priority: | NOR | Keywords: | regression |
Version: | 6.2.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=482713 | ||
Latest Commit: | https://invent.kde.org/plasma/powerdevil/-/commit/c8f60bbfdefebfc336a1b6c1bda89a904c105fc6 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Full journalctl |
Description
Mike Lothian
2024-04-24 11:43:40 UTC
Created attachment 168864 [details]
Full journalctl
I'm still able to use https://github.com/wroberts/rogauracore to control the brightness and colours etc If I restart sddm everything then works fine, is this some sort of race issue during first boot? I'm experiencing this too on both a Dell Latitude E7450 and a Framework 13 AMD (with the new keyboard backlight driver in Linux 6.11) using Plasma 6.1.4 and KF6 6.5.0. It used to work properly in Plasma 5.27. (I never tried Plasma 6.0.). The entry for the keyboard backlight is present in /sys/class/leds on both systems. I'm not starting the KDE session using SDDM; I'm just executing "exec dbus-run-session startplasma-wayland" from a VT. Facing same problem. I am able to get/set the brightness through upower using the dbus-send command. dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:2 Somehow powerdevil is not able to do so I have noticed this problem as well. However, in my case occasionally on certain boots the brightness control does show up under the "Brightness and color" panel applet. I am not sure why it shows up sometimes and haven't noticed a pattern with it. Every time I notice this I reboot to see if it will stay, but it goes away and returns to only showing brightness control for the screen. This is on a new install of EndeavourOS ~3 weeks ago currently plasma is on v6.1.5. Model of computer is Asus vivobook f1504vap. I found out why this bug appeared to be intermittent for me. The keyboard backlight control doesn't seem to show up upon any reboot at all, but does show up after a reboot > logout > login. Seems to work every time to get the keyboard backlight control to show up. No difference with wayland or x11. I experience this as well, exactly the same behaviour: After restart I can not see the keyboard brightness slider in the "Brightness and Color" widget. However I can set the brightness with dbus-send like described in a previous comment. However if I log out and back in again, the slider shows up (and works correctly as well). A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/472 I've just applied that MR, unfortunately it doesn't fix the issue Killing the powerdevil process gets it working Is there some debugging I can do from the first start up Vs the restarted process? Git commit c8f60bbfdefebfc336a1b6c1bda89a904c105fc6 by Ismael Asensio. Committed on 26/11/2024 at 18:45. Pushed by iasensio into branch 'master'. applets/brightness: Improve integration with dbus service availability Let's only try to initialize the DBus connections when the required service is available, and then watch for changes in avilability, so the UI always reflects the current status FIXED-IN: 6.3.0 M +37 -4 applets/brightness/plugin/keyboardbrightnesscontrol.cpp M +7 -1 applets/brightness/plugin/keyboardbrightnesscontrol.h M +49 -8 applets/brightness/plugin/screenbrightnesscontrol.cpp M +5 -1 applets/brightness/plugin/screenbrightnesscontrol.h https://invent.kde.org/plasma/powerdevil/-/commit/c8f60bbfdefebfc336a1b6c1bda89a904c105fc6 (In reply to Mike Lothian from comment #10) > I've just applied that MR, unfortunately it doesn't fix the issue > > Killing the powerdevil process gets it working > Oh, I read this comment too late. The MR got some changes afterwards. Can you please test again with the latest version and reopen if it's still happening? > Is there some debugging I can do from the first start up Vs the restarted > process? In case it fails, a similar log to the journal info you provided would be good enough. With the latest changes in the patch, it should show a slightly different error message because now we check the service status before trying to connect to it. I can't get the fix to apply cleanly to 6.2.4 and "git mergetool" kdiff3 crashes Any chance you could backport it to 6.2? I've just compiled powerdevil from source from the main branch, the issue doesn't appear to be fixed I'm afraid I still had to kill /usr/libexec/org_kde_powerdevil for the keyboard brightness to appear Could you also please check that the compiled version is getting executed at plasma login and not the system one?
One way is to check the path that the systemd unit is actually running:
> cat /run/user/1000/systemd/user.control/plasma-powerdevil.service | grep ExecStart
ExecStart=/home/isma/kde/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdevil
Even on a full self-compiled plasma session, it is sometimes hard to make the compiled powerdevil/dbus stuff work without manually overwriting of some system files (it requires permissions to deal with the hardware and the security to grant those permissions)
I used the live Gentoo ebuild, it replaced the system files and installed the same way 6.2.4 is *** Bug 487743 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/476 Git commit 6f668270a389322ccdb8b8cc92eea308d087fca8 by Jakob Petsovits. Committed on 08/12/2024 at 03:04. Pushed by jpetso into branch 'master'. applets/brightness: Never miss a display on brightness service registration Since commit c8f60bbf, the display list gets updated when the org.kde.ScreenBrightness service (provided by PowerDevil) starts or restarts. This exposed a race condition that was already present, but now gets triggered regularly due to tighter timing. The sequence of events reproducing this bug goes like this: 1. The D-Bus service appears, `onServiceRegistered()` is invoked. 2. `queryAndUpdateDisplays()` starts retrieving display properties. 3. Soon after the D-Bus service came up, it adds another display. 4. `queryAndUpdateDisplays()` finishes. 5. Only at this point we connect to D-Bus display change signals. In this sequence, the display from (3) is missed and won't show up in the applet until another display change happens at a later point. Now that the display model is robust against duplicate insertions, we can simply move `queryAndUpdateDisplays()` from the start of `onServiceRegistered()` to the end of the function, at which point D-Bus signal connections are already set up. This ensures that no display additions will be missed, even if they happen immediately after service startup. Related: bug 488915 M +10 -10 applets/brightness/plugin/screenbrightnesscontrol.cpp https://invent.kde.org/plasma/powerdevil/-/commit/6f668270a389322ccdb8b8cc92eea308d087fca8 My commit above is not actually applicable to the keyboard use case, sorry. However, Ismael's new merge request is: https://invent.kde.org/plasma/powerdevil/-/merge_requests/476 *** Bug 494720 has been marked as a duplicate of this bug. *** *** Bug 495476 has been marked as a duplicate of this bug. *** I've just tested powerdevil build from source with https://invent.kde.org/plasma/powerdevil/-/merge_requests/476 added, and I still have the same issue Git commit fbe83d19e815ca91815b5e09efe64446989bd72a by Ismael Asensio. Committed on 11/12/2024 at 22:03. Pushed by iasensio into branch 'master'. applets/brightness: Check if KeyboardBrightness action is available Besides reacting to changes in the `Solid.PowerManagement` DBus service, we also need to track changes in the `KeyboardBrightnessControl` action (which translates into a specific DBus path) before trying to call or connect to that path and fail. This doesn't fix the race conditions on plasma login, but allows the applet to react live to changes in the action list. M +75 -8 applets/brightness/plugin/keyboardbrightnesscontrol.cpp M +7 -2 applets/brightness/plugin/keyboardbrightnesscontrol.h https://invent.kde.org/plasma/powerdevil/-/commit/fbe83d19e815ca91815b5e09efe64446989bd72a |