Huion tablet

From YobiWiki
Jump to navigation Jump to search

Intro

Got it for 20.86€ on Aliexpress

  • HUION H430P
  • Active area 121.9 x 76.2mm
  • Resolution 5080 LPI
  • Report Rate 233PPS
  • Pen Pressure 4096Levels
  • Reading Height 10mm
  • Express Keys 4

Links


Driver installation

Get digimend-dkms_8_all.deb from https://github.com/DIGImend/digimend-kernel-drivers/releases

$ sudo apt-get install dkms
$ sudo dpkg -i digimend-dkms_8_all.deb

Hum, well, installation on my Debian Sid was a breeze but when I wanted to install the same tablet on another laptop with a Debian Stable, things weren't that easy.

$ sudo dpkg -i digimend-dkms_8_all.deb
...
hid-uclogic.ko:
Running module version sanity check.
Error! Module version 8 for hid-uclogic.ko
is not newer than what is already found in kernel 4.9.0-8-amd64 (8).
You may override by specifying --force.
...

And only the pen was recognized, not the pad.

$ xinput --list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ HUION Huion Tablet Pen stylus           	id=13	[slave  pointer  (2)]
⎜   ↳ ...
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ ...

And dmesg show some errors from uclogic driver:

$ sudo dmesg
[  165.187552] uclogic 0003:256C:006E.0003: failed to enable abstract keyboard

Even when forcing the override of hid-uclogic, it failed. Retrospectively maybe I just needed to reboot after forcing hid-logic at this point but finally I decided to install a more recent kernel, so here are the steps that worked for me.

Add stretch-backports in /etc/apt/sources.list:

deb http://ftp.be.debian.org/debian stretch-backports main contrib non-free
$ sudo apt-get update
$ sudo apt-get install -t stretch-backports linux-image-4.18.0-0.bpo.1-amd64 linux-headers-4.18.0-0.bpo.1-amd64 linux-kbuild-4.18
$ sudo dkms remove digimend/8 --all
$ sudo dkms build digimend -v 8
$ sudo dkms install digimend -v 8 --force
$ sudo reboot
...
$ /sbin/modinfo hid-uclogic |grep ^version
version:        8

Wacom tools

Use wacom drivers for more finetuning:

# apt-get install xserver-xorg-input-wacom
# mkdir -p /etc/X11/xorg.conf.d/
# cat > /etc/X11/xorg.conf.d/50-tablet.conf << EOF
Section "InputClass"
    Identifier "Huion class"
    MatchUSBID "256c:006e"
    MatchDevicePath "/dev/input/event*"
    Driver "wacom"
EndSection
EOF

Restart X11 session.

$ xsetwacom list
HUION Huion Tablet Pen stylus   	id: 23	type: STYLUS    
HUION Huion Tablet Pad pad      	id: 24	type: PAD       

$ xsetwacom -s get "HUION Huion Tablet Pen stylus" all 2>/dev/null
xsetwacom set "HUION Huion Tablet Pen stylus" "Area" "0 0 24384 15240"
xsetwacom set "HUION Huion Tablet Pen stylus" "Button" "1" "button +1 "
xsetwacom set "HUION Huion Tablet Pen stylus" "Button" "2" "button +2 "
xsetwacom set "HUION Huion Tablet Pen stylus" "Button" "3" "button +3 "
xsetwacom set "HUION Huion Tablet Pen stylus" "ToolDebugLevel" "0"
xsetwacom set "HUION Huion Tablet Pen stylus" "TabletDebugLevel" "0"
xsetwacom set "HUION Huion Tablet Pen stylus" "Suppress" "2"
xsetwacom set "HUION Huion Tablet Pen stylus" "RawSample" "4"
xsetwacom set "HUION Huion Tablet Pen stylus" "PressureCurve" "0 0 100 100"
xsetwacom set "HUION Huion Tablet Pen stylus" "Mode" "Absolute"
xsetwacom set "HUION Huion Tablet Pen stylus" "TabletPCButton" "off"
xsetwacom set "HUION Huion Tablet Pen stylus" "Touch" "off"
xsetwacom set "HUION Huion Tablet Pen stylus" "Gesture" "off"
xsetwacom set "HUION Huion Tablet Pen stylus" "ZoomDistance" "0"
xsetwacom set "HUION Huion Tablet Pen stylus" "ScrollDistance" "0"
xsetwacom set "HUION Huion Tablet Pen stylus" "TapTime" "250"
xsetwacom set "HUION Huion Tablet Pen stylus" "Rotate" "none"
xsetwacom set "HUION Huion Tablet Pen stylus" "Threshold" "26"
xsetwacom set "HUION Huion Tablet Pen stylus" "BindToSerial" "0"
xsetwacom set "HUION Huion Tablet Pen stylus" "PressureRecalibration" "on"

