Bug 102570 - Graphics tablet does not work with libinput, but does with xf86-input-evdev
Summary: Graphics tablet does not work with libinput, but does with xf86-input-evdev
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-06 19:42 UTC by sgtlion
Modified: 2017-10-24 03:36 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Relevant snippet from old xorg.log (3.45 KB, text/plain)
2017-09-06 19:42 UTC, sgtlion
Details
sudo evemu-record when working under evdev (10.02 KB, text/plain)
2017-09-07 07:49 UTC, sgtlion
Details
sudo evemu-record when not working under libinput (14.88 KB, text/plain)
2017-09-07 07:49 UTC, sgtlion
Details
Xorg log with libinput patch installed. (37.54 KB, text/plain)
2017-09-11 11:49 UTC, sgtlion
Details
Xorg log with libinput patch installed (29.43 KB, text/plain)
2017-09-11 12:00 UTC, sgtlion
Details
Xorg log with libinput patch installed (29.18 KB, text/plain)
2017-09-11 12:21 UTC, sgtlion
Details
Output of sudo ./builddir/libinput-debug-events --verbose (4.72 KB, text/plain)
2017-09-12 09:37 UTC, sgtlion
Details
Output of sudo ./builddir/libinput-debug-events --verbose (11.19 KB, text/plain)
2017-09-13 07:03 UTC, sgtlion
Details

Description sgtlion 2017-09-06 19:42:06 UTC
Created attachment 134025 [details]
Relevant snippet from old xorg.log

Using Fedora 26, package: libinput-1.8.0-2.fc26.src.rpm
Nvidia proprietary drivers, so using X11, also.

My graphics tablet originally totally failed to work, detected but wouldn't respond at all. Xorg logs showed that libinput was finding it, having a bit of trouble, and then give up trying to load it. After some help in #fedora, I've created a file at "/etc/X11/xorg.conf.d/52-tablet.conf" to force the use of the xf86-input-evdev driver for the graphic tablet's chipset, which does perfectly! I now just use xinput to calibrate the use to one of my screens.

But indeed, the issue is libinput doesn't handle my graphics tablet properly. I'm happy to provide any requested logs or test patches, whatevs yo. Attached is an old xorg log snippet from when the tablet did nothing.

The tablet chipset is "UC-LOGIC Tablet WP5540U". The actual model is a "TB-5300 Slimline Design Tablet".
Comment 1 Peter Hutterer 2017-09-06 22:58:07 UTC
Add the sudo evemu-record output of one short pen stroke please, thanks.
Comment 2 sgtlion 2017-09-07 07:49:25 UTC
Created attachment 134036 [details]
sudo evemu-record when working under evdev
Comment 3 sgtlion 2017-09-07 07:49:50 UTC
Created attachment 134037 [details]
sudo evemu-record when not working under libinput
Comment 4 sgtlion 2017-09-07 07:51:14 UTC
I'm not sure if it makes a meaningful difference, so I've added the sudo evemu-record output of a short stroke when the tablet is using evdev and when using libinput.
Comment 5 Peter Hutterer 2017-09-07 23:21:41 UTC
evemu records kernel events, so it doesn't matter which driver you use.

Issue here is that the tablet doesn't have BTN_TOOL_PEN set (it should when it's a tablet) and libinput requires this to use it as a tablet. That's too common for the UC Logic devices, so I think I'm going to have to fix this in libinput once and for all...
Comment 6 sgtlion 2017-09-08 08:47:19 UTC
Alright, sounds promising. If I can help any further with logs or testing patches, I'll happily do so.
Comment 7 Peter Hutterer 2017-09-11 03:23:51 UTC
There's a test branch avaialable here, please give that one a try, thanks: https://github.com/whot/libinput/tree/wip/huion-dwh69-fdo97771
Comment 8 sgtlion 2017-09-11 11:48:40 UTC
Built it, installed it, restarted, verified it. It seems to have made a difference, as per new xorg log, but the tablet still does nothing.
Comment 9 sgtlion 2017-09-11 11:49:29 UTC
Created attachment 134156 [details]
Xorg log with libinput patch installed.
Comment 10 sgtlion 2017-09-11 12:00:45 UTC
Created attachment 134157 [details]
Xorg log with libinput patch installed

Seems that was the incorrect log. Attached is relevant one.
Comment 11 sgtlion 2017-09-11 12:21:49 UTC
Created attachment 134158 [details]
Xorg log with libinput patch installed

Okay. This is 100% definitely the correct one, dangit.
Comment 12 Peter Hutterer 2017-09-12 00:51:24 UTC
run sudo ./builddir/libinput-debug-events --verbose after building it (with meson builddir) and attach the output here. The xorg log doesn't tell us much why it fails, debugging should happen with libinput-debug-events because if that one works, then xorg will work too. And you don't have to reboot or restart X for that.
Comment 13 sgtlion 2017-09-12 09:37:29 UTC
Created attachment 134175 [details]
Output of sudo ./builddir/libinput-debug-events --verbose
Comment 14 sgtlion 2017-09-12 09:38:21 UTC
Neat. I'm not sure if I'm being stupid here and doing something very wrong, or what, but that log doesn't appear to give any new information to my untrained eyes. See attached.
Comment 15 sgtlion 2017-09-12 09:41:27 UTC
I should also note, I did again attempt to do a simple stroke with the tablet during the debug command, with no response. Mouse/keyboard/etc events were logged fine.
Comment 16 Peter Hutterer 2017-09-12 22:33:55 UTC
still says: "event3  - UC-LOGIC Tablet WP5540U Pen: libinput bug: device does not meet tablet criteria. Ignoring this device." Did you build the right branch? Because if I run your evemu device with that branch locally I only get a warning about the tablet being unknown to libwacom.
Comment 17 sgtlion 2017-09-13 07:03:58 UTC
Created attachment 134191 [details]
Output of sudo ./builddir/libinput-debug-events --verbose
Comment 18 sgtlion 2017-09-13 07:05:37 UTC
Huh, I must've done something stupid.

I downloaded, doubly making sure it was the right branch, and did the command again, and the tablet worked! Pressure 'n everything, hurrah!
Comment 20 Peter Hutterer 2017-09-20 01:39:33 UTC
commit 0ac868143a55c7b2700f90e6420cd2233404e19e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Sep 11 10:32:42 2017 +1000

    tablet: support tablet devices without BTN_TOOL_PEN
Comment 21 Peter Hutterer 2017-10-24 03:36:11 UTC
*** Bug 103395 has been marked as a duplicate of this bug. ***


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.