SUMMARY When starting a Plasma on Wayland session, none of my keyboard shortcuts work. This was debugged a bit last Akademy in Milano, and it seemed it was an issue while starting KWin where kglobalaccel doesn't start up properly. This makes the whole session unusable to me and I have to resort back to X11. STEPS TO REPRODUCE 1. Install an Alpine 3.11 or Alpine edge system 2. Install the `plasma` meta package, it pulls in all required dependencies 3. Launch a Plasma on Wayland session OBSERVED RESULT No keyboard shortcuts will work. E.g. you can't launch Kickoff by pressing the menu button, you can't open KRunner by pressing Alt + Space, etc. EXPECTED RESULT All keyboard shortcuts to work properly. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Alpine Linux edge (available in About System) KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.66.0 Qt Version: 5.12.5 ADDITIONAL INFORMATION This system runs Alpine Linux, so it's based on Busybox and Musl rather than GNU Coreutils and glibc.
From what I recall (as the one who did some of the debugging), it basically boiled down to a race between KWin and KGlobalAccel. KWin will try to D-Bus activate KGlobalAccel which for some as yet unknown reason fails. This then leads to KWin not knowing about any global shortcuts. A bit later in session startup, other things will also try to D-Bus activate KGlobalAccel and succeed.
Can you try with D19004
Well it doesn't cleanly apply on Plasma Workspace 5.17.5, probably because startplasmacompositor nowadays is startplasma-wayland. However, just running "startplasma-wayland" without "dbus-run-session" in a TTY makes it complain that it can not start D-Bus. > not a reply org.freedesktop.locale1 QDBusMessage(type=Error, service="org.freedesktop.DBus", error name="org.freedesktop.DBus.Error.ServiceUnknown", error message="The name org.freedesktop.locale1 was not provided by any .service files", signature="s", contents=("The name org.freedesktop.locale1 was not provided by any .service files") ) > startplasmacompositor: Could not start D-Bus. Can you call qdbus?
Created attachment 131462 [details] "ps ux" output of a fresh Wayland session
Created attachment 131463 [details] "env" output of a fresh Wayland session
Created attachment 131464 [details] "qdbus" output of a fresh Wayland session
The output of "qdbus org.kde.KWin /kglobalaccel" was "'Service org.kde.KWin' does not exist"
Created attachment 131465 [details] "kwin_wayland" output with "export `dbus-launch`" just before
Created attachment 131466 [details] Strace output of "kwin_wayland"
Comment on attachment 131466 [details] Strace output of "kwin_wayland" Content of $DBUS_SESSION_BUS_ADDRESS (so you know what to grep for): unix:abstract=/tmp/dbus-MtXGbvVMbv,guid=3ac1e07735b147e1fc7c994d5f560f63
Created attachment 131467 [details] "strace -f" output of "kwin_wayland"
Created attachment 131468 [details] "strace -fefault=prctl" output of "kwin_wayland" Content of $DBUS_SESSION_BUS_ADDRESS (so you know what to grep for): unix:abstract=/tmp/dbus-MtXGbvVMbv,guid=3ac1e07735b147e1fc7c994d5f560f63
[15:45] <fvogt> Just remove CAP_SYS_NICE and it'll work [15:45] <PureTryOut[m]> And how would I do that? [15:47] <fvogt> setcap /usr/bin/kwin_wayland cap_sys_nice= [15:48] <fvogt> Actually, just setcap -r /usr/bin/kwin_wayland [15:49] <PureTryOut[m]> You're right, that fixed it! :tadad [15:54] <fvogt> kwin_wayland's CAP_SYS_NICE makes _dbus_check_setuid trigger and so it ignores environment variables [15:57] <fvogt> It works on glibc because it only checks the suid/euid [15:57] <fvogt> On musl, issetugid is available and that doesn't like capabilities Ideally, kwin gets rid of its CAP_SYS_NICE. It's effectively a backdoor anyway.
I also experience this bug. If I log in to a Wayland session, global keyboard shortcuts don't work. They work fine in X11 sessions. Fabian Vogt's solution from here works for me: https://bugs.kde.org/show_bug.cgi?id=417227#c13 System details: Distributor ID: Neon Description: KDE neon User Edition 5.22 Release: 20.04 Codename: focal
I have a recollection that we spoke at akademy and it's no longer an issue? Is that correct?
It is not, but only because at Alpine Linux we now ship a workaround, https://git.alpinelinux.org/aports/tree/community/kwin/APKBUILD#n108. The same workaround is applied at powerdevil to make that launch at all, https://git.alpinelinux.org/aports/tree/community/powerdevil/APKBUILD#n73. Pretty sure this workaround has other unforeseen consequences, so I rather have it fixed properly.
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!
I hit the same issue (probably) on Fedora 38 and KDE Plasma 5.27.8. No custom shortcuts works for me at all and I see that KGlobalAccel isn't running. When I want to run it I see error: /usr/bin/kglobalaccel5 kf.dbusaddons: Couldn't register name 'org.kde.kglobalaccel' with DBUS - another process owns it already! And when I check what process owns tis name in dbus: qdbus org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID org.kde.kglobalaccel 2238 ps aux | grep 2238 slaweq 2238 0.0 0.3 3641764 214824 ? Sl wrz19 0:30 /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_oawZej --xwayland
(In reply to Sławek from comment #18) > I hit the same issue (probably) on Fedora 38 and KDE Plasma 5.27.8. No > custom shortcuts works for me at all and I see that KGlobalAccel isn't > running. When I want to run it I see error: > > /usr/bin/kglobalaccel5 > kf.dbusaddons: Couldn't register name 'org.kde.kglobalaccel' with DBUS - > another process owns it already! > > And when I check what process owns tis name in dbus: > > qdbus org.freedesktop.DBus /org/freedesktop/DBus > org.freedesktop.DBus.GetConnectionUnixProcessID org.kde.kglobalaccel > 2238 > > ps aux | grep 2238 > slaweq 2238 0.0 0.3 3641764 214824 ? Sl wrz19 0:30 > /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 > --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority > /run/user/1000/xauth_oawZej --xwayland That's all exactly as expected: kwin_wayland itself "contains" kglobalacceld. That kwin registered itself on the bus also means your issue is unrelated to this bug, where kwin does not contact DBus at all.
Is this still an issue as of plasma 6.1?
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone!
Seems it has been resolved with the upgrade to Plasma 6.0 actually. I got rid of the workaround that removes the capabilities altogether a while ago. Closing!