Wacom Cintiq tablet may map to wrong display by default
Affected version
- Arch Linux (latest update: 2020-04-09)
- GNOME 3.36.1
- Mutter 3.36.1-1
- Xorg (unable to test Wayland)
Bug summary
Connecting a Wacom Cintiq display tablet to a system alongside a second monitor may result in tablet input being mapped to the wrong display. In my particular case, I have a a 24" Dell E248WFP connected to DVI-I-2 and a 24" Cintiq 24HDT connected to DVI-I-3. Using the pen on the Cintiq causes the pointer to move on the Dell instead.
I am using an Nvidia video card with the binary drivers, so I cannot currently test if this issue also exists under Wayland (though I suspect it does).
Steps to reproduce
- Ensure a generic monitor is already connected to your computer
- Connect a Cintiq display to the computer as a second display
- Move the pen over the Cintiq
What happened
Moving the pen on the Cintiq caused the pointer to move on the Dell display. This issue may not appear depending on your precise setup.
What did you expect to happen
Moving the pen on the Cintiq should cause the pointer to move on the Cintiq display.
Workarounds
- In GNOME 3.36, the GNOME Control Center's new "Decouple Display" option can be used to force the proper mapping, but doing so disables the "Calibrate" function.
- Swapping the monitor connections for the Dell and Cintiq (so the Dell is on DVI-I-3 and the Cintiq is on DVI-I-2) works around the issue.
Relevant logs, screenshots, screencasts etc.
I suspect that this issue is caused by a poor choice of "best" monitor by the src/backends/meta-input-mapper.c:guess_candidates
function. In my case, GNOME wants to prefer the monitor which is closest in size to the tablet sensor. Unfortunately, both displays have identical sizes (518mm x 324mm), so GNOME arbitrarily uses the first display. Other information (e.g. vendor/product match) is not taken into account to break the tie. This might also explain why swapping the connections as mentioned above has an effect.
Assuming this is the issue, GNOME should have a more robust system in place that is less likely to find itself having to arbitrarily break a tie. For example, use a weighted scoring mechanism which still gives preference to matching by size, but would allow monitors which also match by EDID (more for complete, less for partial) to have a slightly higher total score.