[GH-ISSUE #7] Absolute devices (touchscreen, mouse absolute) fails with min == max on ABS_X #7

Open
opened 2026-10-30 21:32:23 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @Markus328 on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/joleuger/vuinputd/issues/7

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.

Originally created by @Markus328 on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/joleuger/vuinputd/issues/7 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.
Author
Owner

@joleuger commented on GitHub (Feb 26, 2026):

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

<!-- gh-comment-id:3967371141 --> @joleuger commented on GitHub (Feb 26, 2026): Thank you for your report. I can reproduce the problem.
Author
Owner
<!-- gh-comment-id:3968788619 --> @joleuger commented on GitHub (Feb 26, 2026): Trace https://github.com/LizardByte/Sunshine/blob/83e8fcf15987c2899eb61a0484919744bf6b51df/src/platform/linux/input/inputtino_common.h#L33 https://github.com/games-on-whales/inputtino/blob/504f0abc7da8ebc351f8300fb2ed98db5438ee48/src/uinput/mouse.cpp#L107 https://github.com/games-on-whales/inputtino/blob/504f0abc7da8ebc351f8300fb2ed98db5438ee48/src/uinput/mouse.cpp#L117C29-L117C45 https://github.com/games-on-whales/inputtino/blob/504f0abc7da8ebc351f8300fb2ed98db5438ee48/src/uinput/mouse.cpp#L66C36-L66C52 https://gitlab.freedesktop.org/libevdev/libevdev/-/blob/master/libevdev/libevdev.c?ref_type=heads#L1581
Author
Owner

@joleuger commented on GitHub (Feb 26, 2026):

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.

<!-- gh-comment-id:3968846726 --> @joleuger commented on GitHub (Feb 26, 2026): 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.
Author
Owner

@Markus328 commented on GitHub (Mar 4, 2026):

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

<!-- gh-comment-id:4000363520 --> @Markus328 commented on GitHub (Mar 4, 2026): 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
Author
Owner

@Markus328 commented on GitHub (Mar 4, 2026):

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

<!-- gh-comment-id:4000380099 --> @Markus328 commented on GitHub (Mar 4, 2026): 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
Author
Owner

@joleuger commented on GitHub (Apr 6, 2026):

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.

<!-- gh-comment-id:4195357055 --> @joleuger commented on GitHub (Apr 6, 2026): 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 in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joleuger/vuinputd#7
No description provided.