Re: eGalax USB touchscreen issues

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Sat, 04 Sep 2021 22:49:39 UTC
On 04.09.2021 06:24, Mark Kane wrote:
> Sorry to bring back this thread but I'm having some trouble getting both
> the newer and older screens fully working on i386 (all testing before
> was on amd64).
> 
> Attached is the final diff against releng/13.0 I used to build on both
> amd64 and i386. On amd64 everything works as it did before. Using the
> same patch on i386 we get as far as evemu-record hearing events, X
> adding the input device, but the pointer doesn't actually move inside X
> or with xinput --test.
> 
> Can you think of anything that would need to be done differently for
> i386 or spot anything I might have missed here? I tried 2 clean i386
> installs with the same results. Quarterly packages from official repo
> and configs are the same on both amd64/i386 machines:
> 
> /etc/rc.conf:
> devmatch_blacklist="uep.ko uhid.ko wmt.ko"
> 
> /boot/loader.conf:
> hw.usb.usbhid.enable=1
> usbhid_load="YES"
> hidraw_load="YES"
> 
> /usr/local/share/libinput/90-egalax.quirks:
> [eGalax]
> MatchUdevType=tablet
> MatchVendor=0x0EEF
> MatchProduct=0x0001
> AttrResolutionHint=26x43
> 
> This output is from a 2014 screen that doesn't require setrdesc.c:
> 
> # evemu-record
> Available devices:
> /dev/input/event0:      System mouse
> /dev/input/event1:      System keyboard multiplexer
> /dev/input/event2:      Power Button
> /dev/input/event3:      AT keyboard
> /dev/input/event4:      Lite-On Technology Corp. USB Multimedia
> Keyboard, class 0/0, rev 1.10/1.09, add
> /dev/input/event5:      eGalax Inc. USB TouchController Tablet
> /dev/input/event6:      eGalax Inc. USB TouchController Pen
> /dev/input/event7:      eGalax Inc. USB TouchController TouchScreen
> /dev/input/event8:      Lite-On Technology Corp. USB Multimedia Keyboard
> Consumer Control
> /dev/input/event9:      Lite-On Technology Corp. USB Multimedia Keyboard
> System Control
> Select the device event number [0-9]: 5
> # EVEMU 1.3
> # Kernel: 13.0-RELEASE-p4
> # Input device name: "eGalax Inc. USB TouchController Tablet"
> # Input device ID: bus 0x03 vendor 0xeef product 0x01 version 0x100
> # Supported events:
> #   Event type 0 (EV_SYN)
> #     Event code 0 (SYN_REPORT)
> #     Event code 1 (SYN_CONFIG)
> #     Event code 2 (SYN_MT_REPORT)
> #     Event code 3 (SYN_DROPPED)
> #     Event code 4 ((null))
> #     Event code 5 ((null))
> #     Event code 6 ((null))
> #     Event code 7 ((null))
> #     Event code 8 ((null))
> #     Event code 9 ((null))
> #     Event code 10 ((null))
> #     Event code 11 ((null))
> #     Event code 12 ((null))
> #     Event code 13 ((null))
> #     Event code 14 ((null))
> #     Event code 15 (SYN_MAX)
> #   Event type 1 (EV_KEY)
> #     Event code 272 (BTN_LEFT)
> #     Event code 273 (BTN_RIGHT)
> #   Event type 3 (EV_ABS)
> #     Event code 0 (ABS_X)
> #       Value     1712
> #       Min          0
> #       Max       4095
> #       Fuzz         0
> #       Flat         0
> #       Resolution   0
> #     Event code 1 (ABS_Y)
> #       Value     2362
> #       Min          0
> #       Max       4095
> #       Fuzz         0
> #       Flat         0
> #       Resolution   0
> # Properties:
> #   Property  type 1 (INPUT_PROP_DIRECT)
> N: eGalax Inc. USB TouchController Tablet
> I: 0003 0eef 0001 0100
> P: 02 00 00 00 00 00 00 00
> B: 00 0b 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 03 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 01 00 00 00 00 00 00 00 00
> B: 02 00 00 00 00 00 00 00 00
> B: 03 03 00 00 00 00 00 00 00
> B: 04 00 00 00 00 00 00 00 00
> B: 05 00 00 00 00 00 00 00 00
> B: 11 00 00 00 00 00 00 00 00
> B: 12 00 00 00 00 00 00 00 00
> B: 14 00 00 00 00 00 00 00 00
> B: 15 00 00 00 00 00 00 00 00
> B: 15 00 00 00 00 00 00 00 00
> A: 00 0 4095 0 0 0
> A: 01 0 4095 0 0 0
> ################################
> #      Waiting for events      #
> ################################
> E: 0.000001 0003 0000 2510      # EV_ABS / ABS_X                2510
> E: 0.000001 0003 0001 2360      # EV_ABS / ABS_Y                2360
> E: 0.000001 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +0ms
> E: 0.002005 0001 0110 0001      # EV_KEY / BTN_LEFT             1
> E: 0.002005 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +2ms
> E: 0.007999 0003 0000 2506      # EV_ABS / ABS_X                2506
> E: 0.007999 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +5ms
> E: 0.013990 0003 0000 2502      # EV_ABS / ABS_X                2502
> E: 0.013990 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.020008 0003 0000 2498      # EV_ABS / ABS_X                2498
> E: 0.020008 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +7ms
> E: 0.027994 0003 0000 2494      # EV_ABS / ABS_X                2494
> E: 0.027994 0003 0001 2358      # EV_ABS / ABS_Y                2358
> E: 0.027994 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +7ms
> E: 0.033998 0003 0000 2492      # EV_ABS / ABS_X                2492
> E: 0.033998 0003 0001 2354      # EV_ABS / ABS_Y                2354
> E: 0.033998 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.039999 0003 0001 2352      # EV_ABS / ABS_Y                2352
> E: 0.039999 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.045985 0003 0001 2350      # EV_ABS / ABS_Y                2350
> E: 0.045985 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.051988 0003 0001 2348      # EV_ABS / ABS_Y                2348
> E: 0.051988 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.057993 0003 0001 2346      # EV_ABS / ABS_Y                2346
> E: 0.057993 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.063997 0003 0000 2494      # EV_ABS / ABS_X                2494
> E: 0.063997 0003 0001 2344      # EV_ABS / ABS_Y                2344
> E: 0.063997 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.077981 0003 0001 2342      # EV_ABS / ABS_Y                2342
> E: 0.077981 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +14ms
> E: 0.083987 0003 0001 2340      # EV_ABS / ABS_Y                2340
> E: 0.083987 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.089994 0003 0001 2338      # EV_ABS / ABS_Y                2338
> E: 0.089994 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.095989 0003 0001 2336      # EV_ABS / ABS_Y                2336
> E: 0.095989 0000 0000 0001      # ------------ SYN_REPORT (1) ----------
> +6ms
> E: 0.101995 0003 0001 2334      # EV_ABS / ABS_Y                2334
> 
> (only event5 hears events)
> 

For some unknown reasons your touchscreen started to send reports as
absolute mouse rather than touchscreen.

There is a known bug (really lack of bug2bug compatibility) in current
libudev-devd which brokes absolute mices support in libinput. You may
try to switch to x11-drivers/xf86-input-evdev as input driver or update
libudev-devd to 0.5.0. See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258266

-- 
WBR
Vladimir Kondratyev