# Raspberry Pi Touch Display 2 - Rotate screen

**URL:** <https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804>\
**Category:** Building Zynthian\
**Created:** [January 7, 2025, 11:00pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804 "2025-01-07T23:00:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 7, 2025, 11:00pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/1 "2025-01-07T23:00:22Z")

</div>

Hi, I have a Raspberry Pi 5 8gb, and just setup a new ‘Raspberry Pi Touch Display 2‘. I have installed the latest oram software.

Does anyone know how to get the screen to rotate from portrait to landscape. I have spent a fully evening and haven’t been successful.

I am in the webconfig (Hardware-\>Display advanced options) , and can’t figure out how to rotate. I suspect it can’t be done.

I have been able to swap the x and y, using the following in the config:

dtoverlay=vc4-kms-dsi-ili9881-7inch,invx,invy

EDIT: I had a typo in the above line.

When I add stuff to try rotate I get nowhere: rotate,rotation,display\_orientation,display\_lcd\_rotate,… I can’t seem to get any effect. The documentation for vc4-kms-dsi-7inch doesn’t list these, which is why I suspect it can’t be done.

I have been able to rotate the kernel orientation (on startup) via the config, but it goes straight to portrait after startup.

Any help greatly appreciated. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [January 8, 2025, 3:03pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/2 "2025-01-08T15:03:13Z")

</div>

Hi @dealing_with_doors welcome in the Zynthan’s world, where adventurous folks explore music, electronic and Linux based software.

The new ‘Raspberry Pi Touch Display 2‘ is quiet … new ! And, I believe that you could be the very first one here with that display under hands.

So, for sure, as is, there’s no “out of the box” working config in the webconf display configuration tool and I hope you are prepared to be an explorator too 😊

Things are moving very fast on the RaspberryPiOs side (wich is the base system of Zynthian). I would recommend you to,

1. first, do all your test on an up to date RaspberryPiOs system and see if you can get the landscape view working correctly. Be aware that Zynthian use the old X11 display server. Now, the global (not only RaspiOs) way to go is to switch to Wayland. It’s been a while I didn’t play with RaspiOs, but (I’m not 100% sure about that) I’ve read elsewhere you can select wich display driver you want to use on RaspiOs.
2. then, if this was successful, check /boot/fimware/cmdline.txt and /boot/fimware/config.txt files and compare this setup with what you’ve already have on your Zynthian box (also compare the kernel versions, I’m not sure Zynthian’s one is aligned with the latest RaspiOs)
3. adapt these files on your Zynthian SD card (when tinkering with RaspberryPi and Zynthian, it’s a good idea to have a couple of SD cards. eg: one with latest RaspiOs for hardware dysfunction solving, one with your current working setup, maybe one if you want to test all the new features in the Zynthian testing branch called “Vangelis”

Regarding point 1. after a quick search, I’ve found these topics:

[https://forums.raspberrypi.com/viewtopic.php?t=379738](https://forums.raspberrypi.com/viewtopic.php?t=379738)  
[https://forums.raspberrypi.com/viewtopic.php?p=2280504](https://forums.raspberrypi.com/viewtopic.php?p=2280504)

where there is unfortunately no [solved] tag

I hope you will get the display to work correctly, so that you can after that scratch your head again with touchscreen functionality !

Good luck, and do not hesitate to give feedback and ask questions.

EDIT: it looks like the overlay you use is the wrong one:

```auto
dtoverlay=vc4-kms-dsi-ili9881-7inch

```

see here:  
[https://forums.raspberrypi.com/viewtopic.php?p=2269589&hilit=rotate+touch+display+2+X11&sid=7d6a1c8a94ec40c8f21daf6f91315147#p2269605](https://forums.raspberrypi.com/viewtopic.php?p=2269589&hilit=rotate+touch+display+2+X11&sid=7d6a1c8a94ec40c8f21daf6f91315147#p2269605)

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 8, 2025, 6:39pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/3 "2025-01-08T18:39:30Z")

</div>

Thanks for this. I will get onto this today and report back.

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 8, 2025, 8:13pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/4 "2025-01-08T20:13:29Z")

</div>

![IMG_2193](https://discourse.zynthian.org/uploads/default/original/2X/c/cc040d0ed2ebdbe3b18dac97ad857cc1579efc49.png)

I can get the touch screen to rotate with the above lines. And the terminal boot screen is landscape. The only thing that I need is the Zynthian GUI to rotate (which would then align to the touch controls). Any thoughts from here?

Software:

 ![IMG_2196](https://discourse.zynthian.org/uploads/default/original/2X/3/3db473b198b5eb3bf692885320a4735f04d80947.png)

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 8, 2025, 10:45pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/5 "2025-01-08T22:45:16Z")

</div>

Ok, where I think am is the option for rotation=90 is not there, so I can’t rotate.

In one of the links, they only get access to the option for rotation with dtoverlay=vc4-kms-dsi-ili9881-7inch, after they update Linux to 6.6.63 ([Enable Raspberry Touch 2 rotation with overlay by foonerd · Pull Request #6480 · raspberrypi/linux · GitHub](https://github.com/raspberrypi/linux/pull/6480)).

Not sure how I go forward, I suspect I might be better off with a different screen at this stage?

---

<div class="post-metadata">

**Author:** ![Lanfranco](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/lanfranco/32/8094_2.png) [@Lanfranco](https://discourse.zynthian.org/u/Lanfranco)\
**Post date:** [January 9, 2025, 6:08am UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/6 "2025-01-09T06:08:45Z")

</div>

Hi, I went crazy too, but then I found a solution online.  
From the terminal (I used Putty) type this string:

`DISPLAY=:0 xrandr`

See which DSI the display is connected to.  
Then create (if it doesn’t already exist) this path:

`sudo nano /usr/share/X11/xorg.conf.d/90-monitor.conf`

… and paste these strings into it, changing the port the display is connected to and the rotation you want to give. Save and reboot. On my P5 it worked perfectly. In my case the display is connected to DSI-2 and I reversed it. Bye

```auto
Section "Monitor"
    Identifier "DSI-2"
    # This identifier would be the same as the name of the connector printed by xrandr
    # for example "DVI-I-1 connected primary" means that the identifier is "DVI-I-1"
    # another example "Unknown19-1 connected primary" some GPIO screens identify as Unknown19

    Option "Rotate" "inverted"
    # Valid rotation options are normal,inverted,left,right

    Option "PreferredMode" "800x480"
    # May be necesary if you are not getting your prefered resolution.
EndSection

```

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [January 9, 2025, 7:04am UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/7 "2025-01-09T07:04:05Z")

</div>

It would be good to submit a [feature request](https://github.com/zynthian/zynthian-issue-tracking/issues/new?template=feature_request.md) for screen rotation configuration in webconf, ideally with a description of a solution!

---

<div class="post-metadata">

**Author:** ![3tree](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/3/e5b9ba/32.png) [@3tree](https://discourse.zynthian.org/u/3tree)\
**Post date:** [January 9, 2025, 12:30pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/8 "2025-01-09T12:30:00Z")

</div>

Your timing is impeccable as my touch screen was delivered today and this helped me solve the rotation problem, thank you!

But I still have a couple of issues. When I create the monitor.conf file, and add the rotation, the screen is defaulted to mouse mode (the cursor appears in the middle of the screen) not touch mode, even with Touch Navigation V5 set in the menu.

And the Web UI doesn’t work - I can’t connect to it. The status and command line is as follows…

sudo systemctl status zynthian-webconf  
● zynthian-webconf.service - Zynthian Webconf  
Loaded: loaded (/etc/systemd/system/zynthian-webconf.service; enabled; preset: enabled)  
Active: active (running) since Thu 2025-01-09 12:08:28 GMT; 2min 37s ago  
Main PID: 721 (zynthian\_webcon)  
Tasks: 3 (limit: 9566)  
CPU: 1.243s  
CGroup: /system.slice/zynthian-webconf.service  
├─721 /bin/bash /zynthian/zynthian-webconf/zynthian\_webconf.sh  
└─875 python3 ./zynthian\_webconf.py

Jan 09 12:08:29 zynthian zynthian\_webconf.sh[721]: Virtualization: none  
Jan 09 12:08:29 zynthian zynthian\_webconf.sh[721]: Hardware Architecture: aarch64  
Jan 09 12:08:29 zynthian zynthian\_webconf.sh[721]: Hardware Model: Raspberry Pi 5 Model B Rev 1.0  
Jan 09 12:08:29 zynthian zynthian\_webconf.sh[721]: ----------------------------------------------  
Jan 09 12:08:33 zynthian zynthian\_webconf.sh[875]: INFO:root:ZYNTHIAN-UI CONFIG …  
Jan 09 12:08:33 zynthian zynthian\_webconf.sh[875]: INFO:root:No Wiring Layout configured. Only touch interface is available.  
Jan 09 12:08:34 zynthian zynthian\_webconf.sh[875]: Started libzynaudioplayer using libsndfile-1.2.0  
Jan 09 12:08:34 zynthian zynthian\_webconf.sh[875]: INFO:root:Supported Audio Codecs: [‘aiff’, ‘aifc’, ‘au’, ‘caf’, ‘flac’, ‘mp3’, ‘vox’, ‘opus’, ‘ogg’, 'w\>  
Jan 09 12:08:34 zynthian zynthian\_webconf.sh[875]: INFO:root:RBPi Device Name: ‘’  
Jan 09 12:10:30 zynthian zynthian\_webconf.sh[875]: DEBUG:asyncio:Using selector: EpollSelector  
lines 1-20/20 (END)

Disconnecting the power on the touch screen and rebooting, enabled the web UI.

Appreciate any ideas?

PS I’m also using the Raspberry Pi Touch Display 2.

---

<div class="post-metadata">

**Author:** ![3tree](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/3/e5b9ba/32.png) [@3tree](https://discourse.zynthian.org/u/3tree)\
**Post date:** [January 9, 2025, 4:33pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/9 "2025-01-09T16:33:08Z")

</div>

Update: Thanks to a bit of AI help I have touch working again now, which was achieved by adding the following to /boot/firmware/config.txt (under Display Config)

lcd\_rotate=2  
dtoverlay=vc4-kms-dsi-ili9881-7inch,swapxy

however it’s mapped upside down (i.e. touching the bottom of the screen triggers the control at the top in the same x-axis. Editing the dtoverlay line to remove swapxy stops the touch screen working, and I can’t figure out how to fix that - the other variables for dtoverlay haven’t solved it. AI suggested creating and modifying the file /etc/X11/xorg.conf.d/99-calibration.conf with Option “TransformationMatrix” “1 0 0 0 -1 1 0 0 1”  
but that didn’t work.

Also, the web UI is still inaccessible when the touch screen is plugged in.

---

<div class="post-metadata">

**Author:** ![Lanfranco](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/lanfranco/32/8094_2.png) [@Lanfranco](https://discourse.zynthian.org/u/Lanfranco)\
**Post date:** [January 9, 2025, 6:20pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/10 "2025-01-09T18:20:29Z")

</div>

In my case with Waveshare 4.3 DSI display the rotation settings on webconf had no effect. With the script I attached above, everything went fine, even the touchscreen… But your display is different from mine…

---

<div class="post-metadata">

**Author:** ![3tree](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/3/e5b9ba/32.png) [@3tree](https://discourse.zynthian.org/u/3tree)\
**Post date:** [January 9, 2025, 6:44pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/11 "2025-01-09T18:44:39Z")

</div>

I’ve created a separate topic for the web ui.

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 9, 2025, 7:07pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/12 "2025-01-09T19:07:00Z")

</div>

I have it working. Starting from scratch:

I followed lanfranco’s post to create 90-monitor.conf

I changed “inverted” to ‘left’. I commented out the resolution option.

Next I did what 3tree suggested and edited /config.txt and added an extra invy

lcd\_rotate=2  
dtoverlay=vc4-kms-dsi-ili9881-7inch,swapxy,invy

Solved! And a big thank you to all!

---

<div class="post-metadata">

**Author:** ![3tree](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/3/e5b9ba/32.png) [@3tree](https://discourse.zynthian.org/u/3tree)\
**Post date:** [January 9, 2025, 7:46pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/13 "2025-01-09T19:46:40Z")

</div>

Ah great you got it working, adding invy hadn’t worked for me. But with your success I’ve revisited, physically rotated the screen (!), swapped rotate to ‘left’ in the conf file and then applied the same as you …

lcd\_rotate=2  
dtoverlay=vc4-kms-dsi-ili9881-7inch,swapxy,invy

and now it works! The upside to those issues is that I discovered my old iPad from 2012 can be used as a VNC controller, which is v satisfying.

Thanks also All!

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 9, 2025, 11:29pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/14 "2025-01-09T23:29:28Z")

</div>

Note when I did a software update, the config.txt was cleared. The touchscreen became unresponsive until I added the lines back in.

Here is the working setup, for your viewing pleasure. I now need a case and it will be plugged into a FP-30X for fun (the speaker in that works well with it too).

 ![IMG_2216](https://discourse.zynthian.org/uploads/default/original/2X/a/a7043617a68c461382c14c41c450513e11e3309d.jpeg)

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [January 10, 2025, 6:41am UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/15 "2025-01-10T06:41:08Z")

</div>

> [@dealing\_with\_doors](#):
>
> Note when I did a software update, the config.txt was cleared.

Add your config changes in webconf HARDWARE-\>Display, Config field, remembering to save changes in webconf.

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [January 10, 2025, 1:04pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/16 "2025-01-10T13:04:09Z")

</div>

Hi @dealing_with_doors I’m glad you’ve got it woking.

The best solution would be to integrate it in the webconf tool if you’re comfident with Github. So that future users wont struggle anymore as you did.

---

<div class="post-metadata">

**Author:** ![dealing\_with\_doors](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dealing\_with\_doors](https://discourse.zynthian.org/u/dealing_with_doors)\
**Post date:** [January 11, 2025, 7:41am UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/17 "2025-01-11T07:41:58Z")

</div>

Hi, I am tempted. Right now I’m unsure if you would also want the 90-monitor.conf file in the repo. Maybe I send you a direct message when I’m back to this and you can help me on the journey to giving back!

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [February 4, 2025, 1:25pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/18 "2025-02-04T13:25:33Z")

</div>

> [@Raspberry pi touch display 2 - touch panel not rotating](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-touch-panel-not-rotating/10910):
>
> Hi i bought a new Raspberry PI Touch Display 2. using zynthian oram stagin (latest update) and raspberry pi 5. screen rotation worked using the 90-monitor.conf as in the thread [Raspberry Pi Touch Display 2 - Rotate screen - #5 by dealing\_with\_doors](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/5) the problem is touchpanel not rotated. and also the Raspberry Pi Touch Display 2 configuration not available in web conf. any help to fix this?

> [@dealing\_with\_doors](#):
>
> the 90-monitor.conf file

yes please and a copy of /boot/firmware/config.txt, /boot/firmware/cmdline.txt and a webconf/Display screenshot 😆

---

<div class="post-metadata">

**Author:** ![aslambabu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/aslambabu/32/13334_2.png) [@aslambabu](https://discourse.zynthian.org/u/aslambabu)\
**Post date:** [February 4, 2025, 4:03pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/19 "2025-02-04T16:03:07Z")

</div>

Thanks for your help. I connected another display and was doing some tests. will connect the rp display 2 tomorrow, and will share the screenshots and config files. once again thanks for the help 🙂

---

<div class="post-metadata">

**Author:** ![nkaikai](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/n/65b543/32.png) [@nkaikai](https://discourse.zynthian.org/u/nkaikai)\
**Post date:** [May 11, 2025, 6:01pm UTC](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804/20 "2025-05-11T18:01:58Z")

</div>

I’ve setup zynthian with the pi touch display 2 and the instructions work. however i lose touch when waking up from sleep.

Also, calibration cannot be done. i can push the crosshair but it never moves to another step. Any ideas?

[Next page](https://discourse.zynthian.org/t/raspberry-pi-touch-display-2-rotate-screen/10804.md?page=2)
