How to Set A Custom Screen Resolution in Ubuntu Desktop

display-icon245-6-3085097

Your preferred screen resolution is not available in the Display settings? Well, here I’m going to show you how to add a custom screen resolution in Ubuntu 17.04 (Work on all current Ubuntu releases).

On my Ubuntu 17.04 Desktop, the default 1920X1080 (16:9) resolution is kinda high for me. Though there are options to scale for menu, title bars, and text, I prefer 1600X900 (16:9) which is available in Ubuntu 16.04 LTS by default.

screen-resolution-600x407-1-2859554

To get my screen resolution, I did the following steps:

1. Open terminal via Ctrl+Alt+T or by searching for “Terminal” from dash. When it opens, run command:

xrandr

It outputs current screen resolution as well as all available solutions. ALL I need here is the display device name, in my case, it’s eDP-1.

xranr-600x205-1-2994540

2. Run command to calculate VESA CVT mode lines by given resolution:

cvt 1600 900

Replace 1600 900 (1600X900 in my case) in the command to your desired screen resolution.

cvt-1600-900-600x107-1-1317540

3. Copy the Modeline (words with red underline, see previous picture), and run command to add new mode:

sudo xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync

NOTE the command section after --newmode are COPIED from previous step output.

xranr-newmode-600x113-1-2026331

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

sudo xrandr --addmode eDP-1 "1600x900_60.00"

Replace eDP-1 (see step1) and "1600x900_60.00" (Step 2 or 3) in the command.

add-mode-device-600x91-1-5616486

Finally Apply the new resolution in the Display settings:

new-resolution-600x408-1-3805779

IMPORTANT: To make Ubuntu remember the new created screen resolution at next start, you have to edit the .profile via command:

gedit ~/.profile

add the 3 lines to the end, commands in step 2, 3, 4, and save the file.

profile-new-resolution-600x363-1-1627573