0

I want to leave this solution here because it was difficult for me to find it or I didn't know how to look for it.

I have a Gadnic graphics tablet (model Gotop T505, identified by lsusb as ID 08f2:6811) connected to a Linux system (Pop!_OS 22.04).

The tablet works for basic input (cursor movement and pressure sensitivity), but I need to rotate the input area 90 degrees because the tablet has "mapped" my screen as if the (rectangular) tablet is standing still so the right edge of my tablet is actually the top edge on my screen. I'm also left-handed so the rotation I got works for that too. The solution does not map buttons or adjust pen sensitivity and I have not tried those things either.

The xsetwacom tool does not recognize this device, as it is not a Wacom tablet. By running xinput list, I can see my device:

⎡ Virtual core pointer id=2 [master pointer (3)]

⎜ ↳ SZ PING-IT INC. T505 Graphic Tablet Pen (0) id=19 [slave pointer (2)]

⎣ Virtual core keyboard id=3 [master keyboard (2)]

I have noticed that the device has a property called "Coordinate Transformation Matrix".

I recommend this solution before setting up OpenTabletDriver, Digimend or 10moons. e device, but provides no interface for these configurations.

What I have tried:

  1. Digimend Driver:

    • Attempted sudo apt install digimend-dkms. This failed with the error: ERROR (dkms apport): kernel package linux-headers-6.16.3-76061603-generic is not supported.
    • Attempted to compile from the latest source (git clone... && sudo make install). The compilation failed with: hid-uclogic-core.c:494:9: error: implicit declaration of function ‘del_timer_sync’. This indicates an incompatibility between the driver source and my kernel version.
  2. xsetwacom:

    • The command xsetwacom list devices returns no output, suggesting the tablet is not recognized as a Wacom-compatible device.
    • xinput list correctly shows the device as SZ PING-IT INC. T505 Graphic Tablet Pen (0).
  3. xinput Coordinate Transformation Matrix:

    • I attempted to rotate the input area using:

      xinput set-prop "SZ PING-IT INC. T505 Graphic Tablet Pen (0)" --type=float "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1 
    • The command executes without error, but the tablet's input area is not rotated. dmesg shows the device is handled by the hid-generic driver, which likely lacks this functionality. The solution that will be shown below is to use this command but in a different way.

  4. OpenTabletDriver (AppImage):

    • The "Device String Reader" tool in OTD does not detect the tablet at all.
    • dmesg confirms the device is claimed by hid-generic, preventing OTD from accessing it.
    • I attempted to create a udev rule (ENV{ID_IGNORE}="1") to prevent the kernel from claiming the device, but this did not work, and OTD still could not see it.

1 Answer 1

0

(If this solution doesn't work, it may also be because in the course of trying many things I accidentally changed something in such a way that the xinput command started working. In that case I would like you to let us know so we can leave the real solution in this question.)

1. xinput must be installed. It usually comes preinstalled on most Linux distributions.

2. Identify your tablet devices in the terminal listing all input devices with xinput list

Output example for a T505:

⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ SZ PING-IT INC. T505 Graphic Tablet Keyboard id=15 [slave pointer (2)] ⎜ ↳ SZ PING-IT INC. T505 Graphic Tablet Pen (0) id=19 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] 

3. Once you have identify your pen and tablet:

- The pen usually has a name that includes "Pen".

- The tablet itself may appear as "Tablet" or "Mouse"/"Keyboard" depending on the model.

If in doubt, aim for numeric IDs (`id=19`) instead of names, because sometimes there are multiple devices with similar names.

4. View the current transformation matrix

Each pointing device has a matrix that transforms the coordinates:

xinput list-props <DEVICE_ID>

Example for the pen (id=19):

xinput list-props 19

Find the line:

Coordinate Transformation Matrix (210): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

The current array 1 0 0 0 1 0 0 0 1 means no rotation or scaling.

5. Apply the desired rotation

The rotation is done by modifying the Coordinate Transformation Matrix:

Most common rotation matrices:

Rotation = Matrix

0° = 1 0 0 0 1 0 0 0 1

90° = 0 1 0 -1 0 1 0 0 1

180° = -1 0 1 0 -1 1 0 0 1

-90° = 0 -1 1 1 0 0 0 0 1

Adjust as you need clockwise or counterclockwise.

Example: rotate the pen +90° (id=19):

xinput set-prop 19 "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

5. Verify that it worked moving the pen over the tablet checking that the cursor moves according to the applied rotation. If the movement is reversed, try another matrix from the table above.

6. Make it persistent (optional)

To avoid having to repeat the command after reboot:

6.1. If you have a configuration for startup applications, you can add with the rotation command that worked for you.

6.2. Otherwise, you can create a file in ~/.xprofile or ~/.xinitrc (depending on your environment) BUT I'M JUST A JUNIOR SO I DON'T KNOW IF THIS IS GOOD PRACTICE:

nano ~/.xprofile

Add the line:

xinput set-prop 19 "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

Save and restart session.

You must log in to answer this question.