Bug 202195 - Regression: since Linux 4.18rc1 Trust Flex Graphics Tablet incorrectly detected as mouse, so no Pen input device, no pressure detection, etc.
Summary: Regression: since Linux 4.18rc1 Trust Flex Graphics Tablet incorrectly detect...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-09 12:31 UTC by RussianNeuroMancer
Modified: 2020-07-13 20:20 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.18rc1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description RussianNeuroMancer 2019-01-09 12:31:08 UTC
Hello!

Previous bugreport, logs, discussion: https://gitlab.freedesktop.org/libinput/libinput/issues/64

Bisect point to:

commit f07b3c1da92db108662f99417a212fc1eddc44d1
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Tue Apr 24 10:04:33 2018 +0200

    HID: generic: create one input report per application type
    
    It is not a good idea to try to fit all types of applications in the
    same input report. There are a lot of devices that are needing
    the quirk HID_MULTI_INPUT but this quirk doesn't match the actual HID
    description as it is based on the report ID.
    
    Given that most devices with MULTI_INPUT I can think of split nicely
    the devices inputs into application, it is a good thing to split the
    devices by default based on this assumption.
    
    Also make hid-multitouch following this rule, to not have to deal
    with too many input created.
    
    While we are at it, fix some checkpatch complaints about converting
    'unsigned' to 'unsigned int'.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>

:040000 040000 7c9ade86fba756e843e76987f953fa96e8ea8d1c 589c998031a5b48696423166f2dd09b555e07a24 M	drivers
:040000 040000 d56657e68e7b6b41b6d17d9308f5c859c87f2599 baa62159d3835858fcd707bdbbab91b586db6cd5 M	include
Comment 1 Benjamin Tissoires 2019-01-14 14:08:10 UTC
Thanks Dmitry for triaging this to me (actually, I was part of https://gitlab.freedesktop.org/libinput/libinput/issues/64 that lead to this bug report).

So I know I pointed the reporter to the DIGImend project already.

But out of curiosity, it would be interesting to see if adding your PID (0004) to hid-uclogic and see how this behaves (replace USB_DEVICE_ID_UGEE_TABLET_EX07S by 0004, recompile and reload the driver).
Comment 2 RussianNeuroMancer 2019-01-15 10:23:35 UTC
I noticed that VendorID of Trust Flex Graphics Tablet (2179) is different from USB_VENDOR_ID_UGEE (0x28bd) so instead of replacing SB_DEVICE_ID_UGEE_TABLET_EX07S by 0004, I changed line "#define USB_DEVICE_ID_UGTIZER_TABLET_GP0610 0x0053" to "#define USB_DEVICE_ID_UGTIZER_TABLET_GP0610 0x0004" because USB_VENDOR_ID_UGTIZER is similar to VendorID of Trust Flex Graphics Tablet (2179).

https://github.com/torvalds/linux/blob/bd8879faafe6d057237461c4d58d8b0d37b9e3ee/drivers/hid/hid-ids.h#L1238

I rebuild Linux 4.20 with change and find that tablet is still detected as mouse, so issue is still reproducible.

Obviously, my assumption above could be wrong, so maybe I still need to edit hid-uclogic.c to apply necessary change? If I still need to put PID 0004 somewhere in hid-uclogic.c, what I should replace with 0004, USB_DEVICE_ID_UGEE_TABLET_EX07S in lines 979 and 1072, or USB_DEVICE_ID_UGTIZER_TABLET_GP0610 in lines 978 and 1071? How I should put 0004 here, just like 0004 or maybe like 0x0004?

https://github.com/torvalds/linux/blob/bd8879faafe6d057237461c4d58d8b0d37b9e3ee/drivers/hid/hid-uclogic.c#L978
https://github.com/torvalds/linux/blob/bd8879faafe6d057237461c4d58d8b0d37b9e3ee/drivers/hid/hid-uclogic.c#L1071
Comment 3 Leerson 2019-01-28 14:21:03 UTC
I have same Flex Design Tablet. After upgrade from Ubuntu 18.04 to Ubuntu 18.10 I now have same issue. Is there other way to workaround this besides booting Linux 4.17 kernel?
Comment 4 RussianNeuroMancer 2019-01-29 01:20:08 UTC
https://github.com/linuxwacom/libwacom/issues/63

> In that case libwacom can't do anything and this needs to be fixed in the
> kernel. Since there's another issue with the missing BTN_TOOL_PEN as well,
> I'm going to say the kernel needs to be fixed here first
Comment 5 Benjamin Tissoires 2019-02-27 08:27:30 UTC
FYI, hid-uclogic has been greatly enhanced in linux-next: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-5.1/hid-uclogic

It could be interesting to see if adding your tablet IDs in this new code helps or not.
Comment 6 RussianNeuroMancer 2019-03-11 13:42:05 UTC
Should I do this in the same way as described in first paragraph of Comment 2? If not, how exactly I should edit hid-uclogic.c? (See questions in third paragraph of Comment 2.)
Comment 7 RussianNeuroMancer 2019-07-16 15:10:37 UTC
As I see this code was shipped in Linux 5.1. I tested Linux 5.2.1 with same change as described in Comment 2. This does not help.

Benjamin, please let me know - is there anything else I could check on my side?
Comment 8 RussianNeuroMancer 2020-03-03 14:06:08 UTC
I tested tablet again with Linux 5.5.0 and Linux 5.6rc4. With both kernels tablet regressed further. Not only it's still recognised as mouse, but stylus buttons is no longer detected now. 

Please let me know if I should proceed with bisect? Asking because I not sure if anyone is working on this issue currently.

Note You need to log in before you can comment on or make changes to this bug.