How to Set A Custom Screen Resolution in Ubuntu Desktop

April 16, 2017 — 16 Comments

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.

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.

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.

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.

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.

Finally Apply the new resolution in the Display settings:

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 last 2 commands to the end, commands in step 3 and 4, and save the file.

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

16 responses to How to Set A Custom Screen Resolution in Ubuntu Desktop

  1. A very cool tip! I now can use a notebook with physical 1280 x 800 resolution with 1638 x 1024 :-) Thank you!

  2. Bruno Paulino May 12, 2017 at 7:22 pm

    I’m getting the following error message. Any chance on helping me make it right?

    $ sudo xrandr –addmode eDP1 “1600x900_60.00”
    X Error of failed request: BadMatch (invalid parameter attributes)
    Major opcode of failed request: 140 (RANDR)
    Minor opcode of failed request: 18 (RRAddOutputMode)
    Serial number of failed request: 45
    Current serial number in output stream: 46

  3. After changing your screen resolution, it’s xy alignment may overlap or gap your other screens.

    Move them around, based on left,top origin 0,0

    xrandr --output eDP-1 --pos 1600x0

  4. Not working for me

  5. Can we do this for 2560X1080 for display on LG Ultrawide monitor

  6. Perfect!!!

    Good article

  7. Henrique Soares Barbosa July 11, 2017 at 1:48 am

    perfect for me using 1680×1050 because this option was not available in display choices; TKS

  8. Oliver Collyer July 12, 2017 at 1:03 pm

    Nice to see this technique laid out neatly – you don’t need to place the “cvt” command in your profile file though.

    That is only used to give you the format for placing in the –newmode xrandr command.

    It won’t do any harm there, but it won’t actually do anything :)

  9. I get an error when doing this command:

    sudo xrandr –newmode “1920x1080_60.00” 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

    X Error of failed request: BadName (named color or font does not exist)
    Major opcode of failed request: 140 (RANDR)
    Minor opcode of failed request: 16 (RRCreateMode)
    Serial number of failed request: 41
    Current serial number in output stream: 41

  10. Thanks a lot Ji !!!

  11. in ~/.profile file enough add 2 last commands. (cvt is only show mode, not configuration)

  12. Thank you – not only is your English perfect, your guidance on screen resolution is also clear and precise. I’ve been trying to sort this problem out for weeks. Excellent…

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*