I am using Raspian Stretch and I can not set the resolution of my desktop when using VNC headless.

I am using Real VNC because it comes by default (I have it configured there).

I have no monitors plugged in.

I have tried all the suggestions here

Currently I have the following saved in /boot/config.txt


but still it looks like it boots into 640x480.

When I try to set this from the Raspberry Pi Configuration GUI, no options are available (only "Default - preferred monitor settings").

When I do not make these changes to config.txt I can set the monitor resolution from the GUI but still no changes take place.

Please let me know if you have a solution to this issue.


I followed the instructions on RealVNCs troubleshooting page.

In brief,

  • Open the Raspberry Pi configuration application ('Start' > Preferences > Raspberry Pi Configuration)
  • On the system tab, click the Set Resolution.. button
  • Choose the resolution you want
  • Reboot

I did this all in headless mode via a VNC session on a fresh Raspian Stretch install, using VNCViewer 6.0.1 on Windows.

Perhaps you aren't given any resolution options because you have already forced a resolution - have you tried editing config.txt to set the video mode back to default?

For reference, here's my /boot/config.txt file:

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

This corresponds to a display resolution of 1024x768 @ 60Hz according to the config.txt documentation

Here's the options that are presented in the resolution settings: enter image description here

I find the drop-down a bit touchy, you need to click and hold to get the list to display correctly.

| improve this answer | |
  • Yes and there are still no options to set resolution. – Startec Sep 25 '17 at 18:47
  • Does the GUI not provide options, or do they not apply when you select them? – andrew-g-za Sep 26 '17 at 15:13
  • It presents no options. – Startec Sep 28 '17 at 2:12
  • i've added a screenshot of the config i see - is yours anything like that? do you have any custom settings for VNC, either on the pi or locally? Which model of raspberry pi are you running this on? – andrew-g-za Sep 28 '17 at 21:03

Thank you so much!! I've been trying really hard to solve this problem, and this is it, as you said:

in the config.txt file, comment those lines:

#Enable DRM VC4 V3D driver on top of the dispmanx display stack

and voila!! Now you can configure your video settings as you wish.

| improve this answer | |

In addition to @andrew-g-za’s answer, please make sure that you’re NOT using the (at the current time) still experimental OpenGL driver !

Using the Full KMS OpenGL driver results in the resolution being set to the lowest one, even if you select another.

Using the Fake KMS OpenGL driver results in the resolution being able to be set higher, but not necessarily as high/the same as what you selected (but it may be sufficient enough for your needs).

Using the legacy driver should honor the selected resolution.

In the /boot/config.txt file, the OpenGL driver options are (usually) at the bottom of the file (look for vc4-kms-v3d or vc4-fkms-v3d). I don’t have access to my RaspPi right now, but I’ll try and add more info later.

Also worth reading/exploring : https://github.com/raspberrypi/linux/issues/1644

| improve this answer | |

If you are using a true HEADLESS VNC, then nothing in config.txt will do a damn thing. This is also the right way to run VNC on a unix system. This means a VNC server that does not interact with any physical display. I believe "tightvnc-standalone-server" is a current packaging for this.

What you do in this case is ensure the VNC server's command line includes "-geometry widthxheight" (and maybe "-dpi number") to explicitly set the values.

| improve this answer | |

My solution for this problem of resolution being stuck at 640x480 wwith RealVNC access to a headless Raspberry PI with Raspbian Buster was not exactly listed in the answers above, and to compound matters, my config.txt is apparently newer than that posted by @andrew-g-za. After some experimentation, I found that if I comment out the lines towards the end (as shown below) I was able to achieve a 1920x1080 resolution with my remote headless connection.

    # Enable DRM VC4 V3D driver on top of the dispmanx display stack


I want to thank @Luis Augusto Libório and @breversa for their contributions to this solution. Also, I beg to differ with @David G over his comment:

If you are using a true HEADLESS VNC, then nothing in config.txt will do a damn thing.

as those of you facing the same problem that I had will probably attest once you try this fix.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.