I got myself a 10″ multi-touch display from Joy-IT for my Raspberry. I’m quite satified with the display, it has a relatively high resolution, very good display quality, good viewing angle, and touch works very well – the necessary driver is included in Raspbian. Two things that could be better: The backlight is not software-controllable, and the position of the HDMI and USB connectors is not optimal.
In the end I want to use the display mounted vertically in a wall, so I included the line
into /boot/config.txt. Unfortunately this only rotates the display, not the touch input, so the mouse is not following the touch. The line lcd_rotate=3, which would turn both display and touch, only works for the official Raspberry Foundation display. The methods described in my 3.2″ Touch Display Quick Guide do not work with this screen either. First, because tslib does not know how to handle the multitouch, and second: the SwapAxes line is also not recognised.
Still, /usr/share/X11/xorg.conf.d/99-calibration.conf is the key to success:
MatchProduct "BYZHYYZHY By ZH851"
Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
That does the trick, also on brand-new Raspbian Stretch. For more details on the transformatin matrix, also for other rotations, go here.
5 thoughts on “Touch Rotation with 10″ Display from Joy-IT”
I had the following situation:
The screen was rotated anticlockwise 90 degrees with Raspberry Pi. Changed display_rotate=1 in /boot/config.txt configuration file and restarted the machine.
So now the display was showing correct, but the touchscreen was not functioning as I wanted.
Then ran the following command:
xinput set-prop “eGalax Inc. USB TouchController” “Evdev Axes Swap” 1
What this command does, it swaps the X and Y axes of the touchscreen. Because the display was rotated anticlockwise 90 degrees, these X and Y had to be rotated too. This same would apply if rotation was done clockwise 90 degrees.
After this, the following command was ran :
This program creates the calibration data, that had be saved in configuration file in directory /usr/share/X11/xorg.conf.d/ with name 99-calibration.conf. This calibration file name can actually be anything as long as it starts with a numeric value which tells in which order it is read and must have extension .conf.
Note: The most important thing was to first swap the X and Y axes of the touchscreen. Without swapping axes, the xinput_calibrator gives wrong calibration data. I have not investigated this any deeper, but this is what I found out when solving calibration issue with display connected to Raspberry Pi.
These instructions can probably be applied to any Linux operating system that needs to have the touchscreen calibrated using xinput_calibrator and the touch screen is a resistive type.
thanks for sharing your insights!
You can btw. include the axis swap also in the 99-calibration.conf as
Option "SwapAxes" "1"(cf. eg. my other post on rotating screens). Or, above in this post, the axis swap is “encoded” in the TransformationMatrix (cf. this documentation).
Happy rotating 🙂
I’m on a Raspberry Pi 4 and I have the same problem but running LineageOS 16.0. External HDMI screen with USB touchscreen, screen rotated by config.txt but touch not rotated together. I tried to apply your solutions but I can’t follow the steps till the end sadly. Any suggestions?
Hi Matteo, I will have a look, but due to some private obligations will not do before next week. In the meantime: can you give some details on where you fail, and what the error/problem is? Cheers, Hauke
If is not possible to rotate touch screen functionality by the “Option script” you can always open your Joy-it 10″ display and on stick touch module.
There you have wires:
Display side: red – white – green – black
Since that on module side connector is connector with locking mechanism the thing is that you can rotate connector from display by 180 deg. On that way you will have inverted axis and proper cursor following while you touching display.