Bug 103395 - buttons on graphic tablet don't work
Summary: buttons on graphic tablet don't work
Status: RESOLVED NOTOURBUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-21 18:40 UTC by akktor
Modified: 2017-10-26 22:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
evemu-record (5.11 KB, text/plain)
2017-10-25 16:14 UTC, akktor
Details
spec (181.94 KB, image/jpeg)
2017-10-26 18:42 UTC, akktor
Details

Description akktor 2017-10-21 18:40:28 UTC
Ubuntu 17.10 Wayland session. Cann't use button on the pad.

libinput --v
1.8.2

lsusb -s 3:4 -v
Bus 003 Device 004: ID 5543:0081 UC-Logic Technology Corp. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x5543 UC-Logic Technology Corp.
  idProduct          0x0081 
  bcdDevice            0.00
  iManufacturer           5 
  iProduct                6 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     179
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     183
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      92
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2

sudo libinput list-devices
libinput error: event8  - libinput error: UC-Logic TABLET 1060N Pad: libinput error: libinput bug: device does not meet tablet criteria. Ignoring this device.

sudo evtest
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5543 product 0x81 version 0x111
Input device name: "UC-Logic TABLET 1060N Pad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
    Event code 257 (BTN_1)
    Event code 258 (BTN_2)
    Event code 259 (BTN_3)
    Event code 260 (BTN_4)
    Event code 261 (BTN_5)
    Event code 262 (BTN_6)
    Event code 263 (BTN_7)
    Event code 264 (BTN_8)
    Event code 331 (BTN_STYLUS)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max        1
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max        1
    Event code 40 (ABS_MISC)
      Value      0
      Min        0
      Max        1
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1508611122.873393, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1508611122.873393, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 1508611122.873393, -------------- SYN_REPORT ------------
Event: time 1508611123.005393, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1508611123.005393, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 1508611123.005393, -------------- SYN_REPORT ------------
Event: time 1508611124.153388, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1508611124.153388, type 1 (EV_KEY), code 257 (BTN_1), value 1
Event: time 1508611124.153388, -------------- SYN_REPORT ------------
Event: time 1508611124.260390, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1508611124.260390, type 1 (EV_KEY), code 257 (BTN_1), value 0
Event: time 1508611124.260390, -------------- SYN_REPORT ------------
Event: time 1508611124.605383, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1508611124.605383, type 1 (EV_KEY), code 258 (BTN_2), value 1
Event: time 1508611124.605383, -------------- SYN_REPORT ------------
Event: time 1508611124.712381, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1508611124.712381, type 1 (EV_KEY), code 258 (BTN_2), value 0
Event: time 1508611124.712381, -------------- SYN_REPORT ------------
Event: time 1508611125.026393, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1508611125.026393, type 1 (EV_KEY), code 259 (BTN_3), value 1
Event: time 1508611125.026393, -------------- SYN_REPORT ------------
Event: time 1508611125.114325, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1508611125.114325, type 1 (EV_KEY), code 259 (BTN_3), value 0
Event: time 1508611125.114325, -------------- SYN_REPORT ------------
Event: time 1508611125.597376, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90005
Event: time 1508611125.597376, type 1 (EV_KEY), code 260 (BTN_4), value 1
Event: time 1508611125.597376, -------------- SYN_REPORT ------------
Event: time 1508611125.697383, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90005
Event: time 1508611125.697383, type 1 (EV_KEY), code 260 (BTN_4), value 0
Event: time 1508611125.697383, -------------- SYN_REPORT ------------
Event: time 1508611126.068373, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1508611126.068373, type 1 (EV_KEY), code 261 (BTN_5), value 1
Event: time 1508611126.068373, -------------- SYN_REPORT ------------
Event: time 1508611126.155315, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1508611126.155315, type 1 (EV_KEY), code 261 (BTN_5), value 0
Event: time 1508611126.155315, -------------- SYN_REPORT ------------
Event: time 1508611126.457371, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90007
Event: time 1508611126.457371, type 1 (EV_KEY), code 262 (BTN_6), value 1
Event: time 1508611126.457371, -------------- SYN_REPORT ------------
Event: time 1508611126.557374, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90007
Event: time 1508611126.557374, type 1 (EV_KEY), code 262 (BTN_6), value 0
Event: time 1508611126.557374, -------------- SYN_REPORT ------------
Event: time 1508611126.877354, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90008
Event: time 1508611126.877354, type 1 (EV_KEY), code 263 (BTN_7), value 1
Event: time 1508611126.877354, -------------- SYN_REPORT ------------
Event: time 1508611126.997375, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90008
Event: time 1508611126.997375, type 1 (EV_KEY), code 263 (BTN_7), value 0
Event: time 1508611126.997375, -------------- SYN_REPORT ------------
Comment 1 Peter Hutterer 2017-10-23 03:47:34 UTC
run libinput debug-events please and check if libinput sees the button pads. If so, this is a bug in the higher levels, most likely gnome or whatever ubuntu uses now.
Comment 2 akktor 2017-10-23 16:11:01 UTC
sudo libinput debug-events
libinput error: event8  - libinput error: UC-Logic TABLET 1060N Pad: libinput error: libinput bug: device does not meet tablet criteria. Ignoring this device.
and nothing more.
The same message i've got on xorg session.
Comment 3 Peter Hutterer 2017-10-24 03:36:11 UTC
Oh, right. update to libinput 1.9, that has a fix for this, the uc logic tablets all don't follow the kernel protocol...

*** This bug has been marked as a duplicate of bug 102570 ***
Comment 4 akktor 2017-10-24 17:15:34 UTC
The error is gone, but there is no events either.
Comment 5 Peter Hutterer 2017-10-24 23:43:34 UTC
please attach an evemu-record of the button presses please, thanks
Comment 6 akktor 2017-10-25 16:14:00 UTC
Created attachment 135041 [details]
evemu-record
Comment 7 Peter Hutterer 2017-10-25 23:32:43 UTC
ok, this isn't a libinput problem anymore, it's a problem with udev not tagging this device because it falls through the cracks of the current tagging mechanisms. udev *should* show ID_INPUT_TABLET=1 and ID_INPUT_TABLET_PAD=1 for a pad but it doesn't for this device because the x/y axes are missing.

as a temporary fix, I suggest putting this into /etc/udev/hwdb.d/91-uclogic-pad-override.hwdb

libinput:name:*UC-Logic TABLET 1060N Pad*:dmi:*
 ID_INPUT_TABLET=1
 ID_INPUT_TABLET_PAD=1


Note the spaces before ID_*. Look at https://wayland.freedesktop.org/libinput/doc/latest/faq.html#faq_hwdb_changes on how to apply this.

Long-term, this device needs a custom entry in the systemd hwdb so the tags are applied. Best to open a systemd bug for this and cc me (@whot) on it, thanks. 

Could possibly be addressed in libwacom too because adding this device would help with gnome configuration but I can't even find a picture of the 1060N, let alone anything useful. Is this a standalone tablet? I also can't remember if uclogic re-uses usb pid/vids like huion does - in that case libwacom would be a dead end anyway.
Comment 8 akktor 2017-10-26 18:42:07 UTC
Created attachment 135085 [details]
spec
Comment 9 akktor 2017-10-26 18:44:37 UTC
Thanks, it works.
I cant find systemd bug list. There is no choice on enter new bug.
It's actually xp-pen star 03. I don't understand what should i report to libwacom? Is non-wacom tablet is supported on gnome-center?
Comment 10 Peter Hutterer 2017-10-26 22:58:23 UTC
systemd bugs are here: https://github.com/systemd/systemd/issues

gnome doesn't care about the brand of the tablet, only whether it can find enough pieces of information such as whether the tablet is internal (screen) or external (usb). Those are provided by the data files in libwacom.

The problem with most of the cheap tablets is that they re-use the USB ids, so two completely different tablets can look the same to the system. There's a mirror of the data files here:
https://github.com/linuxwacom/libwacom/tree/master/data

Look at the wacom.example one, that gives you enough information to add a data file for your tablet. Please send that as a git-formatted patch to linuxwacom-devel@lists.sourceforge.net


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.