You are not logged in.

#1 2025-09-19 11:13:11

arismav
Member
Registered: 2025-06-06
Posts: 3

udev kanata issues after full system update

Hello everyone,

I am using [kanata](https://github.com/jtroo/kanata) to rebind my keyboard, and I am running it as a systemd service, as described [here](https://github.com/jtroo/kanata/blob/ma … p-linux.md).

After a recent update, the service will not start, unless I manually run "sudo modprobe uinput" after every reboot.

The error I get before running the command above looks like:
```
$ kanata

12:00:41.9878 [INFO] kanata v1.9.0 starting
12:00:41.9884 [WARN] No defcfg is defined. Consider whether the process-unmapped-keys defcfg option should be yes vs. no. Adding defcfg with process-unmapped-keys defined will remove this warning.
12:00:41.9884 [INFO] process unmapped keys: false
12:00:41.9891 [INFO] config file is valid 12:00:41.9892 [ERROR] Failed to open the output uinput device. Make sure you've added the user executing kanata to the uinput group
12:00:41.9892 [ERROR] Permission denied (os error 13)
```

I added uinput to "/etc/modules-load.d/uinput.conf" and I can start the service by "systemctl --user start kanata.service", but "systemctl --user enable kanata.service" does not make it start automatically for some reason.

Is there a way to overcome this and start it automatically?
What recent change might have caused this behavior?

Last edited by arismav (2025-09-19 12:01:59)

Offline

#2 2025-09-19 20:24:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,759

Re: udev kanata issues after full system update

Systemd has this in it's changelog

        * systemd-udevd ignores OWNER=/GROUP= settings with a non-system
          user/group specified in udev rules files, to avoid device nodes being
          owned by a non-system user/group. It is recommended to check udev
          rules files with 'udevadm verify' and/or 'udevadm test' commands if
          the specified user/group in OWNER=/GROUP= are valid.
          Similarly, systemd-networkd refuses User=/Group= settings with a
          non-system user/group specified in .netdev files for Tun/Tap
          interfaces.

"Non-system groups" are likely groups with a GID higher than 1000 so a quick fix would be to make sure the GID of uinput is lower than that, but this feels ugly, I'd assume a proper session rule should work better? But not sure whether kanata hard expects the uinput group, but that a simple reload of the module works around this also sounds weird.

Offline

#3 2025-09-20 18:32:55

arismav
Member
Registered: 2025-06-06
Posts: 3

Re: udev kanata issues after full system update

Thanks a lot for the explanation V1del.

I suppose it would be good to ask the kanata people about it to see if there's any elegant solution to this.

Hopefully Ill have an update soon.

Offline

#4 2025-09-21 16:11:53

Tucky
Member
Registered: 2012-10-24
Posts: 10

Re: udev kanata issues after full system update

I experience the same issue except I can not start Kanata even after I run `sudo modprobe uinput`.

Offline

#5 2025-09-22 07:57:14

arismav
Member
Registered: 2025-06-06
Posts: 3

Re: udev kanata issues after full system update

A fix has been provided here: https://github.com/jtroo/kanata/issues/1799

Offline

Board footer

Powered by FluxBB