GNOME Bugzilla – Bug 748589
Screen mapping incorrect for Cintiqs
Last modified: 2018-01-15 10:32:26 UTC
Plugging a Wacom Cintiq (with an external display) on Gnome 3.16 makes the stylus mapped to the internal screen of the laptop instead of the external one. If the Cintiq has touch, the touch is also mapped to the internal display. It used to be automatically mapped to the cintiq screen, so it is a regression.
Created attachment 302657 [details] gnome-settings-daemon -r --debug log G-s-d log (with debug). I first replaced the session gsd with this one with only the external display plugged, then plugged the USB part of the Cintiq 22HDt.
I made some further debugging: it looks like the heuristic functions to remap an input to a display are never called. I tried a *very* hackish way to force the remapping by inserting: ----- diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c index ce70fd0..3aa25b0 100644 --- a/plugins/common/gsd-device-mapper.c +++ b/plugins/common/gsd-device-mapper.c @@ -709,6 +709,8 @@ input_info_update_settings_output (GsdInputInfo *info) if (output == info->output) return; + output = NULL; + if (output) { input_info_set_output (info, output, FALSE, FALSE); input_info_remap (info); ----- This made things better and allowed to have the cursor under the stylus. It however makes g-s-d crash with a Cintiq and an Intuos plugged at the same time. I think the problem comes from the fact that an output gets automatically assigned to each new device through info->mapper->output_devices and so the heuristic to determine which input needs to get mapped to which output are never called.
Any updates on this? The issue still seems to be present in gnome 3.20 I've had to resort to using xsetwacom to switch it to the correct monitor, but even then calibration will show on the laptop screen instead of the Cintiq. When the laptop screen is off, calibration is disabled.
This is sadly still an issue using Gnome 3.22 running on Fedora 25 with Wayland.
I believe there have been some updates, but you might not see their effect if you're upgrading an existing installation. GNOME only goes through the screen mapping process once and then saves its best match. It will continue to use whatever it thought was the best match at the time until that setting is cleared. To clear the setting and force GNOME to remap the tablet (hopefully with better results), use the following procedure: 1) Run `dconf-editor` 2) Navigate to `/org/gnome/desktop/peripherls/tablets` 3) Select the directory corresponding to your Cintiq (e.g. my Cintiq 24HD has a USB VID:PID of '056a:00f8' so I choose that. Check [1] for a list of other IDs. 4) One of the keys listed should be "display". Click on it to edit. 5) Change the "Custom value" to the following: ['', '', ''] 6) Once you click "Apply", GNOME should automatically run its tablet mapping function. You can verify this by closing and re-running `dconf-editor`. The value for "display" should be filled in once again. If not, try disconnecting and reconnecting your Cintiq's USB connection. Ideally GNOME will have mapped the tablet to the correct display at this point... If not, then this is still a bug. [1]: http://linuxwacom.sourceforge.net/wiki/index.php/Device_IDs
Thank you, this indeed helped - even calibration is displaying on the correct screen now. Do you know when that change introduced? Because the machine was installed with Fedora 24 and then upgraded to 25. One thing to mention is that my machine is a laptop switching between two docking stations where one has a Wacom Cintiq 21UX2 and the other has no comparable display. Both stations have the same amount of screens but entirely different resolutions and manufacturers. So the main problem now is, that there is no way to reset this setting using the gui. But again, thank you for the help!
Unfortunately, I couldn't possibly guess when the change was made... I've done some more research and found that bug 739891 attempted to prevent the setting from becoming "stale" by updating the mapping when the displays change. That's great to hear, but doesn't seem to be quite doing the trick in your case. I would have expected the mapping to be updated when you connected/disconnected your laptop from the docking stations. Might be worth filing a bug about that.
That fix worked for me as well. Calibration through the the gui works as it should now too. Thank you!
Trying a bit harder, I think this is related to the order in which output/input are made known. If I reset the key, plug the output and then the input, it's able to find the output correctly at the time of mapping the input device. If I flip the plugging order, the input device gets first mapped to the laptop display, and it stays exactly the same when I plug the corresponding output.
Created attachment 366812 [details] [review] common: Ensure screen integrated devices get remapped on hotplug GsdDeviceMapper used to refrain from remapping devices that already had a configured output. This however results on wrong mapping when the input device is plugged before the output, since the heuristics will attempt really hard to find an output for the device before the real one is available, and not remapped again when the output is plugged. Fix this by forcing remapping on all screen-integrated devices on every hotplug event, so the input device will get remapped to the right screen (hopefully!) when it is plugged. This is not applied to devices mapped to the builtin output, or those with no attached output at all, as in both of these cases the configured output should be left static.
Created attachment 366813 [details] [review] Fix screen mapping for Cintiqs and others Size-based input/output matching doesn't raise the "found" flag, which would result on input_info_guess_candidates() still trying to assign the builtin output to the input device if that is the only match found. For screen integrated devices (i.e. not on the builtin output) this is and undesirable possibility, setting the "found" flag to TRUE results on the correct output being assigned. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Benjamin/me worked on these patches that let screen-attached device pick the right output independently of the input/output discovery order. They are now in master and gnome-3-24 Attachment 366812 [details] pushed as 1c1a420 - common: Ensure screen integrated devices get remapped on hotplug Attachment 366813 [details] pushed as 9b08637 - Fix screen mapping for Cintiqs and others