Add/Change/Set the custom resolution of your display using xrandr on Ubuntu 18.04 — {In a minute}

Abhishek Raut
Apr 24, 2019 · 2 min read

In case your monitor’s supported resolution is not properly detected or if you want a custom resolution to be used, follow the provided instructions:

Say you wish to have a resolution of 1920*1080 and a refresh rate of 60.

1. Open terminal via Ctrl+Alt+T or search for “Terminal”. Run following command in the terminal:

xrandr
Image for post
Image for post

As shown above, it outputs current and available screen resolutions. Note down the display device name, in my case, it’s ‘Virtual1’.

2. Run command to calculate CVT with desired resolution (supported):

cvt 1920 1080 60

Replace 1920 1080 60 (1920X1080 in my case) in the command to the desired screen resolution.

Image for post
Image for post

3. Copy the text starting from the double quotes till the end of the full output(words with underline), and run command to add new mode:

sudo xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1088 1120 -hsync +vsync

4. Now add the newly created mode for your display device:

sudo xrandr --addmode Virtual1 "1920x1080_60.00"

Note: Match Display Device name(shown above as bold) as seen in the first step.

5. Finally, apply the new resolution in the Display settings.

6. (Optional) To keep this screen resolution permanent, edit .profile file.

Run the command:

gedit ~/.profile

Append commands in steps 3 and 4 to the file( see below screenshot).

ENJOY!

Source:

Follow Me:

https://twitter.com/AbhiXpert

https://github.com/araut1

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store