Getting a HUION HS610 working in Ubuntu 19.04

Well, there’s a relatively new (as of 2019) tablet by Huion, with a new USB ID:

idVendor           0x256c
idProduct          0x006d

There are still the following unresolved issues:

  • Touch wheel doesn’t work.  It appears to return the value of the touched position (one of 16, by the way) in the bytes where the tablet pad also returns button 7-10 (the first four buttons of the second set of 6).  This causes the wheel to activate those buttons because the byte that tells whether the wheel or button is pressed is ignored.
  • The pen tilt causes the cursor to shift positions, and if this isn’t a hardware issue that can’t be resolved, then there’s no support written for compensating for this in software.  It could be done in the kernel driver, though.
  • Probably some more stuff.

Configuring the tablet is also best done using the kde-config-tablet package in Ubuntu.

This is what I did on Ubuntu 19.04…to the best of my recollection.

Modify and compile digimend-kernel-drivers

Whether Linux 5.0 supports the HUION tablets without digimend-kernel-drivers or not, I don’t know.  I do know their DKMS integration makes using their drivers trivial.  A small patch has to be applied to support the new tablet.

Get the source code

git clone https://github.com/DIGImend/digimend-kernel-drivers
cd digimend-kernel-drivers

Patch the source code

Download patch: wget http://www.magicbluesmoke.org/wp-content/uploads/2019/05/digimend-huion-hs610.txt
# Check patch contents
# Apply patch
patch -p1 < digimend-huion-hs610.txt

This adds support for the new PID to the driver source, and modifies the xorg configuration file for the new PID too.

If there are any errors when patching that’s a bad sign, because the patch is so small that any problems are big problems.  This patch is for Linux 5.0.

Prep/Compile/Build/Install

These instructions are for debian/Ubuntu 19.04.

(From the README.md) sudo modprobe -r hid-kye hid-uclogic hid-polostar hid-viewsonic #...although for this tablet, just hid-uclogic should be fine.
dpkg-buildpackage -b -uc
sudo dpkg -i ../digimend-dkms_10_all.deb

Then restart your X session for the files related to X to take effect.  This might take weeks in practice, since nobody really wants to close their session.

