FotoKruse

Photo galleries & photography related articles

When accessing your Raspberry Pi 4 remotely via a VNC viewer or Teamviewer for the first time it is very likely the screen size shown has a very small resolution (320×200) and hence is unusable. How to set the remote connection screen resolution for a Raspberry Pi 4?

Perform the following steps:

  1. Connect to your Raspberry Pi via a SSH connection (for example via Windows by using PuTTY) and login.
  2. Execute the following command:
    sudo nano /boot/config.txt

    This will open the nano file editor with the Raspberry Pi 4 OS configuration file.

  3. Find the following 5 lines and if uncomment these if they are commented:
    #framebuffer_width=1280
    #framebuffer_height=720
    
    #hdmi_force_hotplug=1
    
    #hdmi_group=1
    #hdmi_mode=1
    
  4. Set the framebuffer_width and framebuffer_height to your required resolution
  5. Set hdmi_group and hdmi_mode settings to the values shown below:
    hdmi_group=2
    hdmi_mode=16
  6. Ensure that the following two settings are commented by placing a # in front of them.
    # Enable DRM VC4 V3D driver
    dtoverlay=vc4-kms-v3d
    max_framebuffers=2
    
  7. After we complete all the changes, press Ctrl+O to write the changes, and then press Ctrl+X to exit.
  8. Reboot the Raspberry Pi 4 by entering the command:
    sudo reboot

When connected again via VNC viewer or Teamviewer the resolution should be the same as set above.