USB Touchscreen scaling issue on 7" 1024x600; I've tried it all, no resolution

I’ve read many other threads on this topic and most people seem to have resolved the issue and I’m not sure how.

My issue: running Oram stable (and Vangelis), my USB-based touch inputs are incorrectly scaled. My touch screen is reporting in xinput as 1920x1080 but in ts_calibrate/ts_draw it is operating correctly in the range 1024x600. xinput reporting 1920 width explains why only the top left corner is registering, the top left of the screen is 1024x600 of the unscaled 1920x1080.

Unlike others have reported: Unplugging and re-plugging my USB touchscreen does not fix the scaling issue for me.

The display/touch works perfectly fine in an official bookworm image using the same config.txt settings, however there wayland/wayfire is in use so who knows how that translates to a pure xinput world?

I believe the solution is that I need to specify a Coordinate Transformation Matrix but here’s what’s happening:

  1. xinput sees my touch device TSTP MTouch as a “Floating slave”

root@zynthian://zynthian# xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ GHW Micro GHW USB AUDIO Consumer Control id=6 [slave keyboard (3)] ↳ GHW Micro GHW USB AUDIO id=7 [slave keyboard (3)] ↳ vc4-hdmi-0 id=10 [slave keyboard (3)] ↳ vc4-hdmi-1 id=11 [slave keyboard (3)] ↳ TSTP MTouch id=8 [slave keyboard (3)] ∼ TSTP MTouch id=9 [floating slave]

2. I can reattach the device with xinput reattach and xinput enable the device. I can also specify the coordinate translation matrix temporarily, but as soon as I issue systemctrl restart zynthian, the devices are reinitialized and it is again detached..?

  1. The logs at /var/log/Xorg.0.log indicate this device has no driver and doesn’t get added when zynthian starts:
[    10.920] (II) No input driver specified, ignoring this device.             
[    10.920] (II) This device may have been added with another device file.     
[    11.275] (II) modeset(0): Disabling kernel dirty updates, not required.     
[    39.744] (II) config/udev: removing device TSTP MTouch                      
[    39.744] (II) evdev: TSTP MTouch: Close                                     
[    39.744] (II) UnloadModule: "evdev"                                         
[    39.745] (II) config/udev: removing device TSTP MTouch                      
[    39.772] (II) evdev: TSTP MTouch: Close                                     
[    39.772] (II) UnloadModule: "evdev"                                         
[    48.506] (II) config/udev: Adding input device TSTP MTouch (/dev/input/mouse
0)                                                                              
[    48.506] (II) No input driver specified, ignoring this device.              
[    48.506] (II) This device may have been added with another device file.     
[    48.560] (II) config/udev: Adding input device TSTP MTouch (/dev/input/event
3)

Does anyone have any suggestions? Thank you so much!!

I don’t know exactly what you have to do, but perhaps this will give you some options, in webconf, if you click on the Display named - “Waveshare 7 HDMI+USB 1024x600” you will get more info and setting the upper right checkbox “Advanced View” will give you more details. I suspect the answer lies in setting up the driver through those settings. Here’s what mine shows for a different display-touch setup:

Display

Display
Z2 Display ZynScreen 3.5 (v1) PiScreen 3.5 (v2) PiScreen 3.5 (v1) PiTFT 2.8 Resistive PiTFT 2.8 Capacitive PiTFT 3.5 Resistive RPi-Display 2.8 WaveShare 3.2B WaveShare 3.2C WaveShare 3.5A WaveShare 3.5B WaveShare 3.5B V2 WaveShare 3.5C WaveShare 4A GPIO-only WaveShare 4c GPIO-only WaveShare 4 HDMI+GPIO WaveShare 4.3 HDMI+GPIO (inverted) WaveShare 5 HDMI+GPIO WaveShare 5 HDMI+USB WaveShare 7 HDMI+GPIO 1024x600 WaveShare 7 HDMI+GPIO 800x480 WaveShare 7 HDMI+USB 1024x600 WaveShare 7 HDMI+USB 800x480 WaveShare 10.1 HDMI+USB 1920x1080 WaveShare 5 or 7 DSI WaveShare 5 or 7 DSI (inverted) Sainsmart 1.8 MHS35 480x320 MPI5008 800x480 Pi 7 Touchscreen Display 800x480 Pi 7 Touchscreen Display 800x480 (inverted) MIPI DSI 800x480 MIPI DSI 800x480 (inverted) Generic HDMI/DSI Display Generic 4k HDMI Display Custom Device

Config

Width

Height

Touch Rotation
None Inverted

Kernel Options

Framebuffer

Also if you can tell us exactly what the manufacturer and model number of your display is, and-or a photo of it, that would be helpful.