You are not logged in.

#1 2019-10-09 04:52:55

h3b
Member
Registered: 2019-09-01
Posts: 6

[SOLVED] Huion graphic tablet not recognized after updates

Hi!

Recently my Huion 1060plus started to not being recognized in my updated computers. I tried the tablet in a laptop that has not been updated (about two months) and it worked flawlessly.

Here is a comparison of dmesg:

Up to date computers:

[ 4168.587592] usb 1-1.1: new full-speed USB device number 13 using xhci_hcd
[ 4168.990456] usb 1-1.1: New USB device found, idVendor=256c, idProduct=006e, bcdDevice=30.00
[ 4168.990461] usb 1-1.1: New USB device strings: Mfr=5, Product=6, SerialNumber=0
[ 4168.990463] usb 1-1.1: Product: PenTablet 
[ 4169.003082] usb 1-1.1: can't set config #1, error -32

by contrast this is what I get in the old laptop:

[   62.724538] usb 2-3.1: new full-speed USB device number 3 using xhci_hcd
[   62.851463] usb 2-3.1: New USB device found, idVendor=256c, idProduct=006e, bcdDevice=30.00
[   62.851470] usb 2-3.1: New USB device strings: Mfr=5, Product=6, SerialNumber=0
[   62.851475] usb 2-3.1: Product: PenTablet 
[   62.909757] hidraw: raw HID events driver (C) Jiri Kosina
[   62.929599] usbcore: registered new interface driver usbhid
[   62.929601] usbhid: USB HID core driver
[   62.939433] input: PenTablet  as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.0/0003:256C:006E.0001/input/input15
[   62.939691] input: PenTablet  Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.0/0003:256C:006E.0001/input/input16
[   62.939804] hid-generic 0003:256C:006E.0001: input,hidraw0: USB HID v1.11 Mouse [PenTablet ] on usb-0000:00:14.0-3.1/input0
[   62.943515] input: PenTablet  Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.1/0003:256C:006E.0002/input/input17
[   62.943646] input: PenTablet  as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.1/0003:256C:006E.0002/input/input18
[   62.943805] hid-generic 0003:256C:006E.0002: input,hiddev0,hidraw1: USB HID v1.11 Mouse [PenTablet ] on usb-0000:00:14.0-3.1/input1
[   62.944370] input: PenTablet  Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.2/0003:256C:006E.0003/input/input19
[   62.951136] usb 2-3.4: new high-speed USB device number 4 using xhci_hcd
[   62.997966] input: PenTablet  Consumer Control as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.2/0003:256C:006E.0003/input/input20
[   62.998070] input: PenTablet  System Control as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.2/0003:256C:006E.0003/input/input21
[   62.998161] hid-generic 0003:256C:006E.0003: input,hidraw2: USB HID v1.0b Keyboard [PenTablet ] on usb-0000:00:14.0-3.1/input2

Any comment on how to solve this is appreciated.

Thanks!

h3b

Last edited by h3b (2020-06-13 21:38:56)

Offline

#2 2019-10-16 18:25:33

WebFreak001
Member
Registered: 2016-10-05
Posts: 14

Re: [SOLVED] Huion graphic tablet not recognized after updates

hi, I had the same issue with the same tablet and I'm not exactly sure what caused it to be honest, but I have fixed it for me now.

Before I had the digimend-kernel-drivers-dkms-git package installed from the AUR and it used to make the tablet work, but now it doesn't seem to work anymore. (Tried uninstalling and reinstalling it but it didn't fix it)

When I first got the tablet and didn't have the digimend kernel drivers installed, it used to work with just the kernel and no extra drivers, (with limited functionality) but now it doesn't seem to be that way anymore.

To fix it, instead of using the AUR package mentioned above, I manually installed the digimend kernel drivers from their github: https://github.com/DIGImend/digimend-kernel-drivers

This made the tablet work again for now. I'm not sure if this will persist across kernel upgrades and it will probably need to be reapplied then, but until the AUR package there works, this seems like an easy solution.

What I think might have happened is that Huion re-released the tablet with the same USB ID (256c:006e) as "Huion New 1060 Plus" which is still used on the old Huion 1060 Plus tablets like the one I have. Possibly the driver code for that USB id was deactivated or something like that because of that device change, but that's just speculation. See: https://digimend.github.io/tablets/Huion_New_1060_Plus/

Point is, if you install the digimend drivers manually, it will start working again. Digimend also submits their patches upstream too so in the future this "new" tablet might come to the kernel again.

Hope this helps

EDIT:

This didn't seem to be a working/reproducible solution. Possibly I just had random luck plugging my tablet out and in often enough that it eventually worked for one try. I didn't try it further then, but now I noticed the bug is still occurring even with digimend v10 installed. So possibly digimend is having some effect on this, but even after removing and reinstalling it I couldn't seem to reproduce the success. I still think with digimend this should work afterwards better but it seems like right now this isn't the fix.

- WebFreak

Last edited by WebFreak001 (2019-10-21 19:58:55)

Offline

#3 2019-10-16 18:48:42

loqs
Member
Registered: 2014-03-06
Posts: 18,001

Re: [SOLVED] Huion graphic tablet not recognized after updates

Which kernel did the issue first occur with?

Last edited by loqs (2019-10-16 18:51:57)

Offline

#4 2019-10-21 02:44:47

h3b
Member
Registered: 2019-09-01
Posts: 6

Re: [SOLVED] Huion graphic tablet not recognized after updates

Thanks for your replies!

@WebFreak001 I tried your suggestion of installing digimend kernel drivers but my tablet is still not recognized sad

@loqs This is not the last kernel it worked, but it is one that for sure works (an old laptop has it installed and my tablet is working there). 5.2.8-arch1-1-ARCH

Thanks,

h3b

Offline

#5 2019-10-24 16:41:55

loqs
Member
Registered: 2014-03-06
Posts: 18,001

Re: [SOLVED] Huion graphic tablet not recognized after updates

Can you please try downgrading the kernel to https://archive.archlinux.org/packages/ … pkg.tar.xz
If that works then please check https://archive.archlinux.org/packages/ … pkg.tar.xz.
The first kernel linked is the last of the 5.2 series packaged by arch.  The second kernel is the first of the 5.3 series packaged by arch.

Offline

#6 2019-10-25 13:08:31

WebFreak001
Member
Registered: 2016-10-05
Posts: 14

Re: [SOLVED] Huion graphic tablet not recognized after updates

loqs wrote:

Can you please try downgrading the kernel to https://archive.archlinux.org/packages/ … pkg.tar.xz
If that works then please check https://archive.archlinux.org/packages/ … pkg.tar.xz.
The first kernel linked is the last of the 5.2 series packaged by arch.  The second kernel is the first of the 5.3 series packaged by arch.

@loqs I tried the different kernels and indeed 5.2.14.arch2-1 still worked fine with the tablet and starting with 5.3.1.arch1-1 the tablet support broke with same error message as OP.

Offline

#7 2019-10-25 21:38:43

loqs
Member
Registered: 2014-03-06
Posts: 18,001

Re: [SOLVED] Huion graphic tablet not recognized after updates

WebFreak001 thank you for checking that.
I would suggest you either test linux-mainline to see if the issue is already fixed in linux 4.4-rc4.
Or you can bisect between linux 5.2 and 5.3 to find the causal commit using the following instructions:

The following assumes the base-devel group and git are installed and I recomend enabling Makepkg#Parallel_compilation to reduce build times

$ git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/linux"
$ cd packages/trunk
$ git checkout 755b012b4c22d24afcb10c5a38f82d29ea6eb156 #5.2.14.arch2-1
$ cd ../..
$ cp -r packages/trunk linux-git
$ rm -rf packages
$ cd linux-git
# Edit replace the PKGBUILD and 90-linux.hook with the ones below
$ makepkg -rsi #This is to confirm 5.2 as built on your system does not have the issue.  Update bootloader for new kernel if needed

$ cd linux-git/src/linux
$ git checkout v5.3
$ cd ../..
$ makepkg -ersi #This is to confirm 5.3 as built on your system does have the issue select the default option for all prompted options

$ cd linux-git/src/linux/
$ git bisect start
$ git bisect good v5.3
$ git bisect bad v5.2
$ cd ../..
$ makepkg -ersif

$ cd linux-git/src/linux/
$ git bisect $result #Substitue good or bad here
$ cd ../..
$ makepkg -ersif #Repeat these four lines and test the generated kernel until git has found the bad commit

PKGBUILD

# Maintainer: Boohbah <boohbah at gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
# Contributor: Jonathan Chan <jyc@fastmail.fm>
# Contributor: misc <tastky@gmail.com>
# Contributor: NextHendrix <cjones12 at sheffield.ac.uk>

pkgbase=linux-git
_srcname=linux
pkgver=5.2.r0.g0ecfebd2b524
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
makedepends=('kmod' 'inetutils' 'bc' 'libelf')
options=('!strip')
source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v5.2'
        #'git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=X.X.Y'
        'config'   # the main kernel config file
        '60-linux.hook'  # pacman hook for depmod
        '90-linux.hook'  # pacman hook for initramfs regeneration
        'linux.preset'   # standard config files for mkinitcpio ramdisk
)

sha256sums=('SKIP'
            'e0d0f140128a8574217701e61e874a0a108f3b8cd0f6e35d8b16afe897999f8e'
            'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
            '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
            'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')

_kernelname=${pkgbase#linux}
: ${_kernelname:=-ARCH}

pkgver() {
  cd "${_srcname}"

  git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/'
}

prepare() {
  cd ${_srcname}

  cp -Tf ../config .config

  # set localversion to git commit
  sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
  sed -i "s|^.*CONFIG_LOCALVERSION_AUTO.*|CONFIG_LOCALVERSION_AUTO=y|" ./.config

  # don't run depmod on 'make install'. We'll do this ourselves in packaging
#  git tracks scripts/depmod.sh so do not change it when using the existing source dir for bisection
#  sed -i '2iexit 0' scripts/depmod.sh

  # get kernel version
  make prepare

  # load configuration
  # Configure the kernel. Replace the line below with one of your choice.
  #make menuconfig # CLI menu for configuration
  #make nconfig # new CLI menu for configuration
  #make xconfig # X-based configuration
  #make oldconfig # using old config from previous kernel version
  make olddefconfig # old config from previous kernel, defaults for new options
  # ... or manually edit .config
}

build() {
  cd ${_srcname}

  make bzImage modules
}

_package() {
  pkgdesc="The Linux kernel and modules (git version)"
  depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
  optdepends=('crda: to set the correct wireless channels of your country')
  backup=("etc/mkinitcpio.d/${pkgbase}.preset")
  install=linux.install

  cd ${_srcname}

  # get kernel version
  _kernver="$(make kernelrelease)"
  _kernver=${_kernver%-dirty} #https://bbs.archlinux.org/viewtopic.php?id=236702
  _basekernel="$(make kernelversion)"
  _basekernel=${_basekernel%.*}

  mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
  make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
  cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"

  # make room for external modules
  local _extramodules="extramodules-${_basekernel}${_kernelname}"
  ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"

  # add real version for building modules and running depmod from hook
  echo "${_kernver}" |
    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"

  # remove build and source links
  rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}

  # now we call depmod...
  depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"

  # add vmlinux
  install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux

  # sed expression for following substitutions
  local _subst="
    s|%PKGBASE%|${pkgbase}|g
    s|%KERNVER%|${_kernver}|g
    s|%EXTRAMODULES%|${_extramodules}|g
  "

  # hack to allow specifying an initially nonexisting install file
  sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
  true && install=${install}.pkg

  # install mkinitcpio preset file
  sed "${_subst}" ../linux.preset |
    install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"

  # install pacman hooks
  sed "${_subst}" ../60-linux.hook |
    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
  sed "${_subst}" ../90-linux.hook |
    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
}

_package-headers() {
  pkgdesc="Header files and scripts for building modules for Linux kernel (git version)"

  cd ${_srcname}
  local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"

  install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
  install -Dt "${_builddir}/kernel" -m644 kernel/Makefile

  mkdir "${_builddir}/.tmp_versions"

  cp -t "${_builddir}" -a include scripts

  install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
  install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s

  cp -t "${_builddir}/arch/x86" -a arch/x86/include

  install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
  install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h

  # http://bugs.archlinux.org/task/13146
  install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h

  # http://bugs.archlinux.org/task/20402
  install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
  install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
  install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h

  # add xfs and shmem for aufs building
  mkdir -p "${_builddir}"/{fs/xfs,mm}

  # copy in Kconfig files
  find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;

  # add objtool for external module building and enabled VALIDATION_STACK option
  install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool

  # remove unneeded architectures
  local _arch
  for _arch in "${_builddir}"/arch/*/; do
    [[ ${_arch} == */x86/ ]] && continue
    rm -r "${_arch}"
  done

  # remove files already in linux-docs package
  rm -r "${_builddir}/Documentation"

  # remove now broken symlinks
  find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete

  # Fix permissions
  chmod -R u=rwX,go=rX "${_builddir}"

  # strip scripts directory
  local _binary _strip
  while read -rd '' _binary; do
    case "$(file -bi "${_binary}")" in
      *application/x-sharedlib*)  _strip="${STRIP_SHARED}"   ;; # Libraries (.so)
      *application/x-archive*)    _strip="${STRIP_STATIC}"   ;; # Libraries (.a)
      *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
      *) continue ;;
    esac
    /usr/bin/strip ${_strip} "${_binary}"
  done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
}

_package-docs() {
  pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel (git version)"

  cd ${_srcname}
  local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"

  mkdir -p "${_builddir}"
  cp -t "${_builddir}" -a Documentation

  # Fix permissions
  chmod -R u=rwX,go=rX "${_builddir}"
}

pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
for _p in ${pkgname[@]}; do
  eval "package_${_p}() {
    $(declare -f "_package${_p#${pkgbase}}")
    _package${_p#${pkgbase}}
  }"
done

# vim:set ts=8 sts=2 sw=2 et:

90-linux.hook

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*

[Action]
Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%

Offline

#8 2019-10-26 00:06:00

WebFreak001
Member
Registered: 2016-10-05
Posts: 14

Re: [SOLVED] Huion graphic tablet not recognized after updates

I built mainline now, but the tablet doesn't seem to work on there either.

I'm now starting to do the bisect part but because the compiler randomly segfaults during the compilation step (it did in the mainline too for 2 times and only worked on the third) this is taking more time than expected.

I will try more tomorrow but I think this might take multiple days depending on the amount of commits I test.

For reference here is the error but the error location (source file and line) is always different and not predictable. I also don't know what these plugins are or why it's using them.

*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_TYPE               | structleak_plugin
PLUGIN_ATTRIBUTES                | structleak_plugin
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgv100.c:31:1: internal compiler error: Segmentation fault
   31 | gv100_vmm_join(struct nvkm_vmm *vmm, struct nvkm_memory *inst)
      | ^~~~~~~~~~~~~~
  CC [M]  drivers/input/touchscreen/mms114.o
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make[4]: *** [scripts/Makefile.build:279: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgv100.o] Error 1

Not sure which C compiler it's using but I have GCC 9.2.0 installed if it's using GCC.

Offline

#9 2019-10-26 00:11:15

loqs
Member
Registered: 2014-03-06
Posts: 18,001

Re: [SOLVED] Huion graphic tablet not recognized after updates

If you have enabled parallel compilation you could try reducing the number of jobs.

Offline

#10 2019-12-19 15:02:10

WebFreak001
Member
Registered: 2016-10-05
Posts: 14

Re: [SOLVED] Huion graphic tablet not recognized after updates

loqs wrote:

If you have enabled parallel compilation you could try reducing the number of jobs.

alright this worked (and also calling makepkg with -e multiple times) and I finally had the time and motivation to test this the last few days. It resulted in this:

ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first bad commit
commit ef513be0a9057cc6baf5d29566aaaefa214ba344
Author: Jim Lin <jilin@nvidia.com>
Date:   Mon Jun 3 18:53:44 2019 +0800

    usb: xhci: Add Clear_TT_Buffer
   
    USB 2.0 specification chapter 11.17.5 says "as part of endpoint halt
    processing for full-/low-speed endpoints connected via a TT, the host
    software must use the Clear_TT_Buffer request to the TT to ensure
    that the buffer is not in the busy state".
   
    In our case, a full-speed speaker (ConferenceCam) is behind a high-
    speed hub (ConferenceCam Connect), sometimes once we get STALL on a
    request we may continue to get STALL with the folllowing requests,
    like Set_Interface.
   
    Here we invoke usb_hub_clear_tt_buffer() to send Clear_TT_Buffer
    request to the hub of the device for the following Set_Interface
    requests to the device to get ACK successfully.
   
    Signed-off-by: Jim Lin <jilin@nvidia.com>
    Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drivers/usb/host/xhci-ring.c | 27 ++++++++++++++++++++++++++-
drivers/usb/host/xhci.c      | 21 +++++++++++++++++++++
drivers/usb/host/xhci.h      |  5 +++++
3 files changed, 52 insertions(+), 1 deletion(-)

So changes in xhci sound pretty likely for this issue. I haven't investigated further yet but this is good to know already. Thanks for the great guide for bisecting too!

So now I guess I should make a bug report on the kernel?

Offline

#11 2020-03-01 22:46:30

h3b
Member
Registered: 2019-09-01
Posts: 6

Re: [SOLVED] Huion graphic tablet not recognized after updates

loqs & WebFreak001

Thanks for working through this problem, really appreciate that.

@WebFreak001, is there a place in where I can follow this further? could you point me to the bug report on the kernel?

Thanks,

h3b

Offline

#12 2020-03-02 07:54:46

WebFreak001
Member
Registered: 2016-10-05
Posts: 14

Re: [SOLVED] Huion graphic tablet not recognized after updates

@h3b uh sorry I haven't gotten around to create a bug report yet, I have just been using a downgraded kernel all the time to avoid this issue.

I don't know when I will get around to it, it might be faster if you do it with the logs and info I posted here.

- WebFreak

Offline

#13 2020-03-29 16:02:30

h3b
Member
Registered: 2019-09-01
Posts: 6

Re: [SOLVED] Huion graphic tablet not recognized after updates

@WebFreak001, I submitted the bug. You can find it here https://bugzilla.kernel.org/show_bug.cgi?id=206897

In the meantime I am using a downgraded kernel as well.

h3b

Offline

#14 2020-04-13 23:13:24

bolorino
Member
From: Spain
Registered: 2013-06-17
Posts: 18
Website

Re: [SOLVED] Huion graphic tablet not recognized after updates

Well, it seems there are two patches that resolves the issues with USB and the Huion tablet.
https://bugzilla.kernel.org/show_bug.cgi?id=207065#c7

Patches


Improve my english... Work in progress

Offline

#15 2020-06-13 21:37:47

h3b
Member
Registered: 2019-09-01
Posts: 6

Re: [SOLVED] Huion graphic tablet not recognized after updates

Hi!

I wanted to report that the problem is solved in kernel version 5.7.2-arch1-1

Thanks for all the help!

h3b

Offline

Board footer

Powered by FluxBB