Cannot map multiple USB connected touchscreens with identical make and model
Since on Wayland using xinput map-to-output
isn't an option anymore,
Mutter would have to fulfill these duties in some way.
Currently the input peripheral's USB vendor and product IDs (VID:PID
)
are used to map to the output's EDID vendor, model and serial number.
This doesn't make it possible to have multiple identical touchscreens
that obviously use the same USB VIDs and PIDs.
As far as I can tell the assignment is done in
src/backends/meta-input-settings.c
but this would at least also
require a change to org.gnome.desktop.peripherals.gschema.xml
from
gsettings-desktop-schemas.
I am not sure what other variable should be included to make the input
device's identification unique. Maybe the full path to the USB device
as is used in /sys
or is there some other reliable identifier that
could be used in addition?
Also I don't know if that's something that GNOME wants to support but touchscreens may also still be connected trough interfaces other than USB like a serial port.
In general this is a somewhat uncommon use-case but there are some applications that come to mind:
-
Industrial setups where touchscreen panels are used for HMI. It's quite common to have multiple touchscreens, that are typically the same models, to control machines.
-
Some rather new laptop designs that are dual touchscreen instead of having a keyboard and touchpad. I know that these are mostly still concept designs but I think that most of these would probably use the same USB vendor and product IDs on both touchscreens.
In both of these cases it seems like it's pretty much impossible to do automatic mapping, since there is no information that can be used to identify them. Unless they use some convention about making a relation between their serial numbers between HID and EDID?
I think it's really cool that so much of this happens automatically and in many cases without any user ever knowing that something like this is even necessary. But maybe it would be nice to be able to manually map input devices to outputs if it's actually necessary. In that case it would also be really handy to have a frontend for calibration like Weston's touch calibrator.