Pentablet H420 driver
Sophia Terry
I'm using ubuntu 20.04 I'm trying to use Huion H420 Pen tablet, I install the driver in Github
After following the steps, my pen tablet still didn't work. I tried lsusb and xinput , both show that it's connected.
Bus 001 Device 004: ID 256c:006e HUION H420xinput result
Virtual core keyboard id=3 [master keyboard (2)] ↳ HUION H420 Consumer Control id=18 [slave keyboard (3)] ↳ HUION H420 id=19 [slave keyboard (3)] 1 Answer
As a rule of thumb, first ensure there is a battery (AAA) inside the pen.
The drivers are most likely already updated if you are using a modern ubuntu. So the only thing you need to do is to update the configuration file and create a configuration file.
In the directory:
/usr/share/X11/xorg.conf.d
Edit the file (future releases may have a different name, theoretically you can create your own file as well):
70-wacom.conf
Add the following:
# Huion tablets
Section "InputClass" Identifier "Huion class" MatchProduct "HUION" MatchUSBID "5543:006e|256c:006e|256c:006d MatchIsTablet "on" MatchIsKeyboard "false" MatchDevicePath "/dev/input/event*" Driver "wacom"
EndSectionIn the directory:
/etc/X11
Create the folder if it has not already exist:
xorg.conf.d
Inside the above folder, create the file (or any other name you want):
72-wacom.conf
Now you are good to go. Log out and back in or restart. Your tablet will be working. Moving the pen over the tablet should move the mouse (ensure the pen is on)
However, there is one issue. The movement is all over the place. So you need to configure it. There are more than one ways to do it, but the most common is to write a script that is run each time you turn on the computer. You can use bash for this but I'll use fish (simply because it is the example I have and I can't both to rewrite it in bash). So install fish if you dont have it. And create the script. You can add the script to your runnable app list in ubuntu. I wont go into details, here is the youtube video with the example.
Scipt:
#! /usr/bin/fish
set STYLUS_ID (xsetwacom --list | grep stylus | cut -f 2 | cut -d " " -f 2)
set PAD_ID (xsetwacom --list | grep pad | cut -f 2 | cut -d " " -f 2)
set SCREEN_WIDTH 1366 # your width here
set SCREEN_HEIGHT 768 # your height here
set TABLET_WIDTH (xsetwacom --get "$STYLUS_ID" Area | cut -d " " -f 3)
set TABLET_HEIGHT (xsetwacom --get "$STYLUS_ID" Area | cut -d " " -f 4)
set NEW_TABLET_HEIGHT (math --scale=0 $SCREEN_HEIGHT \* $TABLET_WIDTH / $SCREEN_WIDTH)
set TABLET_OFFSET_Y (math $TABLET_HEIGHT - $NEW_TABLET_HEIGHT)
set TABLET_OFFSET_Y (math --scale=0 $TABLET_OFFSET_Y / 2)
set PRIMARY_SCREEN_ID (xrandr | grep primary | cut -d " " -f 1)
xsetwacom --set "$STYLUS_ID" ResetArea
xsetwacom --set "$PAD_ID" RawSample 4
xinput map-to-output $STYLUS_ID $PRIMARY_SCREEN_ID
xsetwacom --set $STYLUS_ID Area 0 $TABLET_OFFSET_Y $TABLET_WIDTH $NEW_TABLET_HEIGHTBy all means, tweak it or change it or whatever.