Custom Shortcuts not working after update

After the latest stable update a few days ago, custom shortcuts stopped working so I checked settings and tried to remap keys. Every time it updates, the (settings) window freezes for almost a minute, and then an error dialog pops up saying Unable to contact khotkeys. Your changes are saved, but they could not be activated.

Any thoughts on how to fix/debug this?

journalctl -f shows this as soon as the freeze ends:

Mar 28 18:00:17 rithvik-nitroan51557 kioslave5[8136]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:00:17 rithvik-nitroan51557 kioslave5[1958]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:00:17 rithvik-nitroan51557 plasmashell[1358]: org.kde.plasma.notifications: Trying to replace notification with id 1880 which doesn't exist, creating a new one. This is an application bug!
Mar 28 18:00:19 rithvik-nitroan51557 systemsettings[146086]: qml: The item SubCategoryPage_QMLTYPE_78(0x55aef067d5d0) is already in the PageRow
Mar 28 18:00:24 rithvik-nitroan51557 kioslave5[1956]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:00:39 rithvik-nitroan51557 kioslave5[5900]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:00:44 rithvik-nitroan51557 kwin_x11[21442]: Could not get Interfaces.  "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
Mar 28 18:00:44 rithvik-nitroan51557 kwin_x11[21442]: caretOffset called on accessible that does not implement text
Mar 28 18:00:57 rithvik-nitroan51557 kioslave5[5902]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:01:01 rithvik-nitroan51557 CROND[146222]: (root) CMD (run-parts /etc/cron.hourly)
Mar 28 18:01:01 rithvik-nitroan51557 CROND[146221]: (root) CMDEND (run-parts /etc/cron.hourly)
Mar 28 18:01:07 rithvik-nitroan51557 plasmashell[1358]: org.kde.plasma.notifications: Trying to replace notification with id 1881 which doesn't exist, creating a new one. This is an application bug!
Mar 28 18:01:08 rithvik-nitroan51557 kioslave5[1958]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:01:08 rithvik-nitroan51557 kioslave5[8136]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:01:09 rithvik-nitroan51557 kwin_x11[21442]: Could not get Interfaces.  "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
Mar 28 18:01:09 rithvik-nitroan51557 kwin_x11[21442]: characterRect called on accessible that does not implement text
Mar 28 18:01:09 rithvik-nitroan51557 systemsettings[146086]: Unable to start server org.kde.khotkeys (kded module) [ "org.freedesktop.DBus.Error.NoReply" ]: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
Mar 28 18:01:09 rithvik-nitroan51557 systemsettings[146086]: Version 2 File!
Mar 28 18:01:09 rithvik-nitroan51557 kwin_x11[21442]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 64274, resource id: 33559086, major code: 20 (GetProperty), minor code: 0
Mar 28 18:01:09 rithvik-nitroan51557 kwin_x11[21442]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 64275, resource id: 33559086, major code: 15 (QueryTree), minor code: 0
Mar 28 18:01:09 rithvik-nitroan51557 kwin_x11[21442]: kwin_core: XCB error: 152 (BadDamage), sequence: 64739, resource id: 15008146, major code: 143 (DAMAGE), minor code: 3 (Subtract)
Mar 28 18:01:15 rithvik-nitroan51557 kioslave5[1956]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!
Mar 28 18:01:30 rithvik-nitroan51557 kioslave5[5900]: kf.kio.slaves.http: Can't communicate with kded_kcookiejar!

Other than the obvious, “have you checked that khotkeys is installed?” not really. So…have you? Because it’s in the extra repository:

$ pamac search khotkeys
[...]
khotkeys                                                                                                                                                                                                        [Installed] 5.24.3-1                  extra
KHotKeys

So if it’s not installed, you can install it with:

pamac install khotkeys

Hope this helps!

Yup, it’s (still) installed after the update:

❯ sudo pacman -S khotkeys                                           
warning: khotkeys-5.24.3-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) khotkeys-5.24.3-1

Try reinstalling it, with pamac:

pamac reinstall khotkeys

Reinstalled with pacmac and rebooted, no luck.

I’m also noticing a few other issues, not sure if they’re related:

There’s no such thing. :wink: :stuck_out_tongue_winking_eye:

Try creating another user to see if the problems persists. That would help to either confirm or deny whether it’s a global thing.

Created a new user and none of the issues are present! What user-specific config can we look at to compare?

Hmmm…That I don’t know, but if nothing else you can always migrate your data to the new user.

Edit:

Or you could, if you migrate your user, copy the configuration files from your home directory 1-by-1 and see what is causing the problems…

Hm will try that later when free and get back here if it works. Thanks @Mirdarthos!

Have you solved it? I also encounter this issue.

The files holding hotkeys and shortcuts is

~/.config/khotkeysrc
~/.config/kglobalshortcutsrc

Back here to say I’ve not been able to fix any of the issues. Copying all config files I could find into a new user’s dir doesn’t introduce problems in that new user. Not sure what else is left to try.

@BlueHeart0621 nope. How about you, any fixes?

@linux-aarhus thanks, deleted files, but no luck. In fact, any change made in System Settings updates those two files you mentioned, but the error is after saving:
Unable to contact khotkeys. Your changes are saved, but they could not be activated.

Seems khotkeys isn’t installed. Or st least not running. Please provide the output of:

pamac search khotkeys

@Mirdarthos it’s installed:

❯ pamac search khotkeys
khotkeys-git               5.22.80_r2071.g04dcaf1-1  AUR 
    KHotKeys
khotkeys       [Installed] 5.24.5-1                  extra 
    KHotKeys

I’ve also tried reinstalling as you’ve suggested before :wink:

I’m beginning to get the idea that khotkeys configuration is per-locale. So…did you change locale?

I don’t think so. Also, the same issue exists even after deleting khotkeys config file so maybe the per-locale is a different issue/prob.

It might be global, I have no, none, zip, zilch (0) idea further. Sorry.

:sob:

When saving any khotkeys settings, after clicking on “Apply”, the window (and only that window) freezes for ~1-2 mins. And then errors with the message above.

journalctl -f has this line in red after the 1-2 mins (nothing interesting before this):

systemsettings[128978]: Unable to start server org.kde.khotkeys (kded module) [ "org.freedesktop.DBus.Error.NoReply" ]: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

Dunno why I hadn’t tried this before. But just renamed .config to something else and rebooted. All problems (not just custom shortcuts) are gone!

Now comes the task of finding out what exactly in .config is causing this (by moving it back file by file). There are just too many things so might take a while before I’m back with the result.

Hopeful it’ll work out :crossed_fingers:

1 Like

Okay good news: I’ve narrowed it down to konquerorrc and kwinrc, both in ~/.config/.
Not gonna bother figuring out which of them and which part of the file is causing issues, it’s just easier to set up kwin again.
Thanks again @Mirdarthos for sticking through it!

For anyone else facing the same issues:

  1. Rename .config to something else like .config.backup
  2. Reboot
  3. Check if Cookies opens normally (or any of your other issues don’t exist)
  4. If everything works, move a few files from .config.backup back to .config
  5. If something break, now you know which file/dir is the cause
  6. Repeat from 2 till .config.backup is empty.
  7. Profit!
1 Like