$ xsetwacom -s get "HUION Huion Tablet Pad pad" all 2>/dev/null
Property 'Wacom Tablet Area' does not exist on device.
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "1" "button +1 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "2" "button +2 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "3" "button +3 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "8" "button +8 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "9" "button +9 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "10" "button +10 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "11" "button +11 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "12" "button +12 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "13" "button +13 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "14" "button +14 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "15" "button +15 "
xsetwacom set "HUION Huion Tablet Pad pad" "Button" "16" "button +16 "
xsetwacom set "HUION Huion Tablet Pad pad" "ToolDebugLevel" "0"
xsetwacom set "HUION Huion Tablet Pad pad" "TabletDebugLevel" "0"
xsetwacom set "HUION Huion Tablet Pad pad" "Suppress" "2"
xsetwacom set "HUION Huion Tablet Pad pad" "RawSample" "4"
xsetwacom set "HUION Huion Tablet Pad pad" "Mode" "Absolute"
xsetwacom set "HUION Huion Tablet Pad pad" "Touch" "off"
xsetwacom set "HUION Huion Tablet Pad pad" "Gesture" "off"
xsetwacom set "HUION Huion Tablet Pad pad" "ZoomDistance" "0"
xsetwacom set "HUION Huion Tablet Pad pad" "ScrollDistance" "0"
xsetwacom set "HUION Huion Tablet Pad pad" "TapTime" "250"
xsetwacom set "HUION Huion Tablet Pad pad" "RelWheelUp" "1" "button +5 "
xsetwacom set "HUION Huion Tablet Pad pad" "RelWheelDown" "2" "button +4 "
xsetwacom set "HUION Huion Tablet Pad pad" "AbsWheelUp" "3" "button +4 "
xsetwacom set "HUION Huion Tablet Pad pad" "AbsWheelDown" "4" "button +5 "
xsetwacom set "HUION Huion Tablet Pad pad" "AbsWheel2Up" "5" "button +4 "
xsetwacom set "HUION Huion Tablet Pad pad" "AbsWheel2Down" "6" "button +5 "
xsetwacom set "HUION Huion Tablet Pad pad" "StripLeftUp" "1" "button +4 "
xsetwacom set "HUION Huion Tablet Pad pad" "StripLeftDown" "2" "button +5 "
xsetwacom set "HUION Huion Tablet Pad pad" "StripRightUp" "3" "button +4 "
xsetwacom set "HUION Huion Tablet Pad pad" "StripRightDown" "4" "button +5 "
xsetwacom set "HUION Huion Tablet Pad pad" "Threshold" "0"
xsetwacom set "HUION Huion Tablet Pad pad" "BindToSerial" "0"

Remove "-s" (shell) to get a line we can fit in xorg.conf

Pad Buttons:

  • 1: left up
  • 2: left down
  • 3: right up
  • 8: right down

To map buttons, e.g. Ctrl-Z (undo) to 4th button "8"!:

$ xsetwacom set "HUION Huion Tablet Pad pad" button 8 key Ctrl Z

Pen Buttons:

  • 1: press tip (default: mouse left button)
  • 2: press lower button (default: mouse middle button)
  • 3: press upper button (default: mouse right button)

E.g. to reset default behavior:

$ xsetwacom set "HUION Huion Tablet Pen stylus" button 1 button +1
$ xsetwacom set "HUION Huion Tablet Pen stylus" button 2 button +2
$ xsetwacom set "HUION Huion Tablet Pen stylus" button 3 button +3

To limit tablet to one of the 2 screens, e.g. eDP-1 or HDMI-1 (cf xrandr):

$ xsetwacom set "HUION Huion Tablet Pen stylus" MapToOutput eDP-1
$ xsetwacom set "HUION Huion Tablet Pen stylus" MapToOutput HDMI-1

Softs

Krita

$ sudo apt-get install krita

cf https://www.davidrevoy.com/static5/table-of-content