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.
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,
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.
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)
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:
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?
… 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
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
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.
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)
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.
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…
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 …
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).
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!