It doesn’t work…
Chromium start, but screen is not rotating. Before Chromium start I can see info “can’t open DIsplay=:0” or something like that…
It looks like script rotate_screen.sh is executed before Chromium with graphical envoirement fully start.
Where can I find logs from start? I searched in /var/log but can’t find anything that could looks like logs from start stage.
pls can you post content of /var/lib/dietpi/postboot.d/rotate_screen.sh
kolaborek
There is a backslash behind the shebang that does not belong there:
#!/bin/dash\ needs to be #!/bin/dash
what about the following to have a delay and to wait for chromium to start?
/bin/bash -c "sleep 15&&DISPLAY=:0 xrandr --output HDMI-1 --rotate left"
honestly I did not test it myself
MichaIng Indeed… what a fail from my side… I correct this, but this still won’t work.
Joulinar I thought about the same
I added 10s sleep to rotate_screen.sh and … it was executed before Chromium starts…:
File now looks like below:
root@DietPi:~# cat /var/lib/dietpi/postboot.d/rotate_screen.sh
#!/bin/dash
sleep 10s
DISPLAY=:0 xrandr --output HDMI-1 --rotate left
I recorded video from boot. You can watch it below. After sleep command you can see that system can’t open Display. This is because graphical envoirement with Chromium starts just after screen_rotate.sh script.
https://1drv.ms/v/s!AktdokBytgiDgsJoDOaNSsUGC8qBLQ?e=lFepmx
At fourteenth second you can watch this:

A makes sense that xrandr can only rotate a screen/x session that already exists… sleep does not help since dietpi-postboot then simply waits that sleep time before continuing, delaying Chromium start on login.
Hmm, there must be a way to tell the xserver directly to rotate the screen.
/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh contains xinit chromium as last line. xinit options can be set by appending – to the end of this line. But I can’t fine an option to rotate the screen right via xinit.
But actually best is anyway to do all this via xorg.conf. What is the content of your current config(s)?
cat /etc/X11/xorg.conf{,.d/*.conf}
It should basically work to only add Option “Rotate” “left” to the end of the “Monitor” section in /etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf.
I am not sure whether a new file works as expected, e.g.
cat << _EOF_ > /etc/X11/xorg.conf.d/01-rotate-screen.conf
Section "Monitor"
Identifier "TV"
Option "Rotate" "left"
EndSection
_EOF_
Not sure if now both settings, rotation + disabling power management, are added or if 99-dietpi-dpms_off.conf overrides 01-rotate-screen.conf completely. You could actually test it by naming the latter 99-rotate-screen.conf, so that it is parsed afterwards by alphabetical order.
The fbturbo error you faced when trying such before looks like there is simply no fbturbo driver/package installed. Where you got this entry from? I would just leave xorg.conf as it was or even remove it. It does not exist by default, until a certain acceleration driver package installs one.
I found a workaround. Not beautiful, but it works 
First. Starting browser.
Chromium isn’t run by option 11 in dietpi-autostart but its starting by option 14 (/var/lib/dietpi/dietpi-autostart/custom.sh file).
I put in this file path to start Chromium:
/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh
And second. Rotating screen.
In folder /var/lib/dietpit/postboot.d/ is created file 99-roate-screen.sh in which I pasted command:
DISPLAY=:0 xrandr --output HDMI-1 --rotate left
Now, Chromium starts in rotate mode 
Thx for sharing your final solution. Good to know that it is working now.