Skip to content

Instantly share code, notes, and snippets.

@dchapkine
Created November 16, 2016 13:30
Show Gist options
  • Save dchapkine/d6432be27f001c4dc0d03d645f141a8d to your computer and use it in GitHub Desktop.
Save dchapkine/d6432be27f001c4dc0d03d645f141a8d to your computer and use it in GitHub Desktop.
Add custom 16/9 resolution ubuntu 14.04/16.04
## generate modeline
```
cvt 1600 900 60
```
outputs:
```
Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
```
## apply modeline
sudo xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
## add resolution
sudo xrandr --addmode eDP1 1600x900_60.00
Instead of eDP1 you may want to put something else.
To get list of connected display IDs:
```
xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/"
```
## set a previously specified resolution
xrandr -s 1600x900_60.00
@almino
Copy link

almino commented Jun 15, 2017

Thanks! It worked on my Ubuntu 16.04.2 LTS 64-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment