autoconfiguring X (was Re: FreeBSD Most wanted)

Jeremy C. Reed reed at reedmedia.net
Fri Mar 5 10:01:36 PST 2004


On Fri, 5 Mar 2004, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:

> "Jeremy C. Reed" <reed at reedmedia.net> writes:
> > Does XFree86 4.4 include comprehensive Monitor databases (like
> > hwdata-knoppix) and automatically use the correct VertRefresh and
> > HorizSync for your monitor?
>
> Modern monitors (since about 1997) have DDC which allows XFree86 to
> get that information straight from the horse's mouth.  Works great in
> my experience, except for some laptops which don't report the LCD
> panel geometry correctly (Latitude D800 comes to mind).

I will have to look closer at the DDC specification. I don't recall it
giving this vertical refresh and horizontal sync information.

If it did, I'd wonder why kudzu (and anaconda and others) using ddc and
ddcprobe also use a MonitorsDB database that defines the vertical refresh
and horizontal sync information. Maybe some monitors do give the
information and some don't.

I think I found answer .... mentioned below.

It would be good if official XFree86 would provide this database and auto
configure this too.

> > Does XFree86 4.4 configuration automatically include the best (common)
> > resolutions and modes?
>
> The only real problem I've had is that XFree86 doesn't always pick the
> highest vertical refresh frequency supported by the monitor.  That
> should be easy to fix.

I am wondering how this is an easy fix.

>  For all I know, it might already be fixed in
> 4.4 - I still run 4.3, and when I run into this I just add a bogus
> VertRefresh line claiming that the monitor doesn't support anything
> below 75 Hz.

In the many times that I have used "XFree86 -configure" it seems like I
always have to manually set the VertRefresh and HorizSync.

The text-based xf86config never auto-detects that.

Now I see that XFree86 4.2.0 (not changed in 4.3.0 or 4.4.0)
xfree/xc/programs/Xserver/hw/xfree86/xf86cfg/TODO (2001/07/04)
says:

 o Write code to use a Monitors database, either update the old Monitors
   file or use RedHat MonitorsDB.
         Chris Morgan is writting code to use MonitorsDB.
   If xf86cfg could be changed to ddcprobe (in all supported platforms),
   it would be even be a better solution than using a database.

So I guess that means that ddcprobe can provide the information. It just
is not done yet.

I do see some 4.4.0 code (like
xc/programs/Xserver/hw/xfree86/drivers/via/via_driver.c) that does set the
ranges.

But I don't see any code that actually defines VertRefresh or HorizSync
from probed settings.

xf86printMonitorSection() in parser/Monitor.c does output information (but
I think that is manually set).

I have also looked at getconfig a little, but don't see any
comprehensive .cfg files included.

> > Beginners don't want to manually edit their XF86Config. (Defaulting to
> > depth 8 and the common 640x480 is not good enough.)
>
> have you actually tried 'X -configure'?

Yes, many times. As a consultant and as an instructor teaching on a wide
variety of systems, I have had the opportunity to use "XFree86 -configure"
on maybe a hundred different systems this past couple years. It is not
perfect and not as good as using the kudzu (or similar methods).

I have a lot to learn about X, but I have spent some time with its code. I
packaged X for pkgsrc (my personal collection) so I could use under Linux.
I also am a maintainer for pkgsrc's official XFree86 packages. And I am a
part-time xlibs developer (but haven't started with their "server" code
yet.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/



More information about the freebsd-advocacy mailing list