Change hdmi resolution not working (tried using xrandr and modifying uEnv.txt)


I am using the latest MachineKit (downloaded from image and am trying to change the hdmi resolution to use it with a generic 5 inch lcd screen. The resolution I require is 800x480.

What I have tried:

Open terminal

Type export XAUTHORITY=ls /var/run/gdm/auth-for-root-*/database and hit enter.
Type export DISPLAY=:0.0 and hit enter.
Type xrandr --output HDMI-0 --mode 800x480 --rate 60. You can substitute different resolutions and refresh rates if you like. Hit enter.

This method gives an error “No protocol specified. Can’t open display :0.0”

I have tried other lcd names such as “default” and “HDMI-0”

  • modifying uEnv.txt: I tried adding “kms_force_mode=video=HDMI-A-1:800x480M@60” to the uEnv.txt file (in both /boot and /media/machinekit/boot) as suggested at I tried changing the name of the screen from “HDMI-A-1” to “HDMI-0” and “default”.

This gives no errors, but also seems to have no effect on the resolution.

I am doing this on a tv screen which may not support the resolution I am trying to change it to. This is because I cannot see enough of the screen on the lcd at the wrong resolution to open the terminal and modify things- could this be causing a problem? Should I be changing the settings via putty instead?

Thank you in advance,


Hi Poppy,

A year onward, I am experiencing near identical troubles and problems with the Beaglebone on a generic LCD panel. I am following similar steps but i get the “No protocol specified. Cannot open display :0.0”. Do you recall what fixed this for you?

Thanks for any help in advance!