No working tablet pressure for Yiynova 22HD+ pen tablet in sculpt mode or grease pencil #52929

Closed
opened 2017-09-28 07:32:43 +02:00 by Bryce Henley · 22 comments

**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.

**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.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bryfe

Added subscriber: @bryfe

#53394 was marked as duplicate of this issue

#53394 was marked as duplicate of this issue
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

I'd probably start by poking around in GHOST_SystemX11::processEvent in blender\intern\ghost\intern\GHOST_SystemX11.cpp

I'd probably start by poking around in GHOST_SystemX11::processEvent in blender\intern\ghost\intern\GHOST_SystemX11.cpp
Author

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

  ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
  ↳ Power Button                              id=6    [slave  keyboard (3)]
  ↳ Power Button                              id=7    [slave  keyboard (3)]
  ↳ UC-LOGIC 21.5" Tablet Monitor Pen         id=8    [slave  keyboard (3)]
  ↳ UC-LOGIC 21.5" Tablet Monitor Keyboard    id=10   [slave  keyboard (3)]
  ↳ UC-LOGIC 21.5" Tablet Monitor System Control      id=12   [slave  keyboard (3)]
  ↳ Razer Razer BlackWidow Ultimate           id=13   [slave  keyboard (3)]
  ↳ HD Pro Webcam C920                        id=17   [slave  keyboard (3)]
  ↳ HID 0a5c:4502                             id=18   [slave  keyboard (3)]
  ↳ UC-LOGIC 21.5" Tablet Monitor Consumer Control    id=20   [slave  keyboard (3)]
  ↳ Razer Razer BlackWidow Ultimate           id=21   [slave  keyboard (3)]

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.

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)] ``` ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ UC-LOGIC 21.5" Tablet Monitor Pen id=8 [slave keyboard (3)] ↳ UC-LOGIC 21.5" Tablet Monitor Keyboard id=10 [slave keyboard (3)] ↳ UC-LOGIC 21.5" Tablet Monitor System Control id=12 [slave keyboard (3)] ↳ Razer Razer BlackWidow Ultimate id=13 [slave keyboard (3)] ↳ HD Pro Webcam C920 id=17 [slave keyboard (3)] ↳ HID 0a5c:4502 id=18 [slave keyboard (3)] ↳ UC-LOGIC 21.5" Tablet Monitor Consumer Control id=20 [slave keyboard (3)] ↳ Razer Razer BlackWidow Ultimate id=21 [slave keyboard (3)] ``` 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.
Author

The tablet worked in Windows with the propretary driver, proably due to wintab. So this is a Linux only bug.

The tablet worked in Windows with the propretary driver, proably due to wintab. So this is a Linux only bug.

Added subscriber: @wefhy

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:

$ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=16	[slave  pointer  (2)]
⎜   ↳ UC-LOIC TABLET 1060 Consumer Control    	id=10	[slave  pointer  (2)]
⎜   ↳ UC-LOIC TABLET 1060 Mouse               	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Lenovo EasyCamera: Lenovo EasyC         	id=13	[slave  keyboard (3)]
    ↳ Ideapad extra buttons                   	id=14	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=15	[slave  keyboard (3)]
    ↳ UC-LOIC TABLET 1060 Keyboard            	id=8	[slave  keyboard (3)]
    ↳ UC-LOIC TABLET 1060 System Control      	id=9	[slave  keyboard (3)]
    ↳ UC-LOIC TABLET 1060 Consumer Control    	id=11	[slave  keyboard (3)]
    ↳ UC-LOIC TABLET 1060 Pen                 	id=17	[slave  keyboard (3)]

