Keyboard Shortcuts Not Persistent in Plasma 6

Since the update to Plasma 6, most of my keyboard shortcuts are fine except for three of them vanished and no changes I make to shortcuts via System Settings persist across reboots. I’m not the only person this has happened to, but they got no response since March.

I have found online about using kwriteconfig5 to update ~/.config/kglobalshortcutsrc and have figured out the kwriteconfig6 commands to add my missing shortcuts to that file… but the shortcuts don’t work or show up in System Settings.

One thread I found included the following commands to “activate” the changes:

qdbus org.kde.keyboard /modules/khotkeys reread_configuration
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &

Another thread offered the following similar instruction, which the OP said worked for them:

Try killall kglobalaccel5; kglobalaccel5 in krunner.

However, khotkeys is apparently deprecated in Plasma 6 and I don’t seem to have any kglobalaccel installed:

    ~  which kglobalaccel6                                                                                                                                                                                    INT ✘ 
kglobalaccel6 not found
    ~  which kglobalaccel                                                                                                                                                                                       1 ✘ 
kglobalaccel not found
    ~  which kglobalaccel5                                                                                                                                                                                      1 ✘ 
kglobalaccel5 not found

A more recent article said to update both kglobalshortcutsrc and kwinrc with the desired shortcuts and then run qdbus org.kde.KWin /KWin reconfigure but this, also, has not worked for me. The shortcuts still don’t work or show in System Settings.

Has anyone here managed to fix this this sort of issue before, or know what is now the correct command to “activate” changes written to kglobalshortcutsrc from terminal?

Thats your problem then.
You are correct khotkeys is deprecated. Even if you previously used it for shortcuts, you would need to remove it and apply them again using kglobalaccel.
I dont know how you are missing kglobalaccel, as its part of plasma.

sudo pacman -Rns khotkeys
sudo pacman -Syu plasma-desktop

As mentioned, kglobalaccel is a dependency of plasma-desktop.
Your shortcuts should be configurable through System Settings as usual.
And/or directly by kglobalaccel.

PS

Your missing core packages makes me wonder about the general integrity of your system.
Have you accidentally removed things?
Performed a partial-upgrade?

2 Likes

Thank you for the response and commands to fix it; I’ll run them in a minute and report back.

As far as I’m aware I have never consciously used khotkeys nor any other terminal method; until now, I have always configured keyboard shortcuts in the System Settings GUI.

As far as I’m aware, no. I installed the Big Bag of Updates™ a day or two after it was announced, via the Add/Remove Software GUI, and everything competed. Other than my font sizes needing adjusting and this shortcut issue, everything seemed to go smoothly. Clearly not so smooth after all.

And khotkeys would have been there. Until it was not.

Without logs or something we cannot know for sure.
If you used pamac with the AUR enabled maybe some core packages were replaced?
Maybe certain packages were removed previously at some point?

You could, for example, check mapare just to print default packages not installed;

bash <(curl -s https://gitlab.com/cscs/mapare/-/raw/main/mapare) -IP

(input kde at the prompt)

plasma-desktop reinstalled but still no kglobalaccel:

    ~  sudo pacman -Syu plasma-desktop
:: Synchronising package databases...
 core is up to date
 extra                          8.3 MiB  1968 KiB/s 00:04 [############] 100%
 community is up to date
 multilib is up to date
warning: plasma-desktop-6.0.4-1 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) plasma-desktop-6.0.4-1

Total Installed Size:  30.60 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                            [############] 100%
(1/1) checking package integrity                          [############] 100%
(1/1) loading package files                               [############] 100%
(1/1) checking for file conflicts                         [############] 100%
(1/1) checking available disk space                       [############] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) reinstalling plasma-desktop                         [############] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Refreshing PackageKit...
(3/6) Reloading system bus configuration...
(4/6) Updating icon theme caches...
(5/6) Checking which packages need to be rebuilt
(6/6) Updating the desktop file MIME type cache...
    ~  which kglobalaccel
kglobalaccel not found
    ~  which kglobalaccel6
kglobalaccel6 not found
    ~  which kglobalaccel5
kglobalaccel5 not found

mapare lists no missing packages:

    ~  bash <(curl -s https://gitlab.com/cscs/mapare/-/raw/main/mapare) -IP

 Manjaro Package Restore

 Retrieve and reinstall package lists

 Please provide desktop environment (kde,xfce,gnome): kde

 Packages for installation:


    ~ 

I’ll reboot, without my kwriteconfig stuff set to run on login, and see what System Setting’s behaviour is like.

As mentioned … plasma-desktop relies on kglobalaccel.

I really dont know how you would be missing it.

Is that how you are checking?
The package does not provide a binary executable by any of those names. Or one at all really.

pacman -Qs kglobal

This is indicative of unmanaged pacnews.
The community repo has been dead for a year or so.


PS

No one should be using packagekit.

2 Likes

In that case, it seems I do have it installed after all. Looks like uninstalling khotkeys has fixed my shortcuts issue; changes made in System Settings are now persistent across reboots.

I have now removed the [community] section from /etc/pacman.conf.

I have no idea what that is so I doubt I’d have gone out of my way to install it. According to pacman -Qi it is required by packagekit-qt5 and packagekit-qt6 which aren’t required by anything but are optional for, respectively:

  • frameworkintegration5
  • frameworkintegration and plasma-desktop

I must have accepted it as an optional dependency at some point, assuming it wasn’t part of my initial Manjaro install.

I shall uninstall it :+1:

1 Like

Mystery solved. :slight_smile:
Happy penguins.

1 Like

Thank you for all your help!

:penguin:

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.