Skip to content

Instantly share code, notes, and snippets.

@hectorcanto
Last active March 27, 2018 09:02
Show Gist options
  • Save hectorcanto/ed108c233c2bf9f3610d6c62c34389a0 to your computer and use it in GitHub Desktop.
Save hectorcanto/ed108c233c2bf9f3610d6c62c34389a0 to your computer and use it in GitHub Desktop.
How to create and persist a custom resolution in Ubuntu 16.
# Based on http://ubuntuhandbook.org/index.php/2017/04/custom-screen-resolution-ubuntu-desktop/
xrandr
# eDP-1, take note of the device you want to modify
cvt 1408x792 # True 16:9 resolution: https://pacoup.com/2011/06/12/list-of-true-169-resolutions/
# Modeline "1408x792_60.00" 90.75 1408 1480 1624 1840 792 795 800 823 -hsync +vsync
sudo xrandr --newmode "1408x792_60.00" 90.75 1408 1480 1624 1840 792 795 800 823 -hsync +vsync
sudo xrandr --addmode eDP-1 "1408x792_60.00"
echo xrandr --newmode "1408x792_60.00" 90.75 1408 1480 1624 1840 792 795 800 823 -hsync +vsync >> ~/.profile
echo xrandr --addmode eDP-1 "1408x792_60.00" >> ~/.profile
# Open Displays and choose the new custom resolution
@hectorcanto
Copy link
Author

xrandr will show available devices and their posible resolutions, take note of the laptop name, in my case eDP-1

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