Skip to content

Mount full /dev/input for dynamic input devices? #148

@embik

Description

@embik

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions