On 04/06/16(Sat) 14:49, Edd Barrett wrote: > Hi, > > My x240t has a touch screen and a stylus. It works well upon first boot > (asides from the pointer co-ordinates are not yet translated when the > screen is rotated). However, after suspend and wake, placing the pen on > or near the screen will cause the pointer to jump to the bottom right > hand corner of the screen. > > I can fix this with: > > $ xinput --disable /dev/wsmouse3 > $ xinput --enable /dev/wsmouse3 > > Looking in my mail archives, I see that I spoke to mpi and matthieu > about this a while back (adding to CC). We did not find a suitable fix > and the problem persists. > > Matthieu's working theory was (and still is Matthieu?) as follows: > > ---8<--- > * Machine is resuming > * X comes back and at the same time USB devices reattaches > * the above is racy, so sometimes X comes back before its previous input > devices are back > * When that happens, X cannot reopen the input device, so it disables > it (but not cleanly - thats another issue I want to look at) > * When the USB device is reattached later, it gets back to the mux > * xf86-input-ws only gets events though the mux and thus can't apply > proper calibration > --->8---
The problem starts when you suspend. Your device is detached. So next time X will try to read from the corresponding /dev/wsmouse1 node it will fail. Now in practice X reads after resuming. Maybe Ulf has an idea of how to move the calibration logic to the kernel such that as soon as a new device attaches, it gets calibrated to match the corresponding screen.
