Bug 489032 - Hotkeys stop working on X11 after switching X11 <-> Wayland.
Summary: Hotkeys stop working on X11 after switching X11 <-> Wayland.
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.1.0
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-23 10:08 UTC by Kirill Zhumarin
Modified: 2024-06-23 10:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Configs examples. (10.05 KB, application/zip)
2024-06-23 10:08 UTC, Kirill Zhumarin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Zhumarin 2024-06-23 10:08:36 UTC
Created attachment 170851 [details]
Configs examples.

SUMMARY
Hotkeys stop working on X11 after switching X11 <-> Wayland.

STEPS TO REPRODUCE
1. Switch from X11 to Wayland
2. Switch from Wayland to X11

OBSERVED RESULT
Some global shortcuts (for e.g. Ctrl+Alt+T) stop working. Any hotkeys in Java with Swing also stop working.

EXPECTED RESULT
Working hotkeys/global shortcuts.

SOFTWARE/OS VERSIONS
KDE neon
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Seems to be:
1. X11 and Wayland have inconsistent settings in kglobalaccel.
2. "Defaults" button (or just removing kglobalshortcutsrc) doesn't fix the issue.
3. Only one way to fix is reset entire settings. Only after this procedure can we get working kglobalshortcutsrc for X11.

This is how I fix it:
```
# Temporary reset configs to default settings
mv ~/.config ~/.config-bad
sudo systemctl restart sddm

# Copy the right config
cp ~/.config/kglobalshortcutsrc ~/.config-bad/kglobalshortcutsrc

# Restore old configs
rm -rf ~/.config
mv ~/.config-bad ~/.config
sudo systemctl restart sddm
```

See in attachments:
config.diff - difference between good and bad configs.
kglobalshortcutsrc-good - this config was generated after removing .confg (good)
kglobalshortcutsrc-bad - this config was generated after removing only ~/.config/kglobalshortcutsrc (bad)
Comment 1 Kirill Zhumarin 2024-06-23 10:38:10 UTC
The reason turned out to be different.