OK, it turns out I had to switch from evdev to libinput and then simply use the rotation matrix values from here
For example, for left rotation:
Code: Select all
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
It's now working as expected!