-
Notifications
You must be signed in to change notification settings - Fork 175
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 20 report #463
Comments
I was not sure for the tilt, but it looks like it isn't currently managed. I mean, the stylus has tilt management, but the driver doesn't manage it. Here is what display Select the device event number [0-22]: 21 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x256c product 0x6e version 0x111 Input device name: "Tablet Monitor Pen" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 320 (BTN_TOOL_PEN) Event code 330 (BTN_TOUCH) Event code 331 (BTN_STYLUS) Event code 332 (BTN_STYLUS2) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 40216 Min 0 Max 86970 Resolution 200 Event code 1 (ABS_Y) Value 29976 Min 0 Max 47752 Resolution 200 Event code 24 (ABS_PRESSURE) Value 0 Min 0 Max 8191 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) Properties: Property type 1 (INPUT_PROP_DIRECT) Testing ... (interrupt to exit) Event: time 1601327770.279002, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 1 Event: time 1601327770.279002, type 3 (EV_ABS), code 0 (ABS_X), value 46051 Event: time 1601327770.279002, type 3 (EV_ABS), code 1 (ABS_Y), value 19303 Event: time 1601327770.279002, -------------- SYN_REPORT ------------ Event: time 1601327770.321018, type 3 (EV_ABS), code 0 (ABS_X), value 46096 Event: time 1601327770.321018, type 3 (EV_ABS), code 1 (ABS_Y), value 19306 Event: time 1601327770.321018, -------------- SYN_REPORT ------------ |
I can confirm that the tilt isn't managed, by, under Krita, by changing the option of a brush, for size:
The size doesn't change when I tilt the pen. |
Yesterday I installed the Arch Linux package (AUR) digimend-kernel-drivers-dkms-git but didn't rebooted the system. After booting today, most things seems to be well detected by evtest and work (pen tilt, 3 buttons are still missing, and, I don't know if the 2 strips (that I called sliders), can be managed as 2 entries, they use the same event currently). Here are the informations I obtain : /dev/input/event22: Tablet Monitor Pen /dev/input/event23: Tablet Monitor Pad /dev/input/event24: Tablet Monitor Touch Strip /dev/input/event25: Tablet Monitor Dial Pen tilt is now managed by Code 26 and 27, I'm not sure, but the values are probably from -60 to 60, as, the pen manage 60° angles :
The Dial don't seems to be used, what I called "slide", is managed by "Touch Strip". Both sides use the same event (I don't know if hardware allow to detect them as separate) :
Event: time 1601379017.615285, type 3 (EV_ABS), code 40 (ABS_MISC), value 15 Event: time 1601379017.615285, -------------- SYN_REPORT ------------ Event: time 1601379017.689285, type 3 (EV_ABS), code 8 (ABS_WHEEL), value 1 Event: time 1601379017.689285, -------------- SYN_REPORT ------------ Event: time 1601379017.789285, type 3 (EV_ABS), code 8 (ABS_WHEEL), value 2 Buttons at left are mapped from 0 to 7 (Code 256 to 263) Event: time 1601379797.204047, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90008 Event: time 1601379797.204047, type 1 (EV_KEY), code 263 (BTN_7), value 0 |
After applying the Wacom mapping in Section "InputClass" Identifier "Tablet" Driver "wacom" MatchDevicePath "/dev/input/event*" MatchUSBID "256c:006e" EndSection Then, when /dev/input/event21: Tablet Monitor /dev/input/event22: Tablet Monitor Pad /dev/input/event23: Tablet Monitor Touch Strip /dev/input/event24: Tablet Monitor Dial They are mapped in lrwxrwxrwx 1 root root 10 9 oct. 20:53 usb-256c_Tablet_Monitor-event-if00 -> ../event24 lrwxrwxrwx 1 root root 10 9 oct. 20:53 usb-256c_Tablet_Monitor-event-joystick -> ../event23 lrwxrwxrwx 1 root root 10 9 oct. 20:53 usb-256c_Tablet_Monitor-event-mouse -> ../event21 libwacom shows: $ libwacom-list-local-devices # Device node: /dev/input/event22 [Device] Name=GAOMON S56K ModelName= DeviceMatch=usb:256c:006e:Tablet Monitor Pen;usb:256c:006e:Tablet Monitor Pad; Class=Bamboo Width=6 Height=5 IntegratedIn= Styli=0xffffd; [Features] Reversible=false Stylus=true Ring=false Ring2=false Touch=false TouchSwitch=false # StatusLEDs= NumStrips=0 Buttons=0 Following this, https://github.com/DIGImend/digimend-kernel-drivers#enabling-wacom-xorg-driver (4.5.6.7 are reserved numbers): xsetwacom --set "Tablet Monitor Pad pad" Button 1 "Key i" xsetwacom --set "Tablet Monitor Pad pad" Button 2 "Key n" xsetwacom --set "Tablet Monitor Pad pad" Button 3 "Key b" xsetwacom --set "Tablet Monitor Pad pad" Button 8 "Key p" ... I am not sure how to setup the stripe. |
I seen on libwacom wiki there is a toolset called evemu, this return interesting information, about the stripe. I used /dev/input/event21: Tablet Monitor /dev/input/event22: Tablet Monitor Pad /dev/input/event23: Tablet Monitor Touch Strip /dev/input/event24: Tablet Monitor Dial Select the device event number [0-24]: 23 # EVEMU 1.3 # Kernel: 5.8.14-arch1-1 # DMI: dmi:bvnAmericanMegatrendsInc.:bvr0401:bd07/15/2011:br4.6:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP8Z68-MPRO:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion: # Input device name: "Tablet Monitor Touch Strip" # Input device ID: bus 0x03 vendor 0x256c product 0x6e version 0x111 # Supported events: # Event type 0 (EV_SYN) # Event code 0 (SYN_REPORT) # Event code 1 (SYN_CONFIG) # Event code 2 (SYN_MT_REPORT) # Event code 3 (SYN_DROPPED) # Event code 4 ((null)) # Event code 5 ((null)) # Event code 6 ((null)) # Event code 7 ((null)) # Event code 8 ((null)) # Event code 9 ((null)) # Event code 10 ((null)) # Event code 11 ((null)) # Event code 12 ((null)) # Event code 13 ((null)) # Event code 14 ((null)) # Event code 15 (SYN_MAX) # Event type 1 (EV_KEY) # Event code 256 (BTN_0) # Event type 3 (EV_ABS) # Event code 0 (ABS_X) # Value 0 # Min 0 # Max 1 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 1 (ABS_Y) # Value 0 # Min 0 # Max 1 # Fuzz 0 # Flat 0 # Resolution 0 # Event code 8 (ABS_WHEEL) # Value 0 # Min 0 # Max 7 # Fuzz 0 # Flat 0 # Resolution 3 # Event code 40 (ABS_MISC) # Value 0 # Min 0 # Max 255 # Fuzz 0 # Flat 0 # Resolution 0 # Properties: N: Tablet Monitor Touch Strip I: 0003 256c 006e 0111 P: 00 00 00 00 00 00 00 00 B: 00 0b 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 01 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 01 00 00 00 00 00 00 00 00 B: 02 00 00 00 00 00 00 00 00 B: 03 03 01 00 00 00 01 00 00 B: 04 00 00 00 00 00 00 00 00 B: 05 00 00 00 00 00 00 00 00 B: 11 00 00 00 00 00 00 00 00 B: 12 00 00 00 00 00 00 00 00 B: 14 00 00 00 00 00 00 00 00 B: 15 00 00 00 00 00 00 00 00 B: 15 00 00 00 00 00 00 00 00 A: 00 0 1 0 0 0 A: 01 0 1 0 0 0 A: 08 0 7 0 0 3 A: 28 0 255 0 0 0 |
with code : 08 E0 01 01, the 2 following bytes are divided in 4 bits by button ranges 08 E0 01 01 00 00 00 00 00 00 00 00 12 34
I added to hid-ids.h: #define USB_DEVICE_ID_HUION_TABLET3 0x006c Then, in hid-uclogic-core.c, in static const struct hid_device_id uclogic_devices But it looks like uclogic-probe has already some problems to read Params block #2: | Product: Tablet Monitor 79 | Internal model: 7b | Buttons status: HK On c8 | Params block #2: ???????? | Max X: 86970 | Max Y: 47752 | Max pressure: 8191 | Resolution: 5080 | c9 | Firmware version: HUION_M193_190606 ca | Internal manufacturer: HUION Animation Technology Co.,ltd C8 (decode_params2) string: |
The 22-inch version that I have has the same USB product ID. I hacked together some code to custom configure the buttons, but it would be better to have the driver properly support it. I dumped the data from hidraw for the frame buttons in case it would be helpful: https://github.com/erjiang/huion-keys/blob/main/huion_dump.txt |
I tried on ArchLinux with, for installing packages: My version of:
doing python xdo_build.py I have the following errors: _xdo_cffi.c: In function '_cffi_checkfld__xdo_t': _xdo_cffi.c:5106:32: error: 'xdo_t' {aka 'struct xdo'} has no member named 'modmap' 5106 | { XModifierKeymap * *tmp = &p->modmap; (void)tmp; } | ^~ _xdo_cffi.c:5107:30: error: 'xdo_t' {aka 'struct xdo'} has no member named 'keymap' 5107 | { unsigned long * *tmp = &p->keymap; (void)tmp; } | ^~ In file included from _xdo_cffi.c:61: _xdo_cffi.c: At top level: _xdo_cffi.c:5269:15: error: 'xdo_t' {aka 'struct xdo'} has no member named 'modmap' 5269 | { "modmap", offsetof(xdo_t, modmap), | ^~~~~~~~ _xdo_cffi.c:5270:34: error: 'xdo_t' {aka 'struct xdo'} has no member named 'modmap' 5270 | sizeof(((xdo_t *)0)->modmap), | ^~ In file included from _xdo_cffi.c:61: _xdo_cffi.c:5272:15: error: 'xdo_t' {aka 'struct xdo'} has no member named 'keymap' 5272 | { "keymap", offsetof(xdo_t, keymap), | ^~~~~~~~ _xdo_cffi.c:5273:34: error: 'xdo_t' {aka 'struct xdo'} has no member named 'keymap' 5273 | sizeof(((xdo_t *)0)->keymap), | ^~ The xdo sturcture in /usr/include/xdo.h: /** * The main context. */ typedef struct xdo { /** The Display for Xlib */ Display *xdpy; /** The display name, if any. NULL if not specified. */ char *display_name; /** @internal Array of known keys/characters */ charcodemap_t *charcodes; /** @internal Length of charcodes array */ int charcodes_len; /** @internal highest keycode value */ int keycode_high; /* highest and lowest keycodes */ /** @internal lowest keycode value */ int keycode_low; /* used by this X server */ /** @internal number of keysyms per keycode */ int keysyms_per_keycode; /** Should we close the display when calling xdo_free? */ int close_display_when_freed; /** Be extra quiet? (omits some error/message output) */ int quiet; /** Enable debug output? */ int debug; /** Feature flags, such as XDO_FEATURE_XTEST, etc... */ int features_mask; } xdo_t; |
@Popolon Let's move this conversation to erjiang/huion-keys#1 since it's not about the digimend code. |
It works now, as wrote in the ticket. I wrote this her for other Huion kamvas pro20/22 (and 24?) users. |
About pen-screen calibration Defaut xsetwacom coordinates : xsetwacom set 'Tablet Monitor Pen stylus' "Area" "0 0 86970 47752" There are some shift, I analysed the position with sudo usbhid-dump -es -m 256c:006e break it when I have value I want, keep the last line in a text file : This about (not totally precise) give the following result: top-left 08 81 02 00 02 00 FF 1F 00 00 00 00 bottom-right 08 81 EC 52 63 B8 3D 1A 01 00 0C FF x3 x2 y2 y1 x1 Pen coordinates are (x1x2x3, y1y2)
Defaut xsetwacom coordinates : xsetwacom set 'Tablet Monitor Pen stylus' "Area" "0 0 86970 47752" What I set, that's not perfect but already far better, I will update/replace this if I get better results. I don't understand why in test it didn't goes upper, but this is the case generaly, i added a negative value (-200) to correct it. xsetwacom set 'Tablet Monitor Pen stylus' "Area" "0 -200 86764 47203" This (copy limit detected give interesting results too: xsetwacom set 'Tablet Monitor Pen stylus' "Area" "2 2 86764 47203" Here is a calibrator tool that could interest some users. To use it with a tablet with screen, set the tablet screen as mirror of main screen, or set tablet as main screen, then click on the 4 points with stylus. use information to set Xorg or use the xsetwacom command then. http://www.freedesktop.org/wiki/Software/xinput_calibrator Please, use the devel branch of kreijack, that resolve an issue with libinput (the patch is still not commited in 0.7.5 (year 2010) or mainline. Here is this version: Van be installed on Archlinux by yay -S xinput_calibrator-kreijack-git |
Not related to Digimend driver but related to this tablet, I used Monica (there is an AUR package for ArchLinux) to calibrate display colors, that's still not perfect in my point of view, but that's vert easy to setup and already work well. |
I have since today a kamvas pro 20, USB ID 256c:006e. The pen works perfectly (at least for coordinates and pressure, didn't tested tilt, and don't know which tool I could use for it (October update: found it, the mainline driver doesn't mange tilt, the git one, manage it).
https://www.huion.com/pen_display/KamvasPro/Kamvas-Pro-20(2019).html
The
lsusb
result :And, so
uclogic-probe
There has 8 buttons and a 'slider' (Edit: What I called slider is "Touch Strip" in Digimend terminology) on each side of the tablet, the 'slider' have strange results in
evtest
, it looks like the two are well detected (2 axis), but moving fingers on it is displayed as pressure on other buttons.Here is the report of
evtest
on event22 (buttons, 21 is the pen)I tried to follow http://digimend.github.io/support/howto/trbl/diagnostics/ as someone suggested me on the IRC channel.
The first part, "frame_wheel_srolling.txt" wasn't very clear for me, so I made two, one for the left slider (frame_left_wheel_srolling.txt), and one for the right one (frame_right_wheel_srolling.txt). starting from bottom, going to top, and coming back to button. I followed what was asked for other part.
The same way I tried to follow the movement of the Dials, turning around the dials, on what I call sliders, even if they are only vertical one, I don't know if there is left-right sensitivity.
The text was updated successfully, but these errors were encountered: