Pressure sensitivity no longer works for HUION graphics tablet with resent Linux kernel
Closed, ArchivedPublic


System Information
Arch Linux 4.10.2-1-ARCH
GTX 1070 with Nvidia driver

Blender Version
Broken: 2.78c , 2.78b and 2.78a

Worked: Worked before upgrading to 4.10. Works fine in 4.8.11-1-ARCH

After updating my system the pressure sensitivity from a HUION H610 no longer works. The pressure sensitivity does still work in other programs such as GIMP, MyPaint and Krita.

Other notes:
I have noticed that the input devices listed in $xinput are different concerning the Huion tablet from Linux 4.8 to 4.10

In 4.8.11-1-ARCH:
$ xinput | grep HUION
HUION TopwinT261 Pen id=14 [slave pointer (2)]
HUION TopwinT261 Mouse id=15 [slave pointer (2)]
HUION TopwinT261 Consumer Control id=16 [slave pointer (2)]
HUION TopwinT261 System Control id=17 [slave keyboard (3)]
HUION TopwinT261 Keyboard id=18 [slave keyboard (3)]

In 4.10.2-1-ARCH:
$ xinput | grep HUION
HUION TopwinT261 Pad id=10 [slave pointer (2)]
HUION TopwinT261 Consumer Control id=11 [slave pointer (2)]
HUION TopwinT261 Pen Pen (0) id=16 [slave pointer (2)]
HUION TopwinT261 Pen id=9 [slave keyboard (3)]
HUION TopwinT261 Consumer Control id=15 [slave keyboard (3)]




@atharva (athar) could you try this patch?

Added check for pen - which may solve the problem. Otherwise it prints out stylus & types.

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 30cfac08153..6fa0459b644 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -2154,11 +2154,12 @@ static BOOL is_stylus(const char *name, const char *type)
 	int i;
 	static const char *tablet_stylus_whitelist[] = {
+		"pen",  // try this!
+printf("Is Stylus: '%s', '%s'\n", name, type);
 	for (i = 0; tablet_stylus_whitelist[i] != NULL; i++) {
 		if (name && match_token(name, tablet_stylus_whitelist[i]))
 			return TRUE;

@Campbell Barton (campbellbarton) yeah I tried that patch, but that didn't solve the issue.

I got the following output:

bin]$ ./blender
Color management: using fallback mode for management
Is Stylus: 'Virtual core pointer','(null)'
Is Stylus: 'Virtual core keyboard','(null)'
Is Stylus: 'Virtual core XTEST pointer','(null)'
Is Stylus: 'Virtual core XTEST keyboard','(null)'
Is Stylus: 'Power Button','KEYBOARD'
Is Stylus: 'Power Button','KEYBOARD'
Is Stylus: '  USB Keyboard','KEYBOARD'
Is Stylus: '  USB Keyboard','KEYBOARD'
Is Stylus: 'USB Optical Mouse','MOUSE'
Is Stylus: '1060PRO Pad','PAD'
Is Stylus: '1060PRO Pen','TABLET'
Sergey Sharybin (sergey) closed this task as Archived.Jun 2 2017, 12:20 PM

@atharva (athar), you can test something like P485 to try getting idea whether stylus gets rejected by something else.

Please also note that we can only fix bugs which we can reproduce, and this one is not reproducable without specific hardware. We'll be happy to help you trouibleshooting the issue on #blendercoders IRC room at tho!