Rotate or Swap Touch Calibration - Linux

Rotate or Swap Touch Calibration - Linux

How can I rotate or swap the X and Y touch coordinates on Linux?

On Linux systems—or any operating system that does not support DISPLAX Connect—you may need to manually rotate or swap the touch coordinates. This is common on platforms such as Raspbian, Ubuntu Mate, or Raspberry Pi.

This can be done using the xinput utility by applying a Coordinate Transformation Matrix to the DISPLAX Touch Controller.


Step 1: Identify the Touch Input Device

Open a terminal and run:

xinput list

Locate the DISPLAX Touch Controller in the list.

Example

DISPLAX SKIN FIT (3d7be8aa9506c43779d)

You will use this exact device name in the commands below.


Step 2: Apply the Desired Rotation

Replace the device name in the examples below with your own.

Rotate Left (90° Clockwise)

xinput set-prop 'DISPLAX SKIN FIT (3d7be8aa9506c43779d)' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1

Rotate 180° (Inverted)

xinput set-prop 'DISPLAX SKIN FIT (3d7be8aa9506c43779d)' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1

Rotate Right (90° Counterclockwise)

xinput set-prop 'DISPLAX SKIN FIT (3d7be8aa9506c43779d)' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

Important Note (Persistence)

⚠️ These settings are not persistent across reboots.

To retain the rotation:

  • Create a startup script or service

  • Ensure the appropriate xinput set-prop command runs every time the system starts

Without this, the rotation or axis swap will be lost after reboot.


Summary

When DISPLAX Connect is not available, Linux users can rotate or swap touch coordinates using xinput. Applying the correct transformation matrix ensures accurate touch alignment for rotated or custom display orientations.