Pressure sensitivity no longer works for HUION graphics tablet with resent Linux kernel #50961

Closed
opened 2017-03-16 07:11:11 +01:00 by Ashley S · 28 comments

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)]

Thanks.

**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)] Thanks.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @datadump

Added subscriber: @datadump

#51504 was marked as duplicate of this issue

#51504 was marked as duplicate of this issue
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Campbell Barton was assigned by Aaron Carlisle 2017-04-05 17:55:05 +02:00

Added subscriber: @atharvakulkarni

Added subscriber: @atharvakulkarni

@atharvakulkarni 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[] = {
 		"stylus",
+		"pen",  // try this!
 		"wizardpen",
 		"acecad",
 		NULL
 	};
-
+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;
@atharvakulkarni 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[] = { "stylus", + "pen", // try this! "wizardpen", "acecad", NULL }; - +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; ```

@ideasman42 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'


@ideasman42 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' ```

@ideasman42 Got any idea where to find the bug?

@ideasman42 Got any idea where to find the bug?

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

@atharvakulkarni, 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 irc.freenode.net tho!

@atharvakulkarni, you can test something like [P485](https://archive.blender.org/developer/P485.txt) 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 irc.freenode.net tho!

Added subscriber: @JesusBalbastro

Added subscriber: @JesusBalbastro

Hello, I think I have a solution to this. I have a similar tablet [Huion 540] with the same problem. The solution is to use xinput to disable some duplicates entries the device makes.

$ xinput 
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳...
⎜   ↳ HUION 540 Pad                             id=10   [slave  pointer  (2)]
⎜   ↳ HUION 540 Consumer Control                id=11   [slave  pointer  (2)]
⎜   ↳ HUION 540 Pen Pen (0)                     id=18   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ...
    ↳ HUION 540 Consumer Control                id=12   [slave  keyboard (3)]
    ↳ HUION 540 Pen                             id=17   [slave  keyboard (3)]

Disabling id 17 like so

$ xinput disable 17

makes pressure work again.
I don't know if this problem is blender's or the kernels.

I'm on Arch, Linux Kernel 4.9.56-1-lts

Hello, I think I have a solution to this. I have a similar tablet [Huion 540] with the same problem. The solution is to use xinput to disable some duplicates entries the device makes. ``` $ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳... ⎜ ↳ HUION 540 Pad id=10 [slave pointer (2)] ⎜ ↳ HUION 540 Consumer Control id=11 [slave pointer (2)] ⎜ ↳ HUION 540 Pen Pen (0) id=18 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ... ↳ HUION 540 Consumer Control id=12 [slave keyboard (3)] ↳ HUION 540 Pen id=17 [slave keyboard (3)] ``` Disabling id 17 like so ``` $ xinput disable 17 ``` makes pressure work again. I don't know if this problem is blender's or the kernels. I'm on Arch, Linux Kernel 4.9.56-1-lts

Added subscriber: @allen-marshall

Added subscriber: @allen-marshall

I think I am having the same issue. I have a Monoprice tablet (product ID 10594), which I think is just a Huion H610 with different branding. (It has the same specs, same appearance, and works with the Huion driver on Windows.) Pressure sensitivity doesn't work in Blender 2.79 on either Ubuntu 17.04 or 17.10, but works in Krita. I also tried a Blender 2.80 build (blender-2.80-83de7c4094b-linux-glibc219-x86_64) and got the same problem. Pressure sensitivity works correctly for me in Blender 2.79 on Windows 10.

As in @JesusBalbastro's situation, the problem seems to be related to the fact that the tablet creates multiple xinput entries. I tried uncommenting some printfs in GHOST_SystemX11.cpp and got these results when running Blender 2.79 on the command line.

...
Tablet type:'(null)', name:'Virtual core pointer', index:0
Tablet type:'(null)', name:'Virtual core keyboard', index:1
Tablet type:'(null)', name:'Virtual core XTEST pointer', index:2
Tablet type:'(null)', name:'Virtual core XTEST keyboard', index:3
Tablet type:'KEYBOARD', name:'Power Button', index:4
Tablet type:'KEYBOARD', name:'Video Bus', index:5
Tablet type:'KEYBOARD', name:'Power Button', index:6
Tablet type:'PAD', name:'10594 Pad', index:7
Tablet type:'TABLET', name:'10594 Pen', index:8
	found stylus
Tablet type:'KEYBOARD', name:'MOSART Semi. 2.4G Keyboard Mouse', index:9
Tablet type:'MOUSE', name:'MOSART Semi. 2.4G Keyboard Mouse', index:10
Tablet type:'KEYBOARD', name:'Laptop_Integrated_Webcam_FHD: I', index:11
Tablet type:'KEYBOARD', name:'Dell WMI hotkeys', index:12
Tablet type:'KEYBOARD', name:'AT Translated Set 2 keyboard', index:13
Tablet type:'TOUCHPAD', name:'SynPS/2 Synaptics TouchPad', index:14
Tablet type:'KEYBOARD', name:'MOSART Semi. 2.4G Keyboard Mouse', index:15
Tablet type:'STYLUS', name:'10594 Pen Pen (0)', index:16
...

It appears that there is a TABLET device entry named "10594 Pen" and a STYLUS device entry named "10594 Pen Pen (0)", and the former gets detected as a stylus first, causing the latter to not be used as a stylus. I tried modifying the code in GHOST_SystemX11.cpp so that a TABLET device would not be considered a stylus. When I did this, the STYLUS device was detected as a stylus and pressure sensitivity worked. It looks like forcing GHOST_SystemX11::refreshXInputDevices to skip over the "10594 Pen" device fixes the issue for me. Unfortunately, disabling the "10594 Pen" device in xinput doesn't seem to work for me. Also, if I set my xorg configuration to ignore the device, it no longer shows up in xinput, but Blender still detects it, resulting in no pressure sensitivity.

The workaround I am using for now is to change line 2214 of GHOST_SystemX11.cpp from

(is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET)))

