I've been having the worst time trying to get the official rpi 7" touch to rotate consistently. I'm using openbox. I am able to manipulate the touch orientation using config.txt, but changing lines in cmdline.txt doesn't seem to net any results in X. It does SOMETIMES rotate the terminal display, but once in X it's different.
Here's my cmdline.txt:
console=serial0,115200 console=tty1 root=PARTUUID=83fea24d-02 rootfstype=ext4 fsck.repair=yes rootwait video=DSI-1:800x480@60,rotate=90
Here's my (relevant) config.txt:
display_auto_detect=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
disable_overscan=1
gpu_mem=128
Here's my autostart:
xrandr --output DSI-1 --auto --rotate right--verbose &
xscreensaver -no-splash &
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences &
sed -i 's/"exit_type": "Crashed"/"exit_type": "Normal"/' ~/.config/chromium/Default/Preferences &
chromium-browser --noerrors --disable-session-crashed-bubble --disable-infobars --start-maximized --app=http://127.0.0.1:5000/?#tab_plugin_resource_monitor &
What I am looking for is reliable permanent screen rotation. What else do I need to do to fix this? The raspberry pi documentation doesn't cut it and much of the documentation\discussion I do find is old or also doesn't work out.
Update(s): The current settings shown above work if I slowly and methodically enter X. If I let the pi auto login to X, the orientation fails or at best is extremely inconsistent. Also, I have 3 identical setups. Pi3a+, Rpi Touch 7", 5A Power supply. None of the three behave the same even with identical settings. I'm trying to work on one at a time and just clone the SD card but last time I tried that it also didnt work. One of the three wouldn't rotate.
addohm@mk4-octopi:~ $ uname -a
Linux mk4-octopi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
addohm@mk4-octopi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye