I couldn't quite get my generic / eGalax USB touch-panel working right, on my Mint 18.2 system, with any answer I found on its own, but thought I should share what worked for me.
I first disabled my my non-touch monitor (as suggested by Beni Cherniavsky-Paskin) and calibrated my touch-panel using xinput_calibrator
.
Turned my other monitor back on (via the display section of the System Settings panel).
At that point the touch panel is well calibrated, but input still maps through both monitors.
To offset it all the way to the desired monitor/area, I then re-mapped the panel's "Coordinate Transformation Matrix" as advised in this manual using
$ xinput set-prop "Device Name" --type=float "Coordinate Transformation Matrix" c0 0 c1 0 c2 c3 0 0 1
For Device Name
I used xinput --list
to get the touch-panel's id. From the following ouput I got the id 13 :
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SIGMACH1P USB Keyboard id=10 [slave pointer (2)]
⎜ ↳ SOAI Gaming Mouse id=12 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=13 [slave pointer (2)]
I calc'd the params as explained in the mentioned manual.
e.g. For me a 768px wide touch-area offset by my 1900px monitor, got me a c0 = 768/(1900+768) = 0.287856
. Ended up with this command:
$ xinput set-prop 13 --type=float "Coordinate Transformation Matrix" 0.287856, 0.000000, 0.712114, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
That got it all running fine. btw I did have some issues, which seem to disappear when I used only 6 decimal places precision for the params idk if that is actually required or, more likely I just had messed-up sth else.