to

(is_stylus(device_info[i].name, device_type)))

I assume this workaround could cause trouble with some brands of tablets, but it seems to work well with the one I have. I would like to find a workaround that doesn't require modifying the Blender source, but @JesusBalbastro's solution above didn't work for me.

I would be happy to help debug the issue, as I have an affected tablet and some software development experience. However, I have very little experience with handling X input devices.

Update: I must have done something wrong when I tried blacklisting the "10594 Pen" device in my xorg configuration, because I just tried it again, and instead of working with no pressure sensitivity, the tablet didn't work at all. Maybe I disabled the wrong device the first time I tried it.

I think I am having the same issue. I have a Monoprice tablet (product ID 10594), which I *think* is just a Huion H610 with different branding. (It has the same specs, same appearance, and works with the Huion driver on Windows.) Pressure sensitivity doesn't work in Blender 2.79 on either Ubuntu 17.04 or 17.10, but works in Krita. I also tried a Blender 2.80 build (blender-2.80-83de7c4094b-linux-glibc219-x86_64) and got the same problem. Pressure sensitivity works correctly for me in Blender 2.79 on Windows 10. As in @JesusBalbastro's situation, the problem seems to be related to the fact that the tablet creates multiple xinput entries. I tried uncommenting some printfs in GHOST_SystemX11.cpp and got these results when running Blender 2.79 on the command line. ``` ... Tablet type:'(null)', name:'Virtual core pointer', index:0 Tablet type:'(null)', name:'Virtual core keyboard', index:1 Tablet type:'(null)', name:'Virtual core XTEST pointer', index:2 Tablet type:'(null)', name:'Virtual core XTEST keyboard', index:3 Tablet type:'KEYBOARD', name:'Power Button', index:4 Tablet type:'KEYBOARD', name:'Video Bus', index:5 Tablet type:'KEYBOARD', name:'Power Button', index:6 Tablet type:'PAD', name:'10594 Pad', index:7 Tablet type:'TABLET', name:'10594 Pen', index:8 found stylus Tablet type:'KEYBOARD', name:'MOSART Semi. 2.4G Keyboard Mouse', index:9 Tablet type:'MOUSE', name:'MOSART Semi. 2.4G Keyboard Mouse', index:10 Tablet type:'KEYBOARD', name:'Laptop_Integrated_Webcam_FHD: I', index:11 Tablet type:'KEYBOARD', name:'Dell WMI hotkeys', index:12 Tablet type:'KEYBOARD', name:'AT Translated Set 2 keyboard', index:13 Tablet type:'TOUCHPAD', name:'SynPS/2 Synaptics TouchPad', index:14 Tablet type:'KEYBOARD', name:'MOSART Semi. 2.4G Keyboard Mouse', index:15 Tablet type:'STYLUS', name:'10594 Pen Pen (0)', index:16 ... ``` It appears that there is a TABLET device entry named "10594 Pen" and a STYLUS device entry named "10594 Pen Pen (0)", and the former gets detected as a stylus first, causing the latter to not be used as a stylus. I tried modifying the code in GHOST_SystemX11.cpp so that a TABLET device would not be considered a stylus. When I did this, the STYLUS device was detected as a stylus and pressure sensitivity worked. It looks like forcing GHOST_SystemX11::refreshXInputDevices to skip over the "10594 Pen" device fixes the issue for me. Unfortunately, disabling the "10594 Pen" device in xinput doesn't seem to work for me. Also, if I set my xorg configuration to ignore the device, it no longer shows up in xinput, but Blender still detects it, resulting in no pressure sensitivity. The workaround I am using for now is to change line 2214 of GHOST_SystemX11.cpp from ``` (is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET))) ``` to ``` (is_stylus(device_info[i].name, device_type))) ``` I assume this workaround could cause trouble with some brands of tablets, but it seems to work well with the one I have. I would like to find a workaround that doesn't require modifying the Blender source, but @JesusBalbastro's solution above didn't work for me. I would be happy to help debug the issue, as I have an affected tablet and some software development experience. However, I have very little experience with handling X input devices. Update: I must have done something wrong when I tried blacklisting the "10594 Pen" device in my xorg configuration, because I just tried it again, and instead of working with no pressure sensitivity, the tablet didn't work at all. Maybe I disabled the wrong device the first time I tried it.

