No working tablet pressure for Yiynova 22HD+ pen tablet in sculpt mode or grease pencil #52929
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#52929
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
**System Information:
Arch Linux 64bit kernel 4.12.13-1-ARCH
Nvidia GTX 480 and 960
Tablet: Yiynova 22HD+ driver DIGImend (tested with release 6, and current dev branch)
**Blender Version:
Blender versions 7.79, 7.73a, and 7.8(grease pencil object git branch)
**Short description of error:
No working tablet pressure for Yiynova 22HD+ pen tablet in sculpt mode or grease pencil in multiple versions of Blender. The pen pressure is always at max. The tablet and driver works perfectly in Krita, Gimp, and Substance Painter. I tested and reproduced this on two machines, a desktop and a laptop, both running Arch linux with the same driver and software versions. My Wacom bamboo tablet had working pressure in both modes in all versions. I think I had this Yiynova tablet working at some point in Blender in Linux, and the driver reports working in versions of Blender 7.66 and up. So I belive this must be a bug within Blender.
I'm a software developer that is willing to help fix this bug, I just dont know where to start looking or how I can debug pressure sensitivity inside Blender. Any advice on this would be greatly appreciated.
Other note: I have a Windows10 vm with gpu passthrough running on this machine so I will soon test the proprietary Yiynova driver on Windows with Blender.
Changed status to: 'Open'
Added subscriber: @bryfe
#53394 was marked as duplicate of this issue
Added subscriber: @LazyDodo
I'd probably start by poking around in GHOST_SystemX11::processEvent in blender\intern\ghost\intern\GHOST_SystemX11.cpp
After doing some debuging, I have found that ghost is definatly not identifing my tablet as a tablet input. It must be defaulting as mouse input.
This tablet is a rebranded UC-LOGIC digitzier. Is blender having trouble detecting these?
For more info this, here is the print output of all xinput devices on my system:
$xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ UC-LOGIC 21.5" Tablet Monitor Mouse id=9 [slave pointer (2)]
⎜ ↳ UC-LOGIC 21.5" Tablet Monitor Consumer Control id=11 [slave pointer (2)]
⎜ ↳ Razer Razer BlackWidow Ultimate id=14 [slave pointer (2)]
⎜ ↳ Razer Razer BlackWidow Ultimate id=15 [slave pointer (2)]
⎜ ↳ USB OPTICAL MOUSE id=16 [slave pointer (2)]
⎜ ↳ HID 0a5c:4503 id=19 [slave pointer (2)]
⎜ ↳ UC-LOGIC 21.5" Tablet Monitor Pen Pen (0) id=22 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
The tablet pen is listed as " UC-LOGIC 21.5" Tablet Monitor Pen Pen (0) " under x core pointer
I'm currenly looking into how Krita handels picking up this tablet.
The tablet worked in Windows with the propretary driver, proably due to wintab. So this is a Linux only bug.
Added subscriber: @wefhy
I have similar problem with tablet (Ugee M708/parblo a610, also with UC-LOGIC digitizer), it may be somehow connected with yours.
my xinput:
(yes, it shows UC-LOIC, not UC-LOGIC, on two machines the same)
I use Arch (4.13.2) and it works perfectly in other software like krita. Suprisingly, it also works perfectly in windows version of blender ran under wine.
I found similar, older problem, but also unsolved: https://developer.blender.org/T50961
Maybe I'll try dig into these files for myself when I have some time.
I'm also a programmer, so if you come accross any idea, please, share it. For a long time I sculpt in wine and render natively, but it's slowly getting me down...
I placed debug statments every where in Blender GHOST_SystemX11.cpp and tried to trace it. I first noticed the tablet is not detecting a tablet and ID and there is no pressure readings (what a surprise...). After editing *tablet_stylus_whitelist- [ ] to include "Pen" it showed returning true many times leading me to beilve it may also be seeing the keyboard input for the pen by token since both have pen in the name. So then I tried changing the name of the Pen pointer to "Stylus" in the digimend driver. So the xinput showed up as "...Tablet Stylus Pen". Then changed the pen token search to "Pen" in blender GHOST to differentiate between the pointer and the keyboard input. The pointer input for the stylus itself failed to return true, where as the keyboard input "Stylus" part did return true(many times) but failed to initalize the tablet or pressure readings. I also tried puting "mouse" in as a token just to see what would happen and it returned true for just the eraser, I don't have an eraser so thats weird... I also tried repluging in the tablet while blender was still running, a few times this just seg falted blender.
I'm kinda running out of Ideas at this point. I may try renaming the tablet as "wacom" in the driver source just to see what happens but I really don't think that will fix it.
Also here is my tablet output for $lsusb
Bus 005 Device 019: ID 5543:004d UC-Logic Technology Corp.
This may be a bug with all UC-LOGIC tablets in blender on Linux.
So I tried the same yesterday, changed the whitelist and recompiled. Only thing changed was printing all the devices.
my lsusb is
Bus 001 Device 005: ID 5543:0081 UC-Logic Technology Corp.
And a difference - I don't use digimend since there is built-in support for my tablet(I don't know if it is in kernel, X or anything else, but it works). I used digimend around linux 4.8 or earlier and it worked with blender perfectly(It may be also the fact that I switched from Mint to Arch). Since 4.8 the tablet works without installing anything and only thing digimend does is breaking pressure in all programs.
Another thing is, since I don't use digimend, my tablet is not listed by xsetwacom(it was when I was using digimend). Nevertheless, it still works even on blender under wine, krita and many other programs.
I think, we may recompile it under wine and check also how does it support the tablet there(unfortunately I have never compilled windows programs from source).
PS another thing I observed, I can't configure it in gimp.(krita, substance painter, wine version of blender still works) It would be much easier if we could change used device from list while blender is running... but I'm not gonna looking through all the code to find a way to do this.
I think, I'll make it reading whitelist from the file and just hope to find something working...
So we have the same issue even without running the same driver. I wanted to try and hard code the tablet in to see if that works but I'm still figuring out how to implement that. Later it would be nice to make a menu in input device preferences that allows specifing a tablet.
Ok, I've done something (but still I know almost nothing about what's wrong)
it's diff file to apply on GHOST_SystemX11.cpp
it allows me to read first two lines of
/home/wefhy/Sync/tablets
as array and use it instead of original one(each first run of blender) so I don't need to recompile every time I change it.I set it to match only one of the devices(and it works)
It also prints all the detected devices and their properties. It should also print detected max pressure level, but it doesn't so I think one of checks fails.
it gives mi for example(depending on array file) output like this:
using other devices I usually also does not get pressure level or it is -1
Hmm, interesting, after some debugging I found some more things:
if every device is rejected(ie. default config), still my tablet is selected due to
(device_info- [x].type == m_atom.TABLET)
So the problem isn't the
is_stylus()
function, it lays somewhere inGHOST_SystemX11::refreshXInputDevices()
, after tablet passes the test.it even passes
if (m_xtablet.StylusDevice != NULL)
and is iterating through
for (int j = 0; j < m_xtablet.StylusDevice->num_classes; ++j)
but never goes into
if (ici->c_class == ValuatorClass)
unfortunately I don't understand what this line deos
Added subscriber: @Lucidreason
Added subscriber: @indefini
Added subscriber: @underpants-enthusiast
Hi @wefhy
I think I can shed some light on this issue if you're still seeing it:
GHOST_SystemX11::refreshXinputDevices() appears to set m_xtablet.StlusDevice to the first xinput device where either is_stylus returns True or the device's type is m_atom.TABLET.
The problem is that some tablets show two devices of type m_atom.TABLET, one named "* Pad" and another named "* Pen". Both devices report a ValuatorClass of ID 2 - pressure - although only the "* Pen" device really supports it.
Here's an example from input list --long [device-id]. You can see that the "* Pad" device reports 16 million levels of pressure sensitivity which is not true.
You can work around this issue by changing the following in GHOST_SystemX11.cpp:
to
This just ignores the reported device type and uses the is_stylus function to determine which is the stylus device by name matching. Obviously this will cause problems for tablets which report correct data to xinput so this is only really valid as a workaround. Some people in #50961 have had success by with just disabling the errant xinput device but this didn't work for me.
The kernel drivers come from Digimend, so we should test the latest kernels and/or the digmend-kernel-drivers package and take it up with them if that doesn't fix it.
Here's some links:
Website: https://digimend.github.io/
Github: https://github.com/DIGImend/digimend-kernel-drivers/
IRC: https://webchat.freenode.net/?channels=DIGImend
Related ticket with some more info: #50961
Added subscriber: @brecht
Changed status from 'Open' to: 'Resolved'
I believe this is solved by
c9344d6
, if not let me know.