LINUX.ORG.RU

goodix 10" touchscreen в archlinux

 , ,


1

1

есть тач hdmi/usb

это выдаёт ошибку

# sudo libinput list-devices
event7  - Chalkboard Electronics HID Touchscreen: libinput bug: missing tablet capabilities: resolution. Ignoring this device.

это выдаёт правильные координаты

$ sudo evtest /dev/input/event7
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x4d8 product 0xf723 version 0x111
Input device name: "Chalkboard Electronics HID Touchscreen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 320 (BTN_TOOL_PEN)
    Event code 321 (BTN_TOOL_RUBBER)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    709
      Min        0
      Max     1366
    Event code 1 (ABS_Y)
      Value    366
      Min        0
      Max      768
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max      768
    Event code 26 (ABS_TILT_X)
      Value      0
      Min   -32767
      Max      768
    Event code 27 (ABS_TILT_Y)
      Value      0
      Min   -32767
      Max      768
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1565182265.863028, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1565182265.863028, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1565182265.863028, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1
Event: time 1565182265.863028, type 3 (EV_ABS), code 0 (ABS_X), value 557
Event: time 1565182265.863028, type 3 (EV_ABS), code 1 (ABS_Y), value 479
Event: time 1565182265.863028, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 768
Event: time 1565182265.863028, -------------- SYN_REPORT ------------
Event: time 1565182266.088009, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1565182266.088009, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1565182266.088009, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1565182266.088009, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1565182266.088009, -------------- SYN_REPORT ------------
$ sudo xinput_calibrator 
Error: No calibratable devices found.

пробовал в xfce4 и gnome-wayland/gnome-X11, никак не хочет работать. в настройках xfce и гнома не появляется.

# ls /usr/share/X11/xorg.conf.d/
10-quirks.conf  40-libinput.conf  70-synaptics.conf
# cat /usr/share/X11/xorg.conf.d/40-libinput.conf 
# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event7"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

# $ cat /usr/share/X11/xorg.conf.d/70-synaptics.conf 
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
#       MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
$ cat /var/log/Xorg.0.log | grep event7
[   206.241] (II) config/udev: Adding input device Intel HID 5 button array (/dev/input/event7)
[   206.241] (**) Option "Device" "/dev/input/event7"
[   206.242] (II) event7  - Intel HID 5 button array: is tagged by udev as: Keyboard
[   206.242] (II) event7  - Intel HID 5 button array: device is a keyboard
[   206.243] (II) event7  - Intel HID 5 button array: device removed
[   206.278] (**) Option "config_info" "udev:/sys/devices/platform/INT33D5:00/input/input8/event7"
[   206.280] (II) event7  - Intel HID 5 button array: is tagged by udev as: Keyboard
[   206.280] (II) event7  - Intel HID 5 button array: device is a keyboard
[   221.134] (II) event7  - Intel HID 5 button array: device removed

как это заводить вообще?

как это заводить вообще?

One of these is that some calls return the data in mm - and for that we need to know the resolution of the tablet. There is no good reason for a tablet to not have a resolution set. We have the 60-evdev.hwdb now for physical devices that lack it (or have wrong values set)

https://bugs.freedesktop.org/show_bug.cgi?id=105342

пропиши параметры своего устройства в 60-evdev.hwdb (у меня на убунте это тут /lib/udev/hwdb.d/60-evdev.hwdb)

http://who-t.blogspot.com/2018/08/how-60-evdevhwdb-works.html

anonymous ()
Ответ на: комментарий от anonymous

спасибо, заработало

измерил линейкой размеры тачскрина, evtest-ом узнал номер event-а (у меня это event16), запустил

$ touchpad-edge-detector 223x125 /dev/input/event16
Touchpad Chalkboard Electronics HID Touchscreen on /dev/input/event16
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..1365], y [0..767]
Touchpad sends:	x [0..1365], y [0..767] |^C-

Touchpad size as listed by the kernel: 227x127mm
User-specified touchpad size: 223x125mm
Calculated ranges: 1365/767

Suggested udev rule:
# <Laptop model description goes here>
evdev:input:b0003v04D8pF723*
 EVDEV_ABS_00=0:1365:6
 EVDEV_ABS_01=0:767:6

оно в формате WIDTHxHEIGHT

повазюкал пальцем по экрану, пока в touchpad sends не стало примерно то же, что в kernel says, нажал ctrl+c, оно мне выдало

evdev:input:b0003v04D8pF723*
 EVDEV_ABS_00=0:1365:6
 EVDEV_ABS_01=0:767:6

я это засунул в /lib/udev/hwdb.d/60-evdev.hwdb, запустил systemd-hwdb update, ребутнулся, всё заработало

luntik2012 ()