Skip to content

Instantly share code, notes, and snippets.

@themindfulcoder
Created April 1, 2018 09:47
Show Gist options
  • Save themindfulcoder/c1c6e7aaf94fd2607e4db312779b64bb to your computer and use it in GitHub Desktop.
Save themindfulcoder/c1c6e7aaf94fd2607e4db312779b64bb to your computer and use it in GitHub Desktop.
How to add a custom resolution to xrandr

Find the maximum resolution

xrandr | grep maximum

Use gtf to create a mode line

gtf 1440 900 59.9

Copy the mode line from gtf and create the new mode in xrandr

xrandr --newmode <paste gtf modeline here>
e.g.
xrandr --newmode "1440x900_59.90"  106.29  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

Add this newly added mode to the desired output (VGA/LVDS etc)

xrandr --addmode VGA 1440x900_59.90

Select the new mode

xrandr --output VGA --mode 1440x900_59.90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment