Sunday, September 19, 2021

Cent OS Wacom device support


 I have bought the "Wacom One by CTL-472/K0-CX Small 6-inch x 3.5-inch Graphic Tablet (Red/Black)" and bit nervous whether it works in Cent OS with my Kernel version 4.19.99.

My thought is to try and return if it does not work.

Surprisingly, OS recognizes just like that and worked fine and mouse movements are recognized well.

But observed one problem !!

Pressure Sensitivity not recognized...

How the debugging went !! 

After doing some debugging it is not that Device is not working, it is just that applications are not inline with driver upgrade to support 65535(2^16) levels of sensitivity.

Earlier days, wacom devices give pressure values in the range of 0-2048. i.e 2048 is highest pressure and ZERO is the lowest pressure.

From version X11 Wacom driver (0.34.2) onwards the pressure numbers are range from 0-65535. Which mean highest pressure is 65535. 

How it is the problem?

 Now with small pressure on the surface creates a pressure number of around 5000. This is something being treated as highest pressure by applications and they always show line darkness which is highest possible. 

 This looks like sensitivity not working but actually it is just mapping of values for min and max. 

What is the Fix?

 Fix is simple, just create a new file named /etc/X11/xorg.conf.d/99-wacom.conf and have content as below

Section "InputClass"

    Identifier "Wacom pressure compatibility"

    MatchDriver "wacom"

    Option "Pressure2K" "true"

EndSection


What is this fix doing?

  It tries to tell driver that do not generate pressure numbers between 0-65535 instead generate in the range of 0-2047.