Bug 1409656

Summary: HUION Pen Tablets do not have properties that are available under evdev.
Product: [Fedora] Fedora Reporter: lmanning17
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: bperkins, leigh123linux, lmanning17, peter.hutterer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-02 04:56:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Tablet Calibration Script none

Description lmanning17 2017-01-02 20:08:35 UTC
Created attachment 1236716 [details]
Tablet Calibration Script

Description of problem:
Various properties available under evdev are not available under libinput


How reproducible:
Always


Steps to Reproduce:
1. Attempt to calibrate tablet using the attached shell script
2. Error: neither property is available
3. Remove the tablet catchall(s) from 60-libinput.conf
4. Restart X
5. Calibration script now runs

Actual results:
Error occurs stating that various properties are not available


Expected results:
Equivalent properties be available to calibrate tablet


Additional info:
It would be nice if this tablet (HUION 580) would show up in the wacom settings tool. I feel like the way I have to calibrate this tablet is very clunky at best. My goal with the attached script is to swap the axes so that I can use the tablet without a USB cable extender since the cable connects on the left side of the tablet and my computer is on the right side of my desk.

I also want the tablet to be locked to a single screen instead of mapping to my whole desktop. The tablet's sensitivity range is 0-32000 on X and 0-20000 on Y. To lock this to my left monitor, I would normally have to map the X range as 0-64000 so that the "usable" range only reaches the end of my left screen. However, since the axes are inverted, 0 is on the right side, not the left, so I need to map from -32000-32000 so that 32000-0 are my left screen and -1--32000 are the right (unusable range)

To say the least, this sort of manual mapping is a main. I had to do some very unpleasant math when one of my screens was flipped horizontally and wasn't perfectly centred with with other. The Windows driver provided by HUION has some simple options that let you select which screen to map to, which axes to invert, etc. I'm unsure how the GNOME wacom settings tool is supposed to work since it doe snot detect my tablet, but I'd really like some usability improvements in this area someday.

Comment 1 Peter Hutterer 2017-01-04 00:56:18 UTC
what's the sudo evemu-describe output for this device?

the calibration script is specific to the evdev driver, those properties don't exist in the libinput driver but there is a "libinput Calibration Matrix" property that more-or-less does the same thing. The only exception is that the values are proportional to the width/height of the device, i.e. the value 1.0 refers to "total with". So you can adjust your script accordingly.

(In reply to lmanning17 from comment #0)
> I also want the tablet to be locked to a single screen instead of mapping to
> my whole desktop.

This is usually done by setting the driver-independent Coordinate Transformation Matrix, see e.g. https://wiki.archlinux.org/index.php/Calibrating_Touchscreen

> I'm unsure how the GNOME wacom settings tool is
> supposed to work since it doe snot detect my tablet, but I'd really like
> some usability improvements in this area someday.

I'll check what's happening but since we already do all this for wacom tablets, it shouldn't be too hard to fix.