Skip to content

Absolute devices (touchscreen, mouse absolute) fails with min == max on ABS_X #7

Open

Description

@Markus328

I'm running a nspawn container with a headless session of sway, with sunshine configured. When using android moonlight clients, it's possible to use Pen (S pen per example) and mouse absolute and even passthrough the touchscreen. But all of these, are absolute devices, and won't work only when using /dev/vuinput as uinput.

Sunshine can create the devices, but the devices are invalid, throwing errors on libinput list-devices, from inside the container:

event16 - Mouse passthrough (absolute): kernel bug: device has min == max on ABS_X

On host, disabling the udev rules I can confirm the errors also occurs, I cannot use absolute mouse if the sunshine was started within the container. Having a sunshine instance outside the container, that exposes my host, with working absolute mouse I confirm the issue very probably is how vuinput handles those devices.

Activity

  1. joleuger commented on Feb 26, 2026

    @joleuger
    Owner

    Thank you for your report. I can reproduce the problem.

  2. joleuger commented on Feb 26, 2026

    @joleuger
    Owner

    Okay, I remember. This is actually a pretty old implementation gap. And as far as I can see the only one left for ioctl.

    It is actually not implemented at all.
    https://github.com/joleuger/vuinputd/blob/0.3.2/vuinputd/src/cuse_device/vuinput_ioctl.rs#L273

    UI_ABS_SETUP => {
                //todo: i guess this needs to be reworked as this is variable size. i guess it is not reachable at all
                debug!("fh {}: ioctl UI_ABS_SETUP", fh);
                assert!(_in_bufsz != 0, "should have _in_bufsz");
                fuse_l
    

    The problem back then was that the content of UI_ABS_SETUP is dynamic and I need to extract the size out of the submitted ioctl. I haven't implemented it back then, because my focus was on the gamepad first.

    https://github.com/joleuger/vuinputd/blob/main/vuinputd/src/cuse_device/vuinput_ioctl.rs#L57
    https://github.com/torvalds/linux/blob/master/drivers/input/misc/uinput.c#L930

    Thanks for the hint. Is it in any way urgent for your use case? I just don't manage to fix it in the next two weeks. Sorry for the inconvenience.

  3. Markus328 commented on Mar 4, 2026

    @Markus328
    Author

    Hi, I wondered this was just a unimplemented function. Its not that urgent, even if its not fixed my use would continue since I pretend to use bluetooth mouse anyway. Just in such cases that I cannot get them it would be pretty annoying some applications. But not that bad

  4. Markus328 commented on Mar 4, 2026

    @Markus328
    Author

    Saying again: Great software! thanks to it I can run rootless containers with working and isolated sunshine inside. Thank you for developing this. I havent touched any rust code in my life, else maybe I could help with

  5. added a commit that references this issue on Apr 6, 2026
  6. joleuger commented on Apr 6, 2026

    @joleuger
    Owner

    Thanks for your compliment. That really motivates me! I have managed to add a small tryfix. At least in my setup, it does not destroy anything. When I have successfully implemented a proper test case, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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