xorg.conf: to hardcode or not

Warren Block wblock at wonkity.com
Mon Feb 9 07:00:00 PST 2009


On Mon, 9 Feb 2009, Andriy Gapon wrote:

> For the past several years I've been a big fan of minimalistic
> xorg.conf. Everything that X could auto-detect I left out of xorg.conf.

I agree with that, and minimalistic config files in general.

> Works great most of the time.
> But there are some edge cases.
> If X gets restarted (e.g. a machine gets reboot) when a monitor is
> switched off, then X can not possibly guess anything about it. And it
> doesn't have smarts/options to re-use anything auto-detected on a
> previous start. So it uses some (supposedly safe) fallback mode.

Explicitly setting layout options like PreferredMode and Position in 
Monitor sections is practically necessary if you have multiple monitors, 
or ones which may not be on when X starts.  Specifying which monitor is 
attached to which port in the Driver section is also useful.

> When this can be bad:
> 1. when you use x11vnc from a remote place;
> 2. when X auto-detection goes too crazy without a monitor;
>
> I believe that I had 2 happening on me this morning.
> My machine was restarted while I was away and a monitor was switched
> off. When I came back and turned on the monitor I was greeted with
> 1024x768 resolution instead of usual 1680x1050 and, what is much worse,
> with "bad" text consoles. When I switched to VT1-VT8 the monitor would
> just go power-saving mode. Restarting X server helped it, but text
> consoles remained the same. Reboot helped (of course).

That might be FreeBSD-specific, or could be an X driver problem.  A 
motherboard with built-in ProSavage video used to have trouble switching 
back to text mode.  The new xorg-7.4 has fixed that.

> So I am now thinking about reverting to hard-coding monitor parameters
> in xorg.conf. OTOH, I am not 100% user that that would really prevent
> too much auto-guessing.

Unusual configurations need more information in xorg.conf to override 
defaults.  It's not a bad thing, just a way to lock X down to the right 
combination of possibilities.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-x11 mailing list