I have been looking for some brands and making sure that it should work on my Slackware desktop and finally yesterday, i bought a new Graphic Drawing Tablet Huion Inspiron H430P from local dealer in Jakarta. It's considered a nice tablet for beginners and i'm not trying to be a professional artist, so this cheap tablet should be fine for me.
Today this tablet arrived and i started to check whether it's working out of the box under Slackware. I tried to connect the device to my computer and i can see that it has been detected by latest kernel in Slackware-Current (5.4.30 at this time of writing) and xorg libinput drivers. The pen (which is battery-free) works out of the box and i can instantly draw things using Krita or GIMP.
Unfortunately the pen lack of pressure sensitivity feature if we are using the driver provided by the Linux kernel. The four buttons on the tablet itself is also not working. So i tried to make a SlackBuild script to package a newer version of driver for tablets made by Digimend from this project. The project provides newer version of drivers compared to the one available in the Linux Kernel. So i installed the package and reboot the computer or you can simply reload the modules by using this command:
modprobe -r hid-kye hid-uclogic hid-polostar hid-viewsonic
The newer driver provides better support and it enables us to add more custom configuration to the tablet by using X.Org driver or Wacom driver.
Before you proceed, make sure your tablet is detected by xinput:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Wired Keyboard 600 id=9 [slave pointer (2)]
⎜ ↳ HUION Huion Tablet Pen stylus id=10 [slave pointer (2)]
⎜ ↳ HUION Huion Tablet Pad pad id=11 [slave pointer (2)]
⎜ ↳ HUION Huion Tablet Touch Ring pad id=12 [slave pointer (2)]
⎜ ↳ HUION Huion Tablet Dial id=13 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Microsoft Wired Keyboard 600 id=8 [slave keyboard (3)]
↳ Microsoft Wired Keyboard 600 id=15 [slave keyboard (3)]
↳ HUION Huion Tablet Dial
Next we need to make a new X11 custom rule for this device. I created a new file
# Huion tablets
Identifier "Huion class"
Identifier "Huion buttons"
Identifier "Huion scroll"
Reboot the computer and check whether your tablet is visible using this command:
HUION Huion Tablet Pen stylus id: 10 type: STYLUS
HUION Huion Tablet Pad pad id: 11 type: PAD
HUION Huion Tablet Touch Ring pad id: 12 type: PAD
As you can see, the device is now configurable via Wacom driver. Next i want to make a new configuration for my tablet as follows:
- Set the device mapping
- Set the screensize
- Set the ration between device:screensize
- Set 4 buttons:
* Button 1: color picker
* Button 2: resize brush size
* Button 3: toggle erase mode on/off
* Button 4: undo
Next i create a new file called huion and save it under /usr/bin:
# License: CC-0/Public-Domain license
# Author : Willy Sudiarto Raharjo
# Reference: https://www.davidrevoy.com/article331/setup-huion-giano-wh1409-tablet-on-linux-mint-18-1-ubuntu-16-04
# Tablet definition
tabletstylus="HUION Huion Tablet Pen stylus"
tabletpad="HUION Huion Tablet Pad pad"
xsetwacom --set "$tabletstylus" ResetArea
xsetwacom --set "$tabletstylus" RawSample 4
# get maximum size geometry with:
# xsetwacom --get "$tabletstylus" Area
# 0 0 24384 15240
# screen size:
# setup ratio :
newtabletY=$(( $screenY * $tabletX / $screenX ))
xsetwacom --set "$tabletstylus" Area 0 0 "$tabletX" "$newtabletY"
# TOP LEFT
xsetwacom --set "$tabletpad" Button 1 "key Control_L" # color picker on ring
# BOTTOM LEFT
xsetwacom --set "$tabletpad" Button 2 "key Shift_L" # resize brush
# TOP RIGHT
xsetwacom --set "$tabletpad" Button 3 "key e" # toggle eraser
# BOTTOM RIGHT
xsetwacom --set "$tabletpad" Button 8 "key Control_L z" # undo
Give execute permission and run this script when you start your desktop. In MATE, you can easily do this by opening System > Preferences > Personal > Startup Applications menu. Make a new entry by clicking on Add button and set the values as follows. This will ensure that the script will be executed when you logged in to your MATE desktop.
I'm planning to submit the SlackBuild to SBo soon so it can be used by other people as well. If you upgrade your kernel, you will need to re-ran the SlackBuild script so that it will place the modules into the correct kernel version used by your machine.