Archives For November 30, 1999

This tutorial ONLY works for Ubuntu on classic Xorg. Since Ubuntu 22.04, it uses Wayland as default, See another way works on both Xorg and Wayland.

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
UPDATE: For Ubuntu 17.10 Wayland, run xhost si:localuser:root command first in the terminal window to avoid sudo failure “No protocol specified Can’t open display 0:”

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.

notebook screen resolutions

Want to change your Linux notebook desktop to an unsupported resolution? Well, there’s a small Nautilus script called newrez. It provides an graphical interface and lets your type in a resolution even higher than your display’s physical dimensions!

Newrez does NOT “over-drive” the actual hardware. Instead, it defines a higher-resolution display on the netbook’s VGA port, and scales it to the LCD.

You are not restricted to “standard” resolutions. Values like 1100×730 or 1350×900 or even 1400×700 will work just fine (and a few-pixel adjustment automatically applied if needed). Setting to ‘default’ will return everything back to normal.

set-new-screen-resolution

This script can also be run directly from the command line, as in “newrez 1280×800” or “newrez default”. This makes it a simple matter to switch to create scripts or icons that set your most common resolutions, or to include resolution changes into other scripts or launchers.

NOTE: At present, this will not work if you use the vendor-supplied Nvidia or ATI driver.

If the laptop lid is closed and re-opened, you MAY find the the mouse is constrained to an area the size of the default resolution. This is caused by xrandr. Re-execute newrez to fix this.

Download at this page