How to Set A Custom Screen Resolution in Ubuntu Desktop

April 16, 2017 — 32 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:


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

32 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…

  13. Fantastic tutorial, it worked “out of the box”. Thanks a lot! :)

  14. fixitmanarizona August 29, 2017 at 12:35 am

    Does not work at all. Xrander not found. Whye the HELL do you have to do these things in some little DOS box in Linux? Can’t they catch up with other operating systems where you do not have to use this little MS DOS box, and set things in a GUI?
    And it should be forgiving of your spelling and or typing. I typed Xrander and it gave an error! Unbelievable. It should work spelled either way.
    Then, the thing does not say anything about edp-1 so that does not work. I don’t know what else would??? I got this…..
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 16384 x 16384
    HDMI-0 disconnected (normal left inverted right x axis y axis)
    DVI-0 disconnected (normal left inverted right x axis y axis)
    VGA-0 connected 1024×768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
    1024×768 60.00*
    800×600 60.32 56.25
    848×480 60.00
    640×480 59.94
    fixitman2@fixitman2-Linux:~$ 1600 x 1200 / 75 Hz
    1600: command not found
    fixitman2@fixitman2-Linux:~$ cvt 1600 900
    # 1600×900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz
    Modeline “1600x900_60.00” 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync…..
    THEN you notice, “command not found 1600! WHAT THE HELL??? Why would you have to put in ANOTHER command? OK so then the cvt thing. ….

    xrander –newmode “1600x900_60.00” 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
    No command ‘xrander’ found, did you mean:
    Command ‘xrandr’ from package ‘x11-xserver-utils’ (main)
    xrander: command not found
    fixitman2@fixitman2-Linux:~$ sudo xrandr –newmode “1600x900_60.00” 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
    and AGAIN command not found. I HATE MS DOS!!!!…
    thern to top it all off I finally get this. ….
    xrandr –newmode “1600x900_60.00” 118.25 1600 1696 1856 2112 900 903 908 934 -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: 33
    Current serial number in output stream: 33
    fixitman2@fixitman2-Linux:~$ sudo xrandr –addmode eDP-1 “1600x900_60.00”
    xrandr: cannot find output “eDP-1″….
    AND it simply does not work. Can’t someone write a damn display thingy that you can click on the numbers you want, picking displays from a list (mine is a Dell UltraScan P1110 – CRT monitor – 21″… which last I checked Window XP had listed, and I used.) Nothing showing up, you cannot select anything from the dropdown. AND I REFUSE to get a new monitor, this one is much better than those flat screen crap ones they now sell with the stupid widescreen, which I never saw the need for! Also it’s native resolution is 1800X1440, which I can’t seem to find in the dropdown. It only wants to let me set some widescreen thing , 1024X768 OR the old fashioned 800X600 which Windows 95 used. I think Linux is about 20 years behind the times on this one.

  15. fixitmanarizona August 29, 2017 at 1:56 am

    OK after typing stuff in for like 2 hours, trying over and over and all kind of errors and stuff, it finally worked. Why does it have to be so hard? THEN I went to do the final steps with gedit and it is not installed! I guessed I could do the same with mousepad (since I’m on Xubuntu_) and I hope I got that right. mode is now 1280×1024 and for some reason it won’t run at 75 htz like the monitor manual says, it gets all wonky, so 60 htz it is. Oh and thank God for the old monitors buttons that set size and top to bottom height, etc. That was way too hard to figure out how to do with some obscure DOS code in a little box, I prefer physical buttons!!!
    Now to find where the color profiles are stored! OH WAIT I can set colors right on the monitor with BUTTONS unlike these new flat screen things where you can’t adjust anything at all without being some sort of genius programmer. Hell, can’t even find the “on” button on most of them, it’s on the back or side or something, I like it RIGHT on the FRONT labeled “ON” where you can see it!!!

  16. I solved my “X Error of failed request: BadMatch (invalid parameter attributes)”

    It seems that you can’t use xrandr with the nVidia proprietary driver. Getting back to the driver included in Ubuntu fixed the error for me.

    Moreover, my screen did not show proper resolution, and seems that you can not always depend on cvt and gtf. I got the working numbers by finding your device EDID and reading it by parse-edid.

  17. How can I do this… Increase my resolution by , ” (6) 1080p monitors”.?

  18. thank you, I always do that with my HP1740 screen but if you use wayland as your display server it will never work

  19. Genius! Thank you.

  20. Don’t even try. Not gonna change anything. You are gonna get nothing but error messages.

  21. This step-by-step much appreciated and worked for me.

    In the step xrandr –newmode … I received some errors, but per comments here I just ignored them and continued on with the steps.

  22. Thanks a lot. Was able to get this set in my vmware

  23. Hey everyone. I’m trying to change the resolution within 17.10 on a dell studio 1558 laptop to its native 1440×900. When trying to create the –newmode I get a: “No protocol specified Can’t open display 0:”

    Any ideas?

  24. Thank you soo much!
    Could you explain why that resolution wasn’t there initially? For me just one 16:9 resolution was there, ie 1920×1080.. all others were in 4:3..

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>