-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Version Information:
- Distribution: NixOS
- swhkd version: Simple-Wayland-HotKey-Daemon 1.3.0-dev, built off c5c4071
After #270, the docs at https://github.com/waycrate/swhkd/tree/main/contrib/init/systemd for autostarting swhkd/swhks using systemd is outdated because pkexec is not longer required.
I tried to create a systemd service that starts swhkd on its own (while swhks is started by my compositor). However, once any keybind is triggered, swhkd coredumps and crashes:
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z TRACE swhkd] Logger initialized.
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd::perms] Setting EGID...
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd::perms] Setting EUID...
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd::perms] Setting initgroups...
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd] Wating for server to start...
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z INFO swhkd] Env refreshed
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z TRACE swhkd] Environment Aquired
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z TRACE swhkd] Setting process umask.
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z TRACE swhkd] Reading /run/user/1000/swhkd_4294967295.pid file and checking for running instances.
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd] Previous PID: 6644
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd] Using config file path: "/home/heyzec/.config/swhkd/swhkdrc"
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z DEBUG swhkd] 1 Keyboard device(s) detected.
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z ERROR swhkd] Could not open evdev device at /dev/input/mouse0: Inappropriate ioctl for device (os error 25)
Sep 06 12:49:50 devpad swhkd-start[17859]: [2025-09-06T04:49:50Z TRACE swhkd] Other: swhkd switches virtual output
...omitted...
Sep 06 13:07:36 devpad systemd-coredump[33005]: [🡕] Process 17859 (swhkd) of user 0 dumped core.
Module /nix/store/1bdckwi5ki5n3mw589l99h8j9vbslazd-swhkd-c5c4071459a6465a3743a8bb5bb990e27cdf315b/bin/swhkd without build-id.
Module libcap.so.2 without build-id.
Module libgcc_s.so.1 without build-id.
From above, swhkd is using /run/user/1000/swhkd_4294967295.pid as the IPC socket. From
Line 650 in c5c4071
| fn get_uid() -> Result<u32, Box<dyn Error>> { |
4294967295 (equivalent to -1 for 32-bit unsigned) is obtained from /proc/{}/loginuid. Login UID is unset when launched directly from systemd.Metadata
Metadata
Assignees
Labels
No labels