You are not logged in.

#1 2013-11-15 19:41:50

ramboman
Member
Registered: 2010-01-23
Posts: 34

[SOLVED] Configuring a non-wacom graphics tablet

Currently my tablet is in absolute mode. In this mode, when the screen does not have the same proportions as the tablet, for example, drawing a cercle may result into an oval.
I am trying to configure my tablet so it acts like a touchpad or a mouse (relative mode).

$ lsusb
...
Bus 008 Device 002: ID 5543:0005 UC-Logic Technology Corp. Tablet WP8060U
...

The tablet is natively supported, but I haven't found a way to change its mode to relative. I also tried by installing wizardpen and modifying /etc/X11/xorg.conf.d/70-wizardpen.conf but without success:

70-wizardpen.conf

# <Added>
Section "InputDevice"    
   Identifier  "stylus"
   Driver      "wizardpen"
   Option      "Type" "stylus"
   Option      "USB" "on"
   Option      "Button1" "1"
   Option      "Button2" "1"
   Option      "Name" "UC-LOGIC Tablet WP8060U"
   Option      "Device"      "/dev/input/by-id/usb-UC-LOGIC_Tablet_WP8060U-event-mouse"
   Option      "TopX" "0"
   Option      "TopY" "1553"
   Option      "BottomX" "32541"
   Option      "BottomY" "32762"
   Option      "MaxX" "32541"
   Option      "MaxY" "32762"
   Option      "Mode" "Relative" 
EndSection

Section "InputDevice"    
   Identifier  "stylus"
   Driver      "wizardpen"
   Option      "Type" "stylus"
   Option      "USB" "on"
   Option      "Button1" "1"
   Option      "Button2" "1"
   Option      "Name" "UC-LOGIC Tablet WP8060U"
   Option      "Device"      "/dev/input/by-id/usb-UC-LOGIC_Tablet_WP8060U-mouse"
   Option      "TopX" "0"
   Option      "TopY" "1553"
   Option      "BottomX" "32541"
   Option      "BottomY" "32762"
   Option      "MaxX" "32541"
   Option      "MaxY" "32762"
   Option      "Mode" "Relative" 
EndSection

# </Added>

Section "InputClass"
   Identifier "wizardpen"
   MatchIsTablet "on"
   MatchDevicePath "/dev/input/event*"
   MatchTag "wizardpen"
   Driver "wizardpen"
   Option		"TopX"		"1506"
   Option		"TopY"		"2705"
   Option		"BottomX"	"31225"
   Option		"BottomY"	"30892"
   Option		"Mode"		"Relative"   # Added
EndSection

What should I do to make the tablet behave in relative mode?

Last edited by ramboman (2013-11-18 20:02:47)

Offline

#2 2013-11-17 05:37:04

ramboman
Member
Registered: 2010-01-23
Posts: 34

Re: [SOLVED] Configuring a non-wacom graphics tablet

I decided to start over. I removed wizardpen and tried with the already installed evdev.

Now I have half of the solution:

1) Get a list of input devices

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)	id=10	[slave  pointer  (2)]
⎜   ↳ UC-LOGIC Tablet WP8060U                 	id=11	[slave  pointer  (2)]
⎜   ↳ UC-LOGIC Tablet WP8060U                 	id=12	[slave  pointer  (2)]
⎜   ↳ PS/2 Mouse                              	id=15	[slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                	id=16	[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)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ Lenovo EasyCamera                       	id=13	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=14	[slave  keyboard (3)]
    ↳ Ideapad extra buttons                   	id=17	[slave  keyboard (3)]

2) Get a more detailed list about each "UC-LOGIC Tablet WP8060U" (id 11 and 12):

$ xinput list --long 11
UC-LOGIC Tablet WP8060U                 	id=11	[slave  pointer  (2)]
	Reporting 4 classes:
		Class originated from: 11. Type: XIButtonClass
		Buttons supported: 7
		Button labels: "Button Unknown" "Button Unknown" "Button Unknown" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
		Button state:
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Abs X
		  Range: 0.000000 - 32767.000000
		  Resolution: 0 units/m
		  Mode: absolute
		  Current value: 683.000000
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Abs Y
		  Range: 0.000000 - 32767.000000
		  Resolution: 0 units/m
		  Mode: absolute
		  Current value: 384.000000
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Abs Pressure
		  Range: 0.000000 - 1023.000000
		  Resolution: 0 units/m
		  Mode: absolute
		  Current value: 0.000000

$ xinput list --long 12                       
UC-LOGIC Tablet WP8060U                 	id=12	[slave  pointer  (2)]
	Reporting 5 classes:
		Class originated from: 12. Type: XIButtonClass
		Buttons supported: 7
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
		Button state:
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 12. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 12. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 1 (vertical)
		  increment: -1.000000
		  flags: 0x2 ( preferred )

It is written "Mode: absolute" at some place in the device with id=11, so I will change its mode to relative:

