5.4 X11 ConfigurationContributed by Christopher Shumway.5.4.1 Before StartingBefore configuration of X11 the following information about the target system is needed:
The specifications for the monitor are used by X11 to determine the resolution and refresh rate to run at. These specifications can usually be obtained from the documentation that came with the monitor or from the manufacturer's website. There are two ranges of numbers that are needed, the horizontal scan rate and the vertical synchronization rate. The video adapter's chipset defines what driver module X11 uses to talk to the graphics hardware. With most chipsets, this can be automatically determined, but it is still useful to know in case the automatic detection does not work correctly. Video memory on the graphic adapter determines the resolution and color depth which the system can run at. This is important to know so the user knows the limitations of the system. 5.4.2 Configuring X11Configuration of X11 is a multi-step process. The first step is to build an initial configuration file. As the super user, simply run: # Xorg -configure In the case of XFree86 type: # XFree86 -configure This will generate an X11 configuration skeleton file in the /root directory called xorg.conf.new (whether you su(1) or do a direct login affects the inherited supervisor $HOME directory variable). For XFree86, this configuration file is called XF86Config.new. The X11 program will attempt to probe the graphics hardware on the system and write a configuration file to load the proper drivers for the detected hardware on the target system. The next step is to test the existing configuration to verify that Xorg can work with the graphics hardware on the target system. To perform this task, type: # Xorg -config xorg.conf.new XFree86 users will type: # XFree86 -xf86config XF86Config.new If a black and grey grid and an X mouse cursor appear, the configuration was successful. To exit the test, just press Ctrl+Alt+Backspace simultaneously.
Next, tune the xorg.conf.new (or XF86Config.new if you are running XFree86) configuration file to taste. Open the file in a text editor such as emacs(1) or ee(1). First, add the frequencies for the target system's monitor. These are usually expressed as a horizontal and vertical synchronization rate. These values are added to the xorg.conf.new file under the "Monitor" section:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30-107
VertRefresh 48-120
EndSection
The HorizSync and VertRefresh keywords may be missing in the configuration file. If they are, they need to be added, with the correct horizontal synchronization rate placed after the HorizSync keyword and the vertical synchronization rate after the VertRefresh keyword. In the example above the target monitor's rates were entered. X allows DPMS (Energy Star) features to be used with capable monitors. The xset(1) program controls the time-outs and can force standby, suspend, or off modes. If you wish to enable DPMS features for your monitor, you must add the following line to the monitor section:
Option "DPMS"
While the xorg.conf.new (or XF86Config.new) configuration file is still open in an editor, select the default resolution and color depth desired. This is defined in the "Screen" section:
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
EndSection
The DefaultDepth keyword describes the color depth to run at
by default. This can be overridden with the Finally, write the configuration file and test it using the test mode given above.
If all is well, the configuration file needs to be installed in a common location where Xorg(1) (or XFree86(1)) can find it. This is typically /etc/X11/xorg.conf or /usr/X11R6/etc/X11/xorg.conf (for XFree86 it is called /etc/X11/XF86Config or /usr/X11R6/etc/X11/XF86Config). # cp xorg.conf.new /etc/X11/xorg.conf For XFree86: # cp XF86Config.new /etc/X11/XF86Config The X11 configuration process is now complete. In order to start XFree86 4.X with startx(1), install the x11/wrapper port. Xorg already includes the wrapper code and does not require the installation of the wrapper port. The X11 server may also be started with the use of xdm(1).
5.4.3 Advanced Configuration Topics5.4.3.1 Configuration with Intel® i810 Graphics ChipsetsConfiguration with Intel® i810 integrated chipsets requires the agpgart AGP programming interface for X11 to drive the card. The agp(4) driver is in the GENERIC kernel since releases 4.8-RELEASE and 5.0-RELEASE. On prior releases, you will have to add the following line: device agp in your kernel configuration file and rebuild a new kernel. Instead, you may want to load the agp.ko kernel module automatically with the loader(8) at boot time. For that, simply add this line to /boot/loader.conf: agp_load="YES" Next, if you are running FreeBSD 4.X or earlier, a device node needs to be created for the programming interface. To create the AGP device node, run MAKEDEV(8) in the /dev directory: # cd /dev # sh MAKEDEV agpgart
This will allow configuration of the hardware as any other graphics board. Note on systems without the agp(4) driver compiled in the kernel, trying to load the module with kldload(8) will not work. This driver has to be in the kernel at boot time through being compiled in or using /boot/loader.conf. If you are using XFree86 4.1.0 (or later) and messages about unresolved symbols like fbPictureInit appear, try adding the following line after Driver "i810" in the X11 configuration file: Option "NoDDC" This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/. For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>. |