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.
-
Open the Display Settings:
- Open the Activities overview and start typing "Displays."
- Click on "Displays" to open the panel.
-
Select Your Display:
- If you have multiple displays connected, select the display you want to modify in the preview area.
-
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.
- 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.
-
List Available Resolutions:
- Open a terminal and type
xrandr
to see a list of available resolutions and the active resolution marked with an asterisk.
- Open a terminal and type
-
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
) andRESOLUTION
with the desired resolution.
- To set a new resolution, use the following command:
-
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.
- 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
).
- Use options like
Adding a Custom Resolution
If the desired resolution is not available, you can add a custom resolution using xrandr
.
-
Calculate the Modeline:
- Open a terminal and run:
cvt RESOLUTION
For example:
cvt 1600 900
This will generate the modeline for the specified resolution.
- Open a terminal and run:
-
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.
- Copy the modeline from the output and add it using:
-
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.
- Apply the New Resolution:
- Finally, apply the new resolution in the Display Settings or using
xrandr
:xrandr --output eDP-1 --mode "1600x900_60.00"
- Finally, apply the new resolution in the Display Settings or using
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.
-
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.
- Open your
-
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 theman xorg.conf
for details.
- For a more robust solution, you can create an
Using ARandR for GUI Control
If you prefer a graphical interface for managing your display settings, you can use ARandR.
-
Install ARandR:
- Install ARandR using:
sudo apt install arandr
- Run ARandR by pressing the
Win
key and typing "arandr".
- Install ARandR using:
-
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.