$ xinput --set-mode 11 RELATIVE
$ xinput list --long 11
UC-LOGIC Tablet WP8060U                 	id=11	[slave  pointer  (2)]
	Reporting 4 classes:
		Class originated from: 11. Type: XIButtonClass
		Buttons supported: 7
		Button labels: "Button Unknown" "Button Unknown" "Button Unknown" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
		Button state:
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Abs X
		  Range: 0.000000 - 32767.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Abs Y
		  Range: 0.000000 - 32767.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 11. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Abs Pressure
		  Range: 0.000000 - 1023.000000
		  Resolution: 0 units/m
		  Mode: relative

It is now in relative mode, but the displacement of the cursor is to big compared to each movement on the tablet. So I am going to take a look at the props of this device:

$ xinput list-props 11
Device 'UC-LOGIC Tablet WP8060U':          
	Device Enabled (132):	1
	Coordinate Transformation Matrix (134):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (255):	0
	Device Accel Constant Deceleration (256):	1.000000
	Device Accel Adaptive Deceleration (257):	1.000000
	Device Accel Velocity Scaling (258):	10.000000
	Device Product ID (250):	21827, 5
	Device Node (251):	"/dev/input/event14"
	Evdev Axis Inversion (259):	0, 0
	Evdev Axis Calibration (260):	<no items>
	Evdev Axes Swap (261):	0
	Axis Labels (262):	"Abs X" (276), "Abs Y" (277), "Abs Pressure" (278)
	Button Labels (263):	"Button Unknown" (253), "Button Unknown" (253), "Button Unknown" (253), "Button Wheel Up" (138), "Button Wheel Down" (139), "Button Horiz Wheel Left" (140), "Button Horiz Wheel Right" (141)
	Evdev Middle Button Emulation (264):	0
	Evdev Middle Button Timeout (265):	50
	Evdev Third Button Emulation (266):	0
	Evdev Third Button Emulation Timeout (267):	1000
	Evdev Third Button Emulation Button (268):	3
	Evdev Third Button Emulation Threshold (269):	20
	Evdev Wheel Emulation (270):	0
	Evdev Wheel Emulation Axes (271):	0, 0, 4, 5
	Evdev Wheel Emulation Inertia (272):	10
	Evdev Wheel Emulation Timeout (273):	200
	Evdev Wheel Emulation Button (274):	4
	Evdev Drag Lock Buttons (275):	0

I am going to change the value of "Device Accel Constant Deceleration" to 4:

$ xinput --set-prop 11 'Device Accel Constant Deceleration' 4

Now in relative mode, the drawings are more proportionate, but when drawing a square on the tablet, the result on the screen looks a bit more like a vertical rectangle. The table has a resolution of 1024 x 768 and seems to be mapped as a square on the screen, so the vertical strokes are longer than the horizontal ones. To change the mapping proportions I will modify the "Coordinate Transformation Matrix" by changing the value that affects the vertical positionning with a ratio of 768 / 1024 = 0.75:

$ xinput --set-prop 11 'Coordinate Transformation Matrix' 1 0 0 0 0.75 0 0 0 1

The result is viable, but there are several shortcomings left:
1) When I do this for example :
- Move the cursor from the left of the screen to its right by moving the stylus close to the tablet
- Lift the stylus high and bring it back to its starting point.
The cursor moves back left half of the screen instead of staying still on the right.
What should I do to maintain the cursor still when I perform the above actions?

2) The above commands has to be executed manually each time I plug the tablet to the usb port.
How can I automatize the following configuration on plug in a system wide manner?

$ xinput list
$ xinput list --long 11
$ xinput --set-mode 11 RELATIVE
$ xinput --set-prop 11 'Device Accel Constant Deceleration' 4
$ xinput --set-prop 11 'Coordinate Transformation Matrix' 1 0 0 0 0.75 0 0 0 1

Offline

#3 2013-11-18 20:02:04

ramboman
Member
Registered: 2010-01-23
Posts: 34

Re: [SOLVED] Configuring a non-wacom graphics tablet

What should I do to maintain the cursor still when I perform the above actions?

The problem has not been resolved yet but there is a way around. When there is a need to do precision work, the cursor is moved using the tablet, but when there is a need to move the cursor on a great distance, the mouse and the touchpad are more efficient than moving back and forth the stylus on the tablet.

How can I automatize the following configuration on plug in a system wide manner?

A xorg configuration can be placed in /etc/X11/xorg.conf.d:

61-UC-LOGIC_Tablet_WP8060U.conf:

Section "InputClass"
        Identifier "UC-LOGIC Tablet WP8060U"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        MatchProduct "Tablet WP8060U"
        Driver "evdev"
        Option "TransformationMatrix" "1 0 0 0 0.75 0 0 0 1"
        Option "Mode" "relative"
        Option "ConstantDeceleration" "4"
EndSection

Offline

Board footer

Powered by FluxBB