GNOME Bugzilla – Bug 741738
constant popup about wacom calibration despite already calibrated (Thinkpad X201t)
Last modified: 2016-03-10 15:00:57 UTC
I'm using gnome-shell 3.14.2-3 and gnome-control-center 1:3.14.2-2 on Debian jessie on a Thinkpad X201t that has a screen with touch, pen and eraser support. I've calibrated the pen, the calibration tool doesn't allow calibration of the touch or eraser parts of the screen input. Despite the fact that I already calibrated the only calibratable part of my screen input, gnome-shell keeps asking me to calibrate it. Here is the dconf dump of my wacom related settings, udev information for the device and an xinput dump of the 3 input devices that the Xorg wacom driver exports to X11 clients. pabs@chianamo ~ $ dconf dump / | grep -i wacom -A3 [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:0000:0000/0xfffff] buttonmapping=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] pressurecurve=[0, 0, 100, 100] [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:0000:0000] area=[72, 134, 26137, 16406] last-calibrated-resolution=(1280, 800) [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:0000:0000/0xffffe] pressurecurve=[0, 0, 100, 100] [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:056a:00e3/0xfffff] buttonmapping=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] pressurecurve=[0, 0, 100, 100] [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:056a:00e3] area=[0, 31, 26147, 16467] last-calibrated-resolution=(1280, 800) [org/gnome/settings-daemon/peripherals/wacom/6b1b8c9f8021eeb6f685a77d48917a8a-serial:056a:00e3/0xffffe] pressurecurve=[0, 0, 100, 100] [org/gnome/settings-daemon/peripherals/wacom/serial:0000:0000/0xfffff] buttonmapping=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] pressurecurve=[0, 0, 100, 100] [org/gnome/settings-daemon/peripherals/wacom/serial:0000:0000/0xffffe] pressurecurve=[0, 0, 100, 100] pabs@chianamo ~ $ sudo udevadm info -q all /dev/ttyS0 P: /devices/pnp0/00:05/tty/ttyS0 N: ttyS0 E: DEVNAME=/dev/ttyS0 E: DEVPATH=/devices/pnp0/00:05/tty/ttyS0 E: ID_INPUT=1 E: ID_INPUT_TABLET=1 E: ID_MM_CANDIDATE=1 E: ID_MODEL=Serial Wacom Tablet WACf00c E: MAJOR=4 E: MINOR=64 E: NAME=Serial Wacom Tablet WACf00c E: SUBSYSTEM=tty E: SYSTEMD_WANTS=wacom-inputattach@ttyS0.service E: TAGS=:systemd: E: USEC_INITIALIZED=427023 E: x11_driver=wacom pabs@chianamo ~ $ sudo udevadm info -q all /dev/input/event18 P: /devices/pnp0/00:05/tty/ttyS0/serio3/input/input19/event18 N: input/event18 E: DEVNAME=/dev/input/event18 E: DEVPATH=/devices/pnp0/00:05/tty/ttyS0/serio3/input/input19/event18 E: ID_INPUT=1 E: ID_INPUT_TABLET=1 E: ID_SERIAL=noserial E: MAJOR=13 E: MINOR=82 E: SUBSYSTEM=input E: USEC_INITIALIZED=815424 E: x11_driver=wacom pabs@chianamo ~ $ xinput list-props 17 18 19 Device 'Wacom Serial Penabled 2FG Touchscreen stylus': Device Enabled (133): 1 Coordinate Transformation Matrix (135): 0.432432, 0.000000, 0.000000, 0.000000, 0.688468, 0.311532, 0.000000, 0.000000, 1.000000 Device Accel Profile (257): 0 Device Accel Constant Deceleration (258): 1.000000 Device Accel Adaptive Deceleration (259): 1.000000 Device Accel Velocity Scaling (260): 10.000000 Device Node (252): "/dev/input/event18" Wacom Tablet Area (322): 0, 31, 26147, 16467 Wacom Rotation (323): 0 Wacom Pressurecurve (324): 0, 0, 100, 100 Wacom Serial IDs (325): 227, 1, 2, 0, 0 Wacom Serial ID binding (326): 0 Wacom Pressure Threshold (327): 27 Wacom Sample and Suppress (328): 2, 4 Wacom Enable Touch (329): 1 Wacom Hover Click (330): 0 Wacom Enable Touch Gesture (331): 1 Wacom Touch Gesture Parameters (332): 0, 0, 250 Wacom Tool Type (333): "STYLUS" (315) Wacom Button Actions (334): "Wacom button action 0" (335), "Wacom button action 1" (336), "Wacom button action 2" (337) Wacom button action 0 (335): 1572865 Wacom button action 1 (336): 1572867 Wacom button action 2 (337): 1572866 Wacom Pressure Recalibration (338): 1 Device Product ID (251): 1386, 227 Wacom Debug Levels (339): 0, 0 Device 'Wacom Serial Penabled 2FG Touchscreen eraser': Device Enabled (133): 1 Coordinate Transformation Matrix (135): 0.432432, 0.000000, 0.000000, 0.000000, 0.688468, 0.311532, 0.000000, 0.000000, 1.000000 Device Accel Profile (257): 0 Device Accel Constant Deceleration (258): 1.000000 Device Accel Adaptive Deceleration (259): 1.000000 Device Accel Velocity Scaling (260): 10.000000 Device Node (252): "/dev/input/event18" Wacom Tablet Area (322): 0, 31, 26147, 16467 Wacom Rotation (323): 0 Wacom Pressurecurve (324): 0, 0, 100, 100 Wacom Serial IDs (325): 227, 1, 10, 0, 0 Wacom Serial ID binding (326): 0 Wacom Pressure Threshold (327): 27 Wacom Sample and Suppress (328): 2, 4 Wacom Enable Touch (329): 1 Wacom Enable Touch Gesture (331): 1 Wacom Touch Gesture Parameters (332): 0, 0, 250 Wacom Tool Type (333): "ERASER" (341) Wacom Button Actions (334): "Wacom button action 0" (335), "Wacom button action 1" (336), "Wacom button action 2" (337) Wacom button action 0 (335): 1572865 Wacom button action 1 (336): 1572866 Wacom button action 2 (337): 1572867 Wacom Pressure Recalibration (338): 1 Device Product ID (251): 1386, 227 Wacom Debug Levels (339): 0, 0 Device 'Wacom Serial Penabled 2FG Touchscreen touch': Device Enabled (133): 1 Coordinate Transformation Matrix (135): 0.432432, 0.000000, 0.000000, 0.000000, 0.688468, 0.311532, 0.000000, 0.000000, 1.000000 Device Accel Profile (257): 0 Device Accel Constant Deceleration (258): 1.000000 Device Accel Adaptive Deceleration (259): 1.000000 Device Accel Velocity Scaling (260): 10.000000 Device Node (252): "/dev/input/event18" Wacom Tablet Area (322): 0, 0, 26312, 16520 Wacom Rotation (323): 0 Wacom Pressurecurve (324): 0, 0, 100, 100 Wacom Serial IDs (325): 227, 1, 3, 0, 0 Wacom Serial ID binding (326): 0 Wacom Pressure Threshold (327): 27 Wacom Sample and Suppress (328): 2, 4 Wacom Enable Touch (329): 1 Wacom Enable Touch Gesture (331): 1 Wacom Touch Gesture Parameters (332): 1156, 513, 250 Wacom Tool Type (333): "TOUCH" (342) Wacom Button Actions (334): "Wacom button action 0" (335), "Wacom button action 1" (336), "Wacom button action 2" (337) Wacom button action 0 (335): 1572865 Wacom button action 1 (336): 1572866 Wacom button action 2 (337): 1572867 Device Product ID (251): 1386, 227 Wacom Debug Levels (339): 0, 0
I've found a race condition (and am working on a patch) in gnome-settings-daemon which can cause the notification to appear whenever GNOME starts (in addition to its expected appearance after changing resolution or rotating). Do you see it more often than that? The race condition is as follows: 1) The display is at a resolution other than what you run GNOME in (e.g. as the boot process is finishing) 2) The 'wacom' plugin of gnome-settings-daemon initializes and starts two background tasks to a) monitor for new tablets and b) get references to your monitors. 3) Your tablet is found as part of (a). The current resolution does not match the "last-calibrated-resolution" and so a notification is created. 4) A separate plugin in gnome-settings-daemon adjusts the screen resolution to your preference. 5) References to your monitors are received as part of (b), and the 'wacom' plugin requests to be informed whenever the resolution changes. Unfortunately, since the resolution /already/ changed, it won't notice that it needs to delete the now-stale notification :(
> Do you see it more often than that? Yeah, the most common one is when I have an external monitor plugged into the VGA port and I switch to a virtual console and then switch back to GNOME. The notification doesn't happen if I don't have the external monitor plugged in though.
Created attachment 302188 [details] [review] wacom: Force calibration check after connecting to "changed" signal It is possible that 'check_need_for_calibration' may be called from 'device_added_cb' before we've connected to the GnomeRRScreen's "changed" signal. In the interim, we will not be notified of changes in the the desktop layout that may require us to close (or create) a calibration request notification. To be sure that this does not cause a problem, we check if there are any devices that need calibration immediately after connecting to the signal.
Created attachment 302189 [details] [review] wacom: Check if device needs calibrating on GsdDeviceMapper device-change If the 'check_need_for_calibration' function is called prior to the GsdDeviceMapper mapping the device to its intended display, we end up comparing the "last-calibrated-resolution" to the area of the entire desktop. If multiple monitors are connected, this comparison will allways fail and cause a spurious notification to appear. To fix this, we can listen for the "device-change" signal sent by GsdDeviceMapper whenever it maps a device to a display. By re-checking if calibration is needed at this point, we ensure that created notification is closed if it is not actually needed.
Hopefully Carlos can give these patches a review for me :) (In reply to Paul Wise from comment #2) > > Do you see it more often than that? > > Yeah, the most common one is when I have an external monitor plugged into > the VGA port and I switch to a virtual console and then switch back to > GNOME. The notification doesn't happen if I don't have the external monitor > plugged in though. I haven't had any luck reproducing the extra notifications when switching to a VT with GNOME 3.16. That said, if the resolution changes between X and the VT when you have that VGA monitor connected, then there might be a chance that these would help with that too.
Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. In the future, Jason, don't forget to reassign the bug to the right product, otherwise we'll never see your patches. This one ended up being mentioned in another bug, which is the only reason why I found it, probably too late to resuscitate it. *** This bug has been marked as a duplicate of bug 748659 ***