Linux Xrandr custom resolution
Some monitors claim to support less resolutions than they do, or sometimes your video card might be broken and incorrectly detect the monitor data. In such a situation, xrandr will not show an entry for the desired resolution and you have to add it yourself.
To do so, you first have to create a new “mode” using the xrandr --newmode
function. To get the timings, you can use the gtf utility. Together, a command might look like this:
`gtf 1600 1200 60|grep Modeline|sed -e's|Modeline|xrandr --newmode|'`
Then you can assign this mode to your monitor, like this:
xrandr --addmode VGA '"1600x1200_60.00"'
Remember to put the double quotes, this is because gtf outputs the mode name in quotes. If you don’t like this, use a different way to parse the gtf output.