I have a Waveshare 4" DSI round touch display, I am using Raspberry Pi OS bookworm to drive this display on a Raspberry Pi 4 Model B. I have the following line added to my /boot/firmware/config.txt
dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inchC
The display works, and the touchscreen is detected and events are viewable using evtest
test:/boot/overlays $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: Logitech Gaming Mouse G502
/dev/input/event1: Logitech Gaming Mouse G502 Keyboard
/dev/input/event2: vc4-hdmi-0
/dev/input/event3: vc4-hdmi-0 HDMI Jack
/dev/input/event4: vc4-hdmi-1
/dev/input/event5: vc4-hdmi-1 HDMI Jack
/dev/input/event6: 10-0014 Goodix Capacitive TouchScreen
Select the device event number [0-6]: 6
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x416 product 0x2437 version 0x1060
Input device name: "10-0014 Goodix Capacitive TouchScreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 59 (KEY_F1)
Event code 60 (KEY_F2)
Event code 61 (KEY_F3)
Event code 62 (KEY_F4)
Event code 63 (KEY_F5)
Event code 64 (KEY_F6)
Event code 125 (KEY_LEFTMETA)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 598
Min 0
Max 719
Event code 1 (ABS_Y)
Value 417
Min 0
Max 719
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 255
Event code 50 (ABS_MT_WIDTH_MAJOR)
Value 0
Min 0
Max 255
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 719
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 719
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1716723788.115755, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 5
Event: time 1716723788.115755, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 436
Event: time 1716723788.115755, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 344
Event: time 1716723788.115755, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 87
Event: time 1716723788.115755, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 87
Event: time 1716723788.115755, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1716723788.115755, type 3 (EV_ABS), code 0 (ABS_X), value 436
Event: time 1716723788.115755, type 3 (EV_ABS), code 1 (ABS_Y), value 344
Event: time 1716723788.115755, -------------- SYN_REPORT ------------
However, when I try to run a PyQt app, I get the following:
qt.qpa.input: evdevtouch: Using device discovery
qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Touchpad|Device_Touchscreen)
qt.qpa.input: Found matching devices ("/dev/input/event6")
qt.qpa.input: evdevtouch: Adding device at /dev/input/event6
qt.qpa.input: evdevtouch: Using device /dev/input/event6
qt.qpa.input: evdevtouch: /dev/input/event6: Protocol type B (mtdev) (multi), filtered=no
qt.qpa.input: evdevtouch: /dev/input/event6: min X: 0 max X: 719
qt.qpa.input: evdevtouch: /dev/input/event6: min Y: 0 max Y: 719
qt.qpa.input: evdevtouch: /dev/input/event6: min pressure: 0 max pressure: 0
qt.qpa.input: evdevtouch: /dev/input/event6: device name: 10-0014 Goodix Capacitive TouchScreen
evdevtouch: The device is grabbed by another process. No events will be read.
No touch events are registered in Qt.
I have checked using sudo fuser -v /dev/input/event6 and no other process is using the device.
Does anyone know why this might be happening, and if if can be fixed, please?