https://bugs.kde.org/show_bug.cgi?id=511924
Bug ID: 511924
Summary: Custom Global Shortcut not activated on Wayland
startup (config is ignored)
Classification: Plasma
Product: kwin
Version First 6.5.1
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Custom Global Shortcut not activated on Wayland startup (config is ignored)
***
If you're not sure this is actually a bug, instead post about it at
https://discuss.kde.org
If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Please remove this comment after reading and before submitting - thanks!
***
### Environment Details
* **Operating System:** **Arch Linux**
* **KDE Plasma Version:** **6.5.2**
* **KDE Frameworks Version:** **6.5.x** (Corresponding to Plasma 6.5.2 release)
* **Qt Version:** **6.x** (Built against Qt 6)
* **Windowing System:** **Wayland**
### Steps to Reproduce
1. Create a custom shell script (e.g., `~/config/scripts/toggle_audio.sh`).
2. Create a corresponding KDE Service Entry file:
`~/.local/share/applications/toggle_audio.sh.desktop`.
3. Manually ensure the required shortcut is written to the configuration file:
```ini
[services][net.local.toggle_audio.sh.desktop]
_launch=Meta+Z
```
4. Restart the KDE Plasma session (Logout/Login or full system reboot).
5. Attempt to trigger the shortcut **Meta+Z**.
### Observed Result
1. The `Meta+Z` shortcut **does not work** upon session startup.
2. The custom shortcut **is not visible** in the System Settings > Shortcuts
GUI, despite the correct entries being present in `kglobalshortcutsrc`.
### Expected Result
The shortcut `Meta+Z` should be automatically loaded, indexed, and activated by
`kglobalacceld` and KWin upon session startup, as the configuration file
(`kglobalshortcutsrc`) is identical to the working configuration.
### Crucial Diagnostic Findings (The Silent Failure)
The failure is isolated to the D-Bus/Internal Caching layer of KDE, as proven
by the following:
1. **GUI Fix:** If the user opens System Settings > Shortcuts, finds the
custom shortcut (or creates any new one), and clicks **Apply/Save**, the
`Meta+Z` shortcut **immediately becomes active and functional**. This single
GUI action forces the correct indexation.
2. **Configuration Identity:** The content of the `kglobalshortcutsrc` file
*after* a manual GUI save is **byte-for-byte identical** to the content written
by the automation script.
3. **D-Bus Reload Attempt Failure:** Standard D-Bus methods for forcing a
configuration reload fail to activate the shortcut after startup, even though
some commands execute without error:
* `qdbus org.kde.KWin /KWin org.kde.KWin.reconfigureShortcuts` (Failed:
`UnknownMethod`)
* `qdbus org.kde.KWin /KWin org.kde.KWin.reloadConfig` (Failed:
`UnknownMethod`)
* `qdbus org.kde.KWin /KWin org.kde.KWin.reconfigure` (Executed
successfully, but did **not** activate the shortcut).
* `qdbus org.kde.kglobalaccel /component/kwin invokeShortcut
"net.local.toggle_audio.sh.desktop._launch"` (Executed successfully, but did
**not** trigger the action).
### Proposed Cause
KDE Plasma is failing to properly index and link the custom Service Entry
(`.desktop` file) and its corresponding entry in `kglobalshortcutsrc` during
the initial passive session load. Activation only occurs when the GUI triggers
an explicit, "live" D-Bus signal that bypasses the broken
initialization/caching routine.
### Suggested Mitigation
Developers should investigate why the D-Bus services responsible for global
shortcut configuration (`kglobalaccel`/`KWin`) ignore or fail to index new
Service Entries written to the filesystem without an accompanying explicit user
interaction in the System Settings GUI.
--
You are receiving this mail because:
You are watching all bug changes.