Page 1 of 1

RPi 4 Raspbian Buster desktop resolution

Posted: Sat Aug 10, 2019 8:52 pm
by minwah
Hi there,

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):

hdmi_group=2
hdmi_mode=9

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!

Re: RPi 4 Raspbian desktop resolution

Posted: Sun Aug 11, 2019 12:57 am
by Gavinmc42
Does that monitor have a DVI input?
They just work.

Re: RPi 4 Raspbian desktop resolution

Posted: Sun Aug 11, 2019 11:05 am
by minwah
Gavinmc42 wrote:
Sun Aug 11, 2019 12:57 am
Does that monitor have a DVI input?
They just work.
No, it only has VGA.

The monitor works fine, it is something desktop is doing that is the problem. It was not a problem on Pi 2 using the same OS (Raspbian Buster).

Re: RPi 4 Raspbian desktop resolution

Posted: Sun Aug 11, 2019 11:11 am
by minwah
Here is a thread where someone had the same problem and used xrandr to solve it:

https://www.raspberrypi.org/forums/view ... ?p=1500094

In there pik33 says:

'If you add this to X autostart script, it should set your needed graphics mde in X'

That is the part I'm struggling with...