generic-device-plugin icon indicating copy to clipboard operation
generic-device-plugin copied to clipboard

Mount full /dev/input for dynamic input devices?

Open embik opened this issue 1 month ago • 8 comments

Hi, thanks for the plugin! It's been very helpful so far.

I'm currently trying to get Sunshine to run with sway in a Kubernetes pod. Unfortunately, for a working mouse and keyboard via Sunshine I need to use the libinput backend for sway and that requires interaction with /dev/input devices. I want to avoid privileged: true as a setting. I have handed /dev/uinput as a device into the pod via this plugin, and Sunshine creates its input devices dynamically via it.

That means I need dynamic access to /dev/input in the container, because the input devices don't exist at container creation. I've tired a couple of configurations along the lines of

            - --device
            - |
              name: input
              groups:
                - paths:
                    - path: /dev/input
            - --device
            - |
              name: input
              groups:
                - paths:
                    - path: /dev/input/*
                      mountPath: /dev/input

But it looks like the container only has access to pre-existing entries in /dev/input with e.g. the first option. The second option bumps the count to something like 18, but then it tries to mount devices that no longer exists. Is that a limitation of device plugins as a whole perhaps? Is there a way to do this with generic-device-plugin at all?

embik avatar Jan 11 '26 12:01 embik