techrep
Posts: 6
Joined: Fri Sep 28, 2018 6:32 pm

Recent Update - How to invert screen and touch panel?

Sat Jul 25, 2020 3:33 am

How do I change the display orientation now? before it seemed pretty straightforward but now using dtoverlay in the config.txt doesn't seem to do anything.

-Chris

techrep
Posts: 6
Joined: Fri Sep 28, 2018 6:32 pm

Re: Recent Update - How to invert screen and touch panel?

Sat Jul 25, 2020 3:53 am

Replying to myself-

once the FKMS line is commented out lcd_rotate=2 placed in the config.txt now appears to work fine.

Sorry about the fire alarm.

-Chris

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9261
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Recent Update - How to invert screen and touch panel?

Sun Jul 26, 2020 6:34 am

If you're using FKMS (recommended otherwise you have no 3D or X11 acceleration), then you need to tell the kernel to do the rotate.
For X use the Screen Configuration app to set up xrandr.
For the console you currently need to tell it to rotate via the kernel command line (/boot/cmdline.txt)
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ghavenga
Posts: 4
Joined: Sun May 26, 2013 7:51 pm

Re: Recent Update - How to invert screen and touch panel?

Mon Aug 03, 2020 3:16 am

I too have the same problem.

I have a RPi 4, with the official touchscreen.

I have tried the "Screen Configuration" app, as well as editing /boot/config.txt and adding "lcd-rotate=1" as I want a 90 degree (portrait) orientation.

Both methods work fine for the display itself, but the touchscreen input is ALL WRONG.

Other posts have suggested editing the x configuration file to change the configuration matrix, but I'm amazed that no one caught this.

Editing config files might be doable, but it's certainly not user friendly, especially when you might want to change the orientation of the device on a whim.

I know this thing doesn't have an IMU or accelerometer (yet, he he), but there has to be an easier way to change screen orientation (AND TOUCH ORIENTATION) on the fly, especially when using the Official Raspberry Pi display!

aBUGSworstnightmare
Posts: 2046
Joined: Tue Jun 30, 2015 1:35 pm

Re: Recent Update - How to invert screen and touch panel?

Tue Aug 04, 2020 11:30 am

sadly nobody seems to look at the documentations pages ...

Is it really that complicated to:
FKMS Mode

FKMS mode is used by default on the Raspberry Pi 4B. FKMS uses the DRM/MESA libraries to provide graphics and 3D acceleration.

To set screen orientation when running the graphical desktop, select the Screen Configuration option from the Preferences menu. Right click on the DSI display rectangle in the layout editor, select Orientation then the required option.
or use xrandr https://www.raspberrypi.org/documentati ... otation.md

and for touchscreen orienation you can
Additionally, you have the option to change the rotation of the touchscreen independently of the display itself by adding a dtoverlay instruction in config.txt, for example:

dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1

The options for the touchscreen are:

DT parameter Action
touchscreen-size-x Sets X resolution (default 800)
touchscreen-size-y Sets Y resolution (default 600)
touchscreen-inverted-x Invert X coordinates
touchscreen-inverted-y Invert Y coordinates
touchscreen-swapped-x-y Swap X and Y cordinates
or change the touch transformation matrix - which is more common in the Linux world - on the fly by viewtopic.php?f=108&t=219333&p=1348198& ... n#p1348198

Return to “Official Foundation Display”