How To Change The Screen Resolution In Ubuntu Tutorial

Changing the Screen Resolution in Ubuntu

Changing the screen resolution in Ubuntu is a straightforward process that can be accomplished through various methods, including graphical user interfaces and command-line tools. Here’s a detailed guide to help you adjust your screen resolution effectively.

Using the Display Settings

The most common way to change the screen resolution is through the Display Settings panel.

  1. Open the Display Settings:

    • Open the Activities overview and start typing "Displays."
    • Click on "Displays" to open the panel.
  2. Select Your Display:

    • If you have multiple displays connected, select the display you want to modify in the preview area.
  3. Choose Your Resolution:

  • Select the desired resolution from the drop-down list. Ensure you choose a resolution that matches your display's aspect ratio to avoid distortion.
  1. Apply and Save Changes:
    • Click "Apply" to test the new resolution. The new settings will be applied for 20 seconds before reverting back. If you are happy with the new settings, click "Keep Changes".

Using XRandR Command

For more advanced control or if the desired resolution is not available in the Display Settings, you can use the xrandr command.

  1. List Available Resolutions:

    • Open a terminal and type xrandr to see a list of available resolutions and the active resolution marked with an asterisk.
  2. Set a New Resolution:

    • To set a new resolution, use the following command:
      xrandr --output DISPLAY_NAME --mode RESOLUTION
      

      For example:

      xrandr --output DP-1 --mode 1680x1050
      

      Replace DISPLAY_NAME with your monitor's alias (e.g., DP-1, eDP-1) and RESOLUTION with the desired resolution.

  3. Set Refresh Rate:

  • You can also set the refresh rate using the --rate flag:
    xrandr --output DP-1 --mode 1680x1050 --rate 75
    

    This sets the refresh rate to 75 Hz.

  1. Arrange Multiple Displays:
    • Use options like --left-of, --right-of, --above, and --below to arrange multiple displays:
      xrandr --output DP-1 --left-of eDP-1
      

      This positions the external monitor (DP-1) to the left of the laptop screen (eDP-1).

Adding a Custom Resolution

If the desired resolution is not available, you can add a custom resolution using xrandr.

  1. Calculate the Modeline:

    • Open a terminal and run:
      cvt RESOLUTION
      

      For example:

      cvt 1600 900
      

      This will generate the modeline for the specified resolution.

  2. Add the New Mode:

    • Copy the modeline from the output and add it using:
      sudo xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
      

      Replace the values with those from your modeline output.

  3. Add the Mode to Your Display:

  • Add the new mode to your display:
    sudo xrandr --addmode eDP-1 "1600x900_60.00"
    

    Replace eDP-1 with your display's alias.

  1. Apply the New Resolution:
    • Finally, apply the new resolution in the Display Settings or using xrandr:
      xrandr --output eDP-1 --mode "1600x900_60.00"
      

Making Changes Persistent

Changes made using xrandr will not persist after a reboot. To make them persistent, you can add the commands to your .profile file or create an xorg.conf file.

  1. Edit .profile File:

    • Open your .profile file in a text editor:
      gedit ~/.profile
      
    • Add the xrandr commands at the end of the file and save it.
  2. Create xorg.conf File:

    • For a more robust solution, you can create an xorg.conf file. This method is more effective but requires more configuration. Refer to the man xorg.conf for details.

Using ARandR for GUI Control

If you prefer a graphical interface for managing your display settings, you can use ARandR.

  1. Install ARandR:

    • Install ARandR using:
      sudo apt install arandr
      
    • Run ARandR by pressing the Win key and typing "arandr".
  2. Configure Your Display:

    • Right-click on the display you want to modify and select "Resolutions" to choose from available resolutions. You can also save custom layouts using the "Layout" menu.

By following these steps, you can effectively change and customize your screen resolution in Ubuntu, ensuring optimal display settings for your needs.

Leave a Reply

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