# xrandr --newmode



## elmarko1 (Jun 12, 2018)

hello,
Minor drama were my VGA monitor connected to a old broken display laptop will not display at the monitors resolution. With the old Xorg wasn't a drama but now I've upgraded to Freebsd 11, and let Xorg do its thing, it works but poor resolution. 
I've read and did what FreeBSD manual claims is correct.....eg
Boot loader.conf;

```
kern.vty=vt
kern.vt.fb.default_mode="1440x900"
kern.vt.fb.VGA-1="1440x900"
```

have /etc/X11 empty
and created /usr/local/etc/X11/xorgconf.d monitor0-freq.conf and screen-resoluton.conf
but to no avail.
so I resorted to xrandr and did

```
# gtf 1440 900 60
#xrandr --newmode "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync
# xrandr --addmode VGA1 "1440x900_60.00"
# xrandr --output VGA1 --mode "1440x900_60.00"
```
and it works....yay!
But after reboot....once again says my monitor is out of range and resorts to a crap resolution

What is the best way to set this up....just put this xrandr stuff in my boot loader ? or is there a better way less messy
Thankyou in advance
Elmarko


----------



## Minbari (Jun 12, 2018)

Keep the monitor freq and screen resolution files in /usr/local/etc/X11/xorg.conf.d and add the last line in .xinitrc.
In my particular case I'm using i3 as a window manager so I don't need the monitor freq and resolution files only the following line in .xinitrc: `xrandr -s 1600x900` and in i3 config: `exec --no-startup-id xrandr --output DP1 --mode 1920x1080 --right-of LVDS1`.


----------



## elmarko1 (Jun 13, 2018)

OK. I tried that, but as the resolution 1440x900 doesn't exist it won't work. Seems only to work if I add mode.
Never had trouble with the old xorg. Just this new one has me confused. It doesn't seem to do anything I add  in .xinitrc.
Anyway to you so much for helping.


----------



## elmarko1 (Jun 13, 2018)

I added the whole 

```
xrandr --newmode "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync
# xrandr --addmode VGA1 "1440x900_60.00"
# xrandr --output VGA1 --mode "1440x900_60.00"
```
to .xinitrc and it finally works but has me thinking this is not right way to do it. But thank you again Minbari at least you put me in the right direction to make it work.
Just seems weird I have to add mode every boot, strange.

Call this closed id say


----------