(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 have similar problem with tablet (Ugee M708/parblo a610, also with UC-LOGIC digitizer), it may be somehow connected with yours. my xinput: ``` $ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=16 [slave pointer (2)] ⎜ ↳ UC-LOIC TABLET 1060 Consumer Control id=10 [slave pointer (2)] ⎜ ↳ UC-LOIC TABLET 1060 Mouse id=12 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Lenovo EasyCamera: Lenovo EasyC id=13 [slave keyboard (3)] ↳ Ideapad extra buttons id=14 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)] ↳ UC-LOIC TABLET 1060 Keyboard id=8 [slave keyboard (3)] ↳ UC-LOIC TABLET 1060 System Control id=9 [slave keyboard (3)] ↳ UC-LOIC TABLET 1060 Consumer Control id=11 [slave keyboard (3)] ↳ UC-LOIC TABLET 1060 Pen id=17 [slave keyboard (3)] ``` (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...
Author

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.

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.
Author

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.

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 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...
Author

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.

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)

77c77
< 
---
> #include <cstring>

2122,2128c2122,2143
< 	static const char *tablet_stylus_whitelist[] = {
< 		"stylus",
< 		"wizardpen",
< 		"acecad",
< 		NULL
< 	};
< 
---
> //	static const char *tablet_stylus_whitelist[] = {
> //		"stylus",
> //		"wizardpen",
> //		"acecad",
> //		"TABLET",
> //		"Consumer Control",
> //		NULL
> //	};
>     static bool initialized = false;
>     static char *tablet_stylus_whitelist[] = {NULL, NULL, NULL};
>     if (!initialized) {
>         FILE * myfile = fopen("/home/wefhy/Sync/tablets", "r");
>         if(!myfile) printf("Error opening tablets file!\n");
>         size_t linesize[] = {0, 0};
>         getline(&tablet_stylus_whitelist[0], &linesize[0], myfile);
>         tablet_stylus_whitelist[0][strlen(tablet_stylus_whitelist[0])/*linesize[0]*/-1] = '\0';
>         getline(&tablet_stylus_whitelist[1], &linesize[1], myfile);
>         tablet_stylus_whitelist[1][strlen(tablet_stylus_whitelist[1])/*linesize[1]*/-1] = '\0';
>         initialized = true;
>         printf("File read successfully\n\t1st element(%zu): %s\n\t2nd element(%zu): %s\n", linesize[0], tablet_stylus_whitelist[0],linesize[1], tablet_stylus_whitelist[1]);
>     }
> 	printf("Checking stylus: %s, %s :", name, type);

2130c2145,2146
< 		if (name && match_token(name, tablet_stylus_whitelist[i]))
---
> 		if (name && match_token(name, tablet_stylus_whitelist[i])){
> 			printf("accepted===================================\n");

2132c2148,2150
< 		if (type && match_token(type, tablet_stylus_whitelist[i]))
---
> 		}
> 		if (type && match_token(type, tablet_stylus_whitelist[i])){
> 			printf("accepted===================================\n");

2133a2152
> 		}

2135c2154
< 
---
>     printf("rejected\n");

2177d2195
< //				printf("Tablet type:'%s', name:'%s', index:%d\n", device_type, device_info[i].name, i);
2183a2202
> 					printf("Tablet type:'%s', name:'%s', index:%d\n", device_type, device_info[i].name, i);

2194a2214
> 								printf("\tmax pressure level: %d\n", xvi->axes[2].max_value);

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:

File read successfully
	1st element(120): Pen
	2nd element(120): wizardpen
Checking stylus: Virtual core pointer, (null) :rejected
Checking stylus: Virtual core keyboard, (null) :rejected
Checking stylus: Virtual core XTEST pointer, (null) :rejected
Checking stylus: Virtual core XTEST keyboard, (null) :rejected
Checking stylus: Power Button, KEYBOARD :rejected
Checking stylus: Video Bus, KEYBOARD :rejected
Checking stylus: Lenovo EasyCamera: Lenovo EasyC, KEYBOARD :rejected
Checking stylus: Ideapad extra buttons, KEYBOARD :rejected
Checking stylus: AT Translated Set 2 keyboard, KEYBOARD :rejected
Checking stylus: SynPS/2 Synaptics TouchPad, TOUCHPAD :rejected
Checking stylus: UC-LOIC TABLET 1060 Consumer Control, MOUSE :rejected
Checking stylus: UC-LOIC TABLET 1060 Consumer Control, KEYBOARD :rejected
Checking stylus: UC-LOIC TABLET 1060 System Control, KEYBOARD :rejected
Checking stylus: UC-LOIC TABLET 1060 Keyboard, KEYBOARD :rejected
Checking stylus: UC-LOIC TABLET 1060 Mouse, MOUSE :rejected
Checking stylus: UC-LOIC TABLET 1060 Pen, TABLET :accepted===================================
Tablet type:'TABLET', name:'UC-LOIC TABLET 1060 Pen', index:15

using other devices I usually also does not get pressure level or it is -1

Ok, I've done something (but still I know almost nothing about what's wrong) ``` 77c77 < --- > #include <cstring> 2122,2128c2122,2143 < static const char *tablet_stylus_whitelist[] = { < "stylus", < "wizardpen", < "acecad", < NULL < }; < --- > // static const char *tablet_stylus_whitelist[] = { > // "stylus", > // "wizardpen", > // "acecad", > // "TABLET", > // "Consumer Control", > // NULL > // }; > static bool initialized = false; > static char *tablet_stylus_whitelist[] = {NULL, NULL, NULL}; > if (!initialized) { > FILE * myfile = fopen("/home/wefhy/Sync/tablets", "r"); > if(!myfile) printf("Error opening tablets file!\n"); > size_t linesize[] = {0, 0}; > getline(&tablet_stylus_whitelist[0], &linesize[0], myfile); > tablet_stylus_whitelist[0][strlen(tablet_stylus_whitelist[0])/*linesize[0]*/-1] = '\0'; > getline(&tablet_stylus_whitelist[1], &linesize[1], myfile); > tablet_stylus_whitelist[1][strlen(tablet_stylus_whitelist[1])/*linesize[1]*/-1] = '\0'; > initialized = true; > printf("File read successfully\n\t1st element(%zu): %s\n\t2nd element(%zu): %s\n", linesize[0], tablet_stylus_whitelist[0],linesize[1], tablet_stylus_whitelist[1]); > } > printf("Checking stylus: %s, %s :", name, type); 2130c2145,2146 < if (name && match_token(name, tablet_stylus_whitelist[i])) --- > if (name && match_token(name, tablet_stylus_whitelist[i])){ > printf("accepted===================================\n"); 2132c2148,2150 < if (type && match_token(type, tablet_stylus_whitelist[i])) --- > } > if (type && match_token(type, tablet_stylus_whitelist[i])){ > printf("accepted===================================\n"); 2133a2152 > } 2135c2154 < --- > printf("rejected\n"); 2177d2195 < // printf("Tablet type:'%s', name:'%s', index:%d\n", device_type, device_info[i].name, i); 2183a2202 > printf("Tablet type:'%s', name:'%s', index:%d\n", device_type, device_info[i].name, i); 2194a2214 > printf("\tmax pressure level: %d\n", xvi->axes[2].max_value); ``` 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: ``` File read successfully 1st element(120): Pen 2nd element(120): wizardpen Checking stylus: Virtual core pointer, (null) :rejected Checking stylus: Virtual core keyboard, (null) :rejected Checking stylus: Virtual core XTEST pointer, (null) :rejected Checking stylus: Virtual core XTEST keyboard, (null) :rejected Checking stylus: Power Button, KEYBOARD :rejected Checking stylus: Video Bus, KEYBOARD :rejected Checking stylus: Lenovo EasyCamera: Lenovo EasyC, KEYBOARD :rejected Checking stylus: Ideapad extra buttons, KEYBOARD :rejected Checking stylus: AT Translated Set 2 keyboard, KEYBOARD :rejected Checking stylus: SynPS/2 Synaptics TouchPad, TOUCHPAD :rejected Checking stylus: UC-LOIC TABLET 1060 Consumer Control, MOUSE :rejected Checking stylus: UC-LOIC TABLET 1060 Consumer Control, KEYBOARD :rejected Checking stylus: UC-LOIC TABLET 1060 System Control, KEYBOARD :rejected Checking stylus: UC-LOIC TABLET 1060 Keyboard, KEYBOARD :rejected Checking stylus: UC-LOIC TABLET 1060 Mouse, MOUSE :rejected Checking stylus: UC-LOIC TABLET 1060 Pen, TABLET :accepted=================================== Tablet type:'TABLET', name:'UC-LOIC TABLET 1060 Pen', index:15 ``` 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 in GHOST_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

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 in `GHOST_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
Member

Added subscriber: @Lucidreason

Added subscriber: @Lucidreason

Added subscriber: @indefini

Added subscriber: @indefini

Added subscriber: @underpants-enthusiast

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.

UC-LOIC TABLET 1060 Pad                         id=16   [slave  pointer  (2)]
        Reporting 8 classes:
...
                Class originated from: 16. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Abs Pressure
                  Range: 0.000000 - 16777215.000000
                  Resolution: 0 units/m
                  Mode: absolute
                  Current value: 0.000000
...
C-LOIC TABLET 1060 Pen Pen (0)                 id=17   [slave  pointer  (2)]
        Reporting 4 classes:
...
                Class originated from: 17. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Abs Pressure
                  Range: 0.000000 - 2047.000000
                  Resolution: 0 units/m
                  Mode: absolute
                  Current value: 0.000000

You can work around this issue by changing the following in GHOST_SystemX11.cpp:

				if ((m_xtablet.StylusDevice == NULL) &&
				    (is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET)))

to

				if ((m_xtablet.StylusDevice == NULL) &&
				    (is_stylus(device_info[i].name, device_type))) // || (device_info[i].type == m_atom.TABLET)))

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

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. ``` UC-LOIC TABLET 1060 Pad id=16 [slave pointer (2)] Reporting 8 classes: ... Class originated from: 16. Type: XIValuatorClass Detail for Valuator 2: Label: Abs Pressure Range: 0.000000 - 16777215.000000 Resolution: 0 units/m Mode: absolute Current value: 0.000000 ... C-LOIC TABLET 1060 Pen Pen (0) id=17 [slave pointer (2)] Reporting 4 classes: ... Class originated from: 17. Type: XIValuatorClass Detail for Valuator 2: Label: Abs Pressure Range: 0.000000 - 2047.000000 Resolution: 0 units/m Mode: absolute Current value: 0.000000 ``` You can work around this issue by changing the following in GHOST_SystemX11.cpp: ``` if ((m_xtablet.StylusDevice == NULL) && (is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET))) ``` to ``` if ((m_xtablet.StylusDevice == NULL) && (is_stylus(device_info[i].name, device_type))) // || (device_info[i].type == m_atom.TABLET))) ``` 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

Added subscriber: @brecht

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Brecht Van Lommel self-assigned this 2018-12-13 20:08:01 +01:00

I believe this is solved by c9344d6, if not let me know.

I believe this is solved by c9344d6, if not let me know.
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
7 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#52929
No description provided.