Setting the Screen Resolution of your Raspberry Pi

Learn how to set the screen resolution of your Raspberry Pi using the terminal and desktop interface.

Raspberry Pi Change Screen Resolution

Even though the Raspberry Pi tries to automatically work out the best resolution to use for a screen, this isn’t always a perfect science.

Displays can sometimes provide weird information back to the device that makes it difficult to work out the correct resolution.

With this guide, we will be showing you how you can manually set the resolution of your Raspberry Pi.

Setting the resolution can be done through both the desktop interface and the terminal.

Using the terminal, you will be shown how to use the Raspberry Pi configuration tool as well as how to modify the /boot/config.txt file directly.

Equipment List

Here is a list of the equipment we recommend for this guide on setting the screen resolution of your Raspberry Pi.

Recommended

Raspberry Pi 1, 2, 3 or 4

Micro SD Card

Power Supply

Ethernet Cord or WiFi dongle (The Pi 3 and 4 has WiFi inbuilt)

Optional

Raspberry Pi Case

We tested this guide on the Raspberry Pi 3 and the Raspberry Pi 4 using the latest version of Raspbian Buster.

If you are not using Raspbian Buster, try upgrading to Buster by using our guide.

Changing the Screen Resolution using the Desktop

In this section we are going to show you how to set the resolution of the screen using the desktop utilities.

1. While on the desktop interface of your Raspberry Pi, click the icon in the top-left hand corner of the screen.

Clicking this icon will bring up the start menu.

Start Menu on the Pi

2. Within the start menu, hover over “Preferences“.

Then click “Screen Configuration” to load the tool that we are after.

Changing the Screen Resolution

3. With the tool loaded on our Raspberry  Pi, we can use it to change the resolution.

First, you need to right-click the display that you want to modify the resolution of (1.).

Next, hover over “Resolution” (2.).

Hovering over this will show you a selection of resolutions you can set for this current display. To select a resolution, click the one you want (3.)

Once you have chosen the resolution that you wish to use, you need to apply it by clicking the green tick button (4.)

Raspberry Pi Screen Confiuration Tool Resolution

4. To confirm this change, you will need to click the “OK” button within 10 seconds.

This timer helps when you make a change that your screen doesn’t like. If you run into issues, wait 10 seconds for the settings to automatically revert.

Confirm Pi Screen Resolution Change

Changing the Screen Resolution using the Terminal

In this section, we will be showing you two different ways of setting the screen resolution for your Raspberry Pi using the terminal.

The first of these methods rely on the Raspberry Pi Configuration Tool. The second method directly modifies the /boot/config.txt file.

Using the raspi-config Tool to Change the Resolution

1. To begin, open up the raspi-config tool by running the following command.

sudo raspi-config

2. Within the configuration tool, use the arrow keys to scroll down to 7 Advanced Options.

Once selected, press the ENTER key to open the options page.

raspi-config Advanced Options

3. Now that we are in the “Advanced Options” settings page, we need to select the A5 Resolution option.

With the option selected, press the ENTER key to open the page.

raspi-config a5 Resolution Page

3. Here, you can select the resolution you want your Raspberry Pi to use.

Be sure that you select a resolution that your monitor can handle; otherwise it will not work correctly.

Changing screen resolution using raspi-config

4. With a resolution selected, you can now exit out of the tool by pressing ESC.

When you go to exit the tool, you will be asked to restart your Raspberry Pi. Select “<Yes>” to restart your Pi and use the new resolution.

Reboot to confirm resolution change

Once you Raspberry Pi has finished restarting, the device should now be using the resolution that you set.

If, for some reason, your screen will no longer display anything, try holding the SHIFT key during startup to revert to the default settings.

Modifying the Boot Configuration to Set the Resolution

It is also possible to set the resolution of your Raspberry Pi without using the desktop interface or the raspi-config tool.

To do this, we will need to modify the config.txt file located in the /boot/ folder. You can edit this file directly on the SD card if you don’t have easy terminal access.

Please note that this section can be a little tricky as there is much more to take in.

1. Begin by modifying the /boot/config.txt file.

If you are doing this on your Raspberry Pi, you can run the following command.

sudo nano /boot/config.txt

2. Next, you must work out if you want to use the CEA or DMT HDMI groups.

CEA stands for Consumer Electronics Association and is the display standard that is typically used on a TV.

This CEA HDMI  group is represented by the number 1.

DMT stands for Display Monitor Timings and is the standard that is typically used by monitors.

The DMT HDMI group is represented by the number 2.

Depending on which one you use will dictate the settings you use in the next step.

Within this file, find and replace the following line.

Find

#hdmi_group=

Replace with
Use the replacement for the HDMI group that you intend to use. If you are unsure, you can see the supported resolutions in the tables below.
For the CEA Group

hdmi_group=1

For the DMT Group

hdmi_group=2

3. With the HDMI group chosen, we need to select the resolution.

We do this by modifying the hdmi_mode variable in the config file.

Below we have a trimmed down table showing some of the more used resolution settings for the Raspberry Pi.

If you want to view the full hdmi_mode table, then view the official Raspberry Pi Video documentation.

Use this table to find the “hdmi_mode” value for your resolution that is required for the next step.

CEA Display Resoluton Modes

hdmi_modeResolutionAspect RatioRefresh RateNotes
1640×4804:360hz
2720×4804:360hz
41280×72016:960hz
161920×108016:960hz
161920×108016:960hz
161920×108016:960hz
953840×216016:930hzRaspberry Pi 4 Only. Use this when dealing with two 4k displays.
973840×216016:960hzRaspberry Pi 4 Only. To use this hdmi_enable_4kp60=1 must be set in /boot/config.txt.

DMT Display Resoluton Modes

hdmi_modeResolutionAspect RatioRefresh Rate
2480p4:360hz
9800×6004:360hz
161024×7684:360hz
851280×72016:960hz
351280×10245:460hz
511600×12004:360hz
821920×108016:960hz

4. Once you have found the hdmi_mode number for your resolution, we can now go ahead and set it in the boot configuration file.

Find

#hdmi_mode=

Replace with
Make sure that you replace [YOURHDMIMODE] with the number you found using our tables above.

hdmi_mode=[YOURHDMIMODE]

6. Once you have set the HDMI mode and group, we can now save the file by pressing CTRL + X, then Y, followed by the ENTER key.

7. Now to apply the new resolution to your Raspberry Pi, you need to restart it using the command below.

sudo reboot

7. If for some reason your display stops working after the change you can try holding the SHIFT key during startup.

Using this key will make the Raspberry Pi ignore our boot configuration file and load up with the default settings.

At this point in the guide, you should now have successfully managed to change the resolution on your Raspberry Pi.

If you have run into any issues with this guide, feel free to drop a comment below.

2 Comments

  1. Avatar for Will
    Will on

    This looks to be a typo:

    “Replace with
    Make sure that you replace [YOURHDMIMODE] with the number you found using our tables above.

    hdmi_group=[YOURHDMIMODE]”

    it’d be “hdmi_mode=[YOURHDMIMODE]” not

    1. Avatar for Emmet
      Emmet on Editor

      Hi Will,

      Thank you for pointing out that typo.

      I have now corrected that in the tutorial.

      Cheers,
      Emmet

Leave a Reply

Your email address will not be published. Required fields are marked *