nuevo
Posts: 2
Joined: Thu Oct 10, 2019 11:08 am

Swapping X Y on Touchscreen

Thu Oct 10, 2019 11:27 am

Hi Raspi Community

I have a running Raspberry Pi 4 B.
I connected it to a iiyama ProLite TF4338MSC Touchscreen. I use the Touchscreen in Portrait Mode
So far so good. The Raspberry starts, the screen connects properly and i can work on it with a mouse.
I also got inputs from the Touchscreen, just not in the way i want it.
As i Said i use the Screen in Portrait mode so i had to Rotate the display. Works perfectly, but the Touchscreen stays as in Landscape Mode (swapped -> x is y, and y is x). When rotate the display back to Landscape the Touchscreen works as expected.

I tried everything i found on the Manual and in the Forum

Code: Select all

sudo nano /boot/config.txt
dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1
save (ctrl + o) and close (ctrl +x)

Code: Select all

sudo reboot
and different variations of this. And theres just no reaction.

Also Screen Rotation via

Code: Select all

display_rotate=1
works.

Do you have any Idea why there is no Reaction on the Touchscreen?
Thanks for your help

nuevo
Posts: 2
Joined: Thu Oct 10, 2019 11:08 am

Re: Swapping X Y on Touchscreen

Mon Nov 04, 2019 3:20 pm

Has anyone an answer or stepped over the same issue?

User avatar
procount
Posts: 2956
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Swapping X Y on Touchscreen

Mon Nov 04, 2019 4:04 pm

nuevo wrote:
Thu Oct 10, 2019 11:27 am
dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1
This configuration is for the RPF 7" touchscreen and tells the rpi-ft5406 touchscreen driver to swap the x-y axis and invert the x axis.
I doubt it will do anything with your Iiyama display because it will probably use a different touchscreen driver. How is your touchscreen connected to your RPI4 - by USB?

display_rotate
nuevo wrote:
Thu Oct 10, 2019 11:27 am
display_rotate=1
See https://www.raspberrypi.org/documentati ... t/video.md
DISPLAY ROTATE
display_rotate is deprecated in the latest firmware but has been retained for backwards compatibility. Please use display_lcd_rotate and display_hdmi_rotate instead.
But I think this will still only rotate the screen and not the touchscreen.
I think LCD_ROTATE was designed to rotate the screen and the touchscreen, but maybe only for the RPF touchscreen (....?)

You need to identify which touchscreen driver you are using, then work out how to tell the touchscreen driver to rotate.
If USB, start with your touchscreen disconnected. Type `lsusb` and note the output. Type `dmesg` and note the last few lines.
Now plug in your touchscreen and repeat the last two commands, noting the difference from the previous time. This information may help you identify the driver.

if you're working in desktop mode, there maybe some other ways to rotate the touchscreen in X that I'm not familiar with, but maybe the above will point you in the right direction. This post looks relevent (but replace the rpi-ft5406 driver with the one you are using) -> https://www.raspberrypi.org/forums/view ... 3#p1348198
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Ernst
Posts: 1397
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Swapping X Y on Touchscreen

Mon Nov 04, 2019 4:14 pm

nuevo wrote:
Mon Nov 04, 2019 3:20 pm
Has anyone an answer or stepped over the same issue?
This post should give enough information to find a solution:
https://www.raspberrypi.org/forums/view ... 3#p1549853

and some more:
https://askubuntu.com/questions/920051/ ... untu-16-04
The road to insanity is paved with static ip addresses

Return to “Troubleshooting”