Touchscreen support for VMs (#3887, #3337)

30 views
Skip to first unread message

Alex Barinov

unread,
Apr 27, 2021, 4:04:20 AM4/27/21
to qubes...@googlegroups.com

Hi there,

I implemented passing touch events from dom0 to guest vms. This code allowed me to scroll pages with my finger in Chromium with no additional configuration, 'xinput text-xi2' reports touch events in vms. The implementation is split across 3 repos:

https://github.com/a-barinov/qubes-gui-common.git
- Adds touch evens support to the qubes gui protocol
- Bumps protocol version to 1.4

https://github.com/a-barinov/qubes-gui-daemon.git
- Adds touch events processing to qubes-guid
- Does not (yet) support passing touch pressure or touchscreen buttons (e.g. stylus with buttons) to vms, this shall be relatively easy to add though.
- introduces new dependency to xinput. I hacked this into Makefile (-lXi), not sure if 'pkg-config --libs Xi' is needed instead. I have no idea how to add this dependency to build-depends for deb or rpm so I just installed xinput-dev to the build environment.

https://github.com/a-barinov/qubes-gui-agent-linux.git
- Adds touch event processing on vm side
- Does not yet support multitouch, touch pressure or touch buttons
- Initial goal was to add touchscreen emulation to xf86-input-mfndev. This turned out to bee pretty difficult (almost no into on how to write a new touchscreen x11 driver) so I opted to just focus the recipient window through the driver and create an evdev touchscreen device instead.
- Touchscreen device uses the same resolution as X server on vm startup; no dynamic reconfiguration is supported
-
introduces new dependencies to libevdev and libevemu. I hacked this into Makefile, not sure if pkg-config is needed instead.
- This implementation requires xserver-xorg-input-libinput (debian package name) to be installed in vms for X server to see the touchscreen. I have not added this as recommended or required package dependency.

Notes for all repos:
- All the changes are ifdef'ed with '#ifdef XI2'. Removing '#define XI2' will fall back to the original code
- My touchscreen device (GPD Win2) died at the end of this development. Touch pressure and stylus buttons support will be added after I get a new laptop.

Happy to receive any feedback as I'm keen to see guest touchscreen support mainlined into qubes.

--
Kind regards,
Alex
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages