IVI/Mapping multiple touchscreen Wayland
In a multitouchscreen scenario, it is important to be able to correctly map the touchscreen input to the right screen. Wayland/Weston provide a mechanism for doing just that that leverages
udev so that you can also make this a permanent rule for your own system.
Collecting the right information
You really need two things to be able to define the mapping:
<display name>", this can be obtained by looking at the weston log . It typically is something like
HDMI1, HDMI2, VGA1, UNKNOWN1, ...
- Information about the touchscreen, e.g.:
- Note: You can get that information from
/sys/class/input/inputX/[name|id/]where 'X' is the input number associated with the touchscreen.
- Note2: It's frequently the case that you want to use multiple instances of the exact same device in which case the
product_idalone are not sufficient to uniquely identify your device. In such case, you can also use the
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-4/*". Be aware when doing so that you will have to adjust your
DEVPATHvalue if you later use a different USB port.
How to get the right
DEVPATH value for your device:
- Plug your USB touchscreen device
- Write down the
 Log in as 'root' and use
journalctl -b to view all system logs (for that boot), the weston output is captured as part of it.
Creating a customer udev rule
Once you have collected the relevant information, you can put it all together by creating a custom
- Typically put it under:
- Put the following info in this file:
vendor_id, product_id, DEVPATH and display_name should be replaced by the values collected previously.
Applying the changes
- Unplug and replug the touch device to apply the new udev rules
- Restart Weston
... or simply reboot your device