Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huion Kamvas Pro 19 #652

Open
3 tasks done
vod3 opened this issue Apr 3, 2024 · 5 comments
Open
3 tasks done

Huion Kamvas Pro 19 #652

vod3 opened this issue Apr 3, 2024 · 5 comments

Comments

@vod3
Copy link

vod3 commented Apr 3, 2024

Hi, I'm very close on getting the device to 100% working, after I submitted a pull request to systemd:
systemd/systemd#31918 the pen was working, but the Multi-Touch Gesture abilities are still missing.
I assume it's because the resolution I submitted may be wrong, after all I got the value by trial and error.

In your documentation I read that you can get the exact value my using libinput measure touch-size, but my touchscreen seems to be not supported.

This device does not have the capabilities for size-based touch detection.
Details: Device does not have ABS_MT_TOUCH_MAJOR

Nevertheless the Pen works great (the 2nd and 3rd pen button however not), there is no offset on the screen, but I'm not sure how to debug the Touchpad Issue. The Touchpad seems to only work as a mouse cursor.

Any tips what I can do to get this device to 100%?
Thanks for your time!


@whot
Copy link
Member

whot commented Apr 3, 2024

This device does not have the capabilities for size-based touch detection.

This just means the device doesn't support touch sizes, i.e. the physical(-ish) size of the finger touch in addition to the usual position data. Most touchpads don't have that and it's only necessary for things like palm and thumb detection so it's not a big deal if it is missing.

libwacom doesn't have an effect on whether the tablet works, and has no effect on the touchpad part of the tablet. Best to file a libinput bug for that.

If your tablet works and it shows up in the control center, you can submit the .tablet file here as a PR and we can get it merged. Fixing the touch is luckily completely independent of that.

@vod3
Copy link
Author

vod3 commented Apr 4, 2024

libwacom doesn't have an effect on whether the tablet works, and has no effect on the touchpad part of the tablet. Best to file a libinput bug for that.

I will be doing that 👍

If your tablet works and it shows up in the control center, you can submit the .tablet file here as a PR and we can get it merged. Fixing the touch is luckily completely independent of that.

I will but I think there is room for improvement. I studied the libwacom.stylus file in order to get the pen buttons to work, but I don't really understand how to correctly map them into the .tablet file. Huion gives you two pens, a slim one with 2 Buttons + Eraser and a thick one with 3 Buttons + Eraser.

This is a simmilar pen found in the file:

[0x40200]
# Cintiq Pro 2022
Name=Pro Pen 3
Group=cintiqpro2022
Buttons=3
Axes=Tilt;Pressure;Distance;
Type=General

It would be complete I guess with the addition of

PairedStylusIds=0xfffff;
EraserType=Invert

But I don't really know what PairedStylusIDs means and how to integrate it into the .tablet file.
Any documentaion on that?

@whot
Copy link
Member

whot commented Apr 5, 2024

iirc the huion tablets don't have tool ids so you don't need a special stylus, you can use @generic or @generic-no-eraser stylus (depending whether you have an eraser button or not).

The main problem with those generic pens is that we can't detect ahead of time how many buttons they have because they usually don't provide enough information, so we get

might be worth running libinput debug-tablet (in the libinput git repo, not sure it's avaialble/installed by your distro) and check if the pen does send a tool id and/or serial number. If it does then we can add actual styli for this (though note #639 which will be a problem).

a slim one with 2 Buttons + Eraser and a thick one with 3 Buttons + Eraser

To clarify: none of these counted buttons are the eraser button, right? so you have eraser (at the tip? as a button?) and in addition you have 2 or 3 buttons?

@vod3
Copy link
Author

vod3 commented Apr 5, 2024

This is the pen and the button names I get from libinput debug-tablet

PW600

If I use the pen to hover, press the screen, press the first and second button, the Tool IDs I get are pen serial 0, id 0

If I use the 3rd button and the eraser at the end of the pen, I get eraser serial 0, id 0

@whot
Copy link
Member

whot commented Apr 10, 2024

how curious. ftr, this means you have an eraser button and an eraser tip. that's a new one...

the stylus has 2 real buttons but instead of BTN_TOUCH (the "tip is down" signal) this should be BTN_STYLUS2). For the archives: udev-hid-bpf!59 attempts to fix this and turns those into three real buttons and an eraser tip.

Based on the libinput record output in that pr the tool does not send a tool ID which means we cannot identify it reliably.

I think the right solution for libwacom would be to duplicate the 0xfffff and 0xffffe entries in libwacom.stylus with the next available IDs (0xffffc and 0xffffb) and name it General 3 Button Pen with three buttons, etc.). Then refer to @generic-3btn-with-eraser in your .tablet file and that should do the right thing in libwacom-list-local-devices. And then later in gnome once we add the three button generic image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants