I've used Raspbian Lite quite a bit before, but am new to the Raspbian desktop GUI so please forgive my ignorance...
I've got a Pi 4 hooked up to a VGA monitor via HDMI > VGA adaptor. The monitor only works with the Pi's 640x480 and 800x600 modes. I have set my config.txt accordingly to use 800x600 (60Hz):
This works fine in the terminal but in the desktop it selects a mode outside of the range of the CRT (it does display something, but messed up and illegible, looks to be a very high resolution). I gather this is the desktop selecting what it thinks to be a good video mode. I doubt EDID works with VGA adaptors so not sure what it is doing exactly.
I found that I can set the video mode using this command:
xrandr --output HDMI-1 --mode "800x600"
This works fine...until I reboot and then it's back to the world of guessing what I'm typing.
What is the best way to autorun this command on startup? I did some research and thought that editing (sudo nano) /etc/xdg/lxsession/LXDE-pi/autostart would be the way to go, and added my above command (prefixed with @). This doesn't seem to do anything. I had a look in ~/.cache/lxsession/LXDE-pi/run.log and it contains this:
app.vala:76: Launching xrandr
xrandr: cannot find mode "800x600"
As I say, the command works manually from a terminal so not sure what the problem is. If anyone could point me in the right direction it would be much appreciated!