Kglobalaccel daemon no longer starting automatically: "The name is not activatable", possibly caused by a bad package install

Hey all,

I just noticed after about a month that my keyboard shortcuts have stopped working. Doing some digging online showed me that the kglobalaccel daemon is responsible for that, so I tried manually enabling it, only for systemctl to say that it doesn’t exist. But the service file does, for sure; it’s in usr/lib/systemd/user/plasma-kglobalaccel.service on my machine. So I checked my systemd logs to see what the issue was

it seems kglobalaccel stopped working on November 21 around 22:21. I have some suspicions as to why that I’ll get to later:

Nov 21 19:04:12 pnp-pc systemd[581]: plasma-kglobalaccel.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 19:04:12 pnp-pc systemd[581]: plasma-kglobalaccel.service: Failed with result 'exit-code'.
Nov 21 22:21:02 pnp-pc kwin_x11[731]: Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name is not activatable")
Nov 21 22:21:02 pnp-pc plasmashell[767]: Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name is not activatable")
Nov 21 22:21:02 pnp-pc kactivitymanagerd[783]: Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name is not activatable")

…and messages like the latter message continue on with several different services trying to start it, to no avail, all the way up to the present day.

Now at first this would be where my question starts, but I also decided to do a search for pacman (my package manager) commands being sent around this time, and…

Nov 21 19:31:15 pnp-pc sudo[1954]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S Qt6
Nov 21 19:31:20 pnp-pc sudo[1966]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S qt6
Nov 21 19:34:54 pnp-pc sudo[3154]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S qt6-graphicaleffects
Nov 21 19:34:58 pnp-pc sudo[3160]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S qt5-graphicaleffects
Nov 21 19:35:14 pnp-pc sudo[3194]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S plasma-extras
Nov 21 19:35:20 pnp-pc sudo[3206]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -S plasma-framework5
Nov 21 19:38:13 pnp-pc sudo[4630]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -Rd plasma-extras
Nov 21 19:38:23 pnp-pc sudo[4639]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -Rd plasma-framework5
Nov 21 19:38:31 pnp-pc sudo[4658]: plugnplay : TTY=pts/2 ; PWD=/home/plugnplay ; USER=root ; COMMAND=/usr/bin/pacman -Rd plasma-framework5

All of these installs and removals happen just after my last successful kglobalaccel launch at 19:04:12 and before my first failiure at 22:21:02, making me believe they might be responsible somehow…
If I recall correctly I installed and removed these packages after unsuccessfully attempting to patch an incompatible SDDM theme to work with Plasma. The plasma-extras package does not exist and I likely just confused it with plasma-framework5.

After seeing these messages, I tried using systemctl again using the actual kglobalaccel folder directory I mentioned above, and it warned about the empty unit file associated with it, which makes sense considering it is usually started by Plasma anyway. So out of fear that I might cause a conflict somewhere, I disabled it again for now. (BUT while it was working, my keyboard shortcuts returned!)

MY QUESTION(s): how should I go about SAFELY re-enabling kglobalaccel? Will manually enabling it on startup be a valid fix? And what more specifically could have caused this?

Hi! One quick question, when you’re using systemd commands like systemctl to interact with that service, are you using the --user flag? That’s important for user services like this one, since they’re managed separately from the system services - here’s an example from my system:

$ systemctl status plasma-kglobalaccel
Unit plasma-kglobalaccel.service could not be found.

$ systemctl --user status plasma-kglobalaccel
○ plasma-kglobalaccel.service - KDE Global Shortcuts Server
     Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
    Drop-In: /usr/lib/systemd/user/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead) since Sat 2024-12-21 23:24:14 EST; 13h ago
 Invocation: c4d5aff0b8fd4fda96fd46123b5e3f9c
    Process: 1984 ExecStart=/usr/libexec/kglobalacceld (code=exited, status=0/SUCCESS)
   Main PID: 1984 (code=exited, status=0/SUCCESS)
   Mem peak: 3.9M
        CPU: 22ms

Dec 21 23:24:14 hostname systemd[1720]: Starting plasma-kglobalaccel.service - KDE Global Shortcuts Server...
Dec 21 23:24:14 hostname systemd[1720]: Started plasma-kglobalaccel.service - KDE Global Shortcuts Server.

(post deleted by author)

Sorry, at first I completely misunderstood what you were saying… :sweat_smile:

Yes, it seems I forgot to specify it as a --user service. (sudo systemctl got to be such a habit for me after setting up my other system services!)

here’s the output when I added --user:

> systemctl status plasma-kglobalaccel.service --user
○ plasma-kglobalaccel.service
     Loaded: masked (Reason: Unit plasma-kglobalaccel.service is masked.)
     Active: inactive (dead)

It’s been masked somehow… I assume I’m safe to just unmask it?

Edit: Yep, that did it! It works on startup now. Really strange how that happened… I’m not even sure if the package shenanigans could have caused this. Either way, thanks for the missing piece I was looking for!

1 Like

Just saw your edit - nice, glad that helped! I’ve lost count of the number of times I’ve been confused by something “missing” in systemd services, and realized it was because I was looking at system and needed user (or vice versa). So, it’s something I think of only because I’ve banged my head on my keyboard so many times :slight_smile:

1 Like