I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did.
What works for me is to disconnect the tablet, run blender and disable and enable the device.

I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did. What works for me is to disconnect the tablet, run blender and disable and enable the device.

@JesusBalbastro That seems to work for me. Thanks for the workaround!

@JesusBalbastro That seems to work for me. Thanks for the workaround!

Added subscriber: @Lucidreason

Added subscriber: @Lucidreason

In #50961#469988, @JesusBalbastro wrote:
I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did.
What works for me is to disconnect the tablet, run blender and disable and enable the device.

Thank you, it works for me either.

> In #50961#469988, @JesusBalbastro wrote: > I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did. > What works for me is to disconnect the tablet, run blender and disable and enable the device. Thank you, it works for me either.

Added subscriber: @sypher7

Added subscriber: @sypher7

Had this same issue with my Huion GT-220v2 on Ubuntu 17.10.

The workaround provided by @JesusBalbastro works for me as well.

Had this same issue with my Huion GT-220v2 on Ubuntu 17.10. The workaround provided by @JesusBalbastro works for me as well.

Added subscriber: @indefini

Added subscriber: @indefini

Added subscriber: @underpants-enthusiast

Added subscriber: @underpants-enthusiast

Added subscriber: @MikhailGavrilec

Added subscriber: @MikhailGavrilec

In #50961#469988, @JesusBalbastro wrote:
I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did.
What works for me is to disconnect the tablet, run blender and disable and enable the device.

I have HUION Q11K. and this workaround didn't help me to solve the problem

> In #50961#469988, @JesusBalbastro wrote: > I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did. > What works for me is to disconnect the tablet, run blender and disable and enable the device. I have HUION Q11K. and this workaround didn't help me to solve the problem

Added subscriber: @iszotic

Added subscriber: @iszotic

In #50961#469988, @JesusBalbastro wrote:
I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did.
What works for me is to disconnect the tablet, run blender and disable and enable the device.

Huion H58L and also worked for me... Blender 2.79.b+dfsg0-1, and Blender 2.8 9b817bc168 after the grease pencil merge

> In #50961#469988, @JesusBalbastro wrote: > I don't know why I didn't mention I enabled the device again. Somehow I didn't notice I did. > What works for me is to disconnect the tablet, run blender and disable and enable the device. Huion H58L and also worked for me... Blender 2.79.b+dfsg0-1, and Blender 2.8 9b817bc1689 after the grease pencil merge

Everyone commenting on this - please note that ticket is closed for some reason.
@ideasman42 - is there any way that you could reopen or does it perhaps need merging with unassigned issue #52929?
I have an UGEE M708 which, according to xinput, is a rebranded UC-LO(G)IC TABLET 1060 (which, again are rebranded HUION or vice-versa) and run Manjaro (Arch).
I tried the disconnect/reconnect/xinput disable/enable workaround with 2.79 release, master, and blender2.8 on kernels 4.17, 4.14 and 3.18 using both the built-in and digimend drivers with no luck. I had working tablet pressure in both Krita or MyPaint.
@allen-marshall's workaround of removing the || (device_info- [x].type == m_atom.TABLET) check in GHOST_SystemX11.cpp works for me on master and blender2.8 - thanks for this.
I've attached the output of xinput list --long and xinput test for device id 17 in case it's of any use in getting to the root of the problem.
Thanks all
xinput-list-long.txt xinput-test-uc-loic-tablet-1060-pen-pen-0.txt

Everyone commenting on this - please note that ticket is closed for some reason. @ideasman42 - is there any way that you could reopen or does it perhaps need merging with unassigned issue #52929? I have an UGEE M708 which, according to xinput, is a rebranded UC-LO(G)IC TABLET 1060 (which, again are rebranded HUION or vice-versa) and run Manjaro (Arch). I tried the disconnect/reconnect/xinput disable/enable workaround with 2.79 release, master, and blender2.8 on kernels 4.17, 4.14 and 3.18 using both the built-in and digimend drivers with no luck. I had working tablet pressure in both Krita or MyPaint. @allen-marshall's workaround of removing the ` || (device_info- [x].type == m_atom.TABLET)` check in GHOST_SystemX11.cpp works for me on master and blender2.8 - thanks for this. I've attached the output of `xinput list --long` and `xinput test` for device id 17 in case it's of any use in getting to the root of the problem. Thanks all [xinput-list-long.txt](https://archive.blender.org/developer/F4204565/xinput-list-long.txt) [xinput-test-uc-loic-tablet-1060-pen-pen-0.txt](https://archive.blender.org/developer/F4204568/xinput-test-uc-loic-tablet-1060-pen-pen-0.txt)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
15 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#50961
No description provided.