3 Responses

  1. Alex says:

    Thanks for the patch, tested on linux mint and it works fine, I can now use the settings -> tablet function for configuring the tablet.

    However, I did not yet find how to configure the buttons and – more importantly – how to configure this touch wheel.

    Any ideas on that?

  2. Roger says:

    Problems when trying to install compiled packaged in Kde Neon Distro.
    I manage to build the package after downloading sources and applying the patch. But when I try to install de package with the command:
    sudo dpkg -i ../digimend-dkms_10_all.deb
    I get the following error:

    (Reading database … 150530 files and directories currently installed.)
    Preparing to unpack ../digimend-dkms_10_all.deb …

    ——————————
    Deleting module version: 10
    completely from the DKMS tree.
    ——————————
    Done.
    Unpacking digimend-dkms (10) over (10) …
    Setting up digimend-dkms (10) …
    Loading new digimend-10 DKMS files…
    Building for 4.18.0-25-generic
    Building initial module for 4.18.0-25-generic
    Error! Bad return status for module build on kernel: 4.18.0-25-generic (x86_64)
    Consult /var/lib/dkms/digimend/10/build/make.log for more information.

    Extracting the contents of /var/lib/dkms/digimend/10/build/make.log outputs this:

    DKMS make.log for digimend-10 for kernel 4.18.0-25-generic (x86_64)
    dom jul 14 12:08:02 CEST 2019
    make -C /lib/modules/4.18.0-25-generic/build SUBDIRS=/var/lib/dkms/digimend/10/build modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.18.0-25-generic’
    CC [M] /var/lib/dkms/digimend/10/build/hid-kye.o
    CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-core.o
    CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-rdesc.o
    CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-params.o
    CC [M] /var/lib/dkms/digimend/10/build/hid-polostar.o
    CC [M] /var/lib/dkms/digimend/10/build/hid-viewsonic.o
    In file included from /var/lib/dkms/digimend/10/build/hid-uclogic-core.c:17:0:
    /var/lib/dkms/digimend/10/build/hid-uclogic-core.c:389:5: error: ‘USB_DEVICE_ID_HUION_TABLET2019’ undeclared here (not in a function); did you mean ‘USB_DEVICE_ID_HUION_TABLET’?
    USB_DEVICE_ID_HUION_TABLET2019) },
    ^
    ./include/linux/hid.h:668:47: note: in definition of macro ‘HID_USB_DEVICE’
    .bus = BUS_USB, .vendor = (ven), .product = (prod)
    ^~~~
    scripts/Makefile.build:323: recipe for target ‘/var/lib/dkms/digimend/10/build/hid-uclogic-core.o’ failed
    make[2]: *** [/var/lib/dkms/digimend/10/build/hid-uclogic-core.o] Error 1
    make[2]: *** Waiting for unfinished jobs….
    /var/lib/dkms/digimend/10/build/hid-uclogic-params.c: In function ‘uclogic_params_init’:
    /var/lib/dkms/digimend/10/build/hid-uclogic-params.c:985:8: error: ‘USB_DEVICE_ID_HUION_TABLET2019’ undeclared (first use in this function); did you mean ‘USB_DEVICE_ID_HUION_TABLET’?
    USB_DEVICE_ID_HUION_TABLET2019):
    ^
    /var/lib/dkms/digimend/10/build/hid-uclogic-params.c:868:36: note: in definition of macro ‘VID_PID’
    (((__u32)(_vid) << 16) | ((__u32)(_pid) & U16_MAX))
    ^~~~
    /var/lib/dkms/digimend/10/build/hid-uclogic-params.c:985:8: note: each undeclared identifier is reported only once for each function it appears in
    USB_DEVICE_ID_HUION_TABLET2019):
    ^
    /var/lib/dkms/digimend/10/build/hid-uclogic-params.c:868:36: note: in definition of macro ‘VID_PID’
    (((__u32)(_vid) << 16) | ((__u32)(_pid) & U16_MAX))
    ^~~~
    scripts/Makefile.build:323: recipe for target '/var/lib/dkms/digimend/10/build/hid-uclogic-params.o' failed
    make[2]: *** [/var/lib/dkms/digimend/10/build/hid-uclogic-params.o] Error 1
    Makefile:1534: recipe for target '_module_/var/lib/dkms/digimend/10/build' failed
    make[1]: *** [_module_/var/lib/dkms/digimend/10/build] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-25-generic'
    Makefile:22: recipe for target 'modules' failed
    make: *** [modules] Error 2

    Any suggestion how to solve this problem?
    Thanks

  3. erik says:

    CONFIGURACION DE TABLET HUION EN UBUNTU

    cd /etc/X11
    sudo mkdir xorg.conf.d
    cd xorg.conf.d
    sudo gedit 52-tablet.conf
    Copy and paste the following in that file:
    Section “InputClass”
    Identifier “Huion on wacom”
    # MatchIsTablet “on”
    MatchProduct “HUION”
    MatchDevicePath “/dev/input/event*”
    Driver “wacom”
    EndSection
    Saving the file and restart.

    Open the terminal and put the following: xsetwacom –list
    You should see something like this:

    HUION PenTablet Pad pad id: 13 type: PAD
    HUION PenTablet Pen stylus id: 14 type: STYLUS

    CONFIGURACION EN TERMINAL PARA GIMP
    xsetwacom –set “HUION H610PRO Pad pad” Button 1 key +ctrl +z -z -ctrl
    xsetwacom –set “HUION H610PRO Pad pad” Button 2 key +shift +e
    xsetwacom –set “HUION H610PRO Pad pad” Button 3 key +p
    xsetwacom –set “HUION H610PRO Pad pad” Button 8 key +shift + =
    xsetwacom –set “HUION H610PRO Pad pad” Button 9 key + –
    xsetwacom –set “HUION H610PRO Pad pad” Button 10 key + ]
    xsetwacom –set “HUION H610PRO Pad pad” Button 11 key + [
    xsetwacom –set “HUION H610PRO Pad pad” Button 12 key + m

    CONFIGURACION EN TERMINAL PARA BLENDER
    xsetwacom –set “HUION H610PRO Pad pad” Button 1 key +r
    xsetwacom –set “HUION H610PRO Pad pad” Button 2 key +e
    xsetwacom –set “HUION H610PRO Pad pad” Button 3 key +s
    xsetwacom –set “HUION H610PRO Pad pad” Button 8 key +tab
    xsetwacom –set “HUION H610PRO Pad pad” Button 9 key +z
    xsetwacom –set “HUION H610PRO Pad pad” Button 10 key +w
    xsetwacom –set “HUION H610PRO Pad pad” Button 11 key +shift +ctrl +tab
    xsetwacom –set “HUION H610PRO Pad pad” Button 12 key +a

Leave a Reply

Your email address will not be published. Required fields are marked *