Add a section on configuring XFree86 4.x

Submitted by:   Christopher Chumway <cshumway@FreeBSD.org> and
                Chern Lee <chern.lee@windriver.com>
This commit is contained in:
Murray Stokely 2001-07-11 16:07:50 +00:00
parent 53ea803f4b
commit fb7e08ee51
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9844

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.22 2001/06/28 21:17:14 tom Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.23 2001/07/06 13:03:06 dd Exp $
-->
<chapter id="x11">
@ -1316,6 +1316,216 @@ For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.</scree
</sect2>
</sect1>
<sect1 id="x11-4">
<title>XFree86 4.x Configuration</title>
<sect2>
<title>Introduction</title>
<para>This chapter will introduce the steps necessary to install
and configure the XFree86 X Windows System under FreeBSD.
Once your server is installed and configured properly. you can
read <xref linkend="x11-wm"> to setup your desktop
environment.</para>
<indexterm><primary>XFree86 4.x</primary></indexterm>
<indexterm><primary>XFree86</primary></indexterm>
</sect2>
<sect2>
<title>Before You Start</title>
<para>Before the user is to start configuration of XFree86-4,
the the following information will need to be known about the
target system:</para>
<itemizedlist>
<listitem><para>Monitor specifications</para></listitem>
<listitem><para>Video Adapter chipset</para></listitem>
<listitem><para>Video Adapter memory</para></listitem>
</itemizedlist>
<indexterm><primary>horizontal scan rate</primary></indexterm>
<indexterm><primary>vertical scan rate</primary></indexterm>
<para>The specifications for the target system's monitor are
used by XFree86 to determine the resolution and refresh rate
to run at. These specifications can usually be obtained from
the documentation that came with your 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.</para>
<para>The video adapter's chipset defines what driver module
XFree86 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 doesn't work
correctly.</para>
<para>Video memory on the graphic adapter determines the
resolution and color depth the target system can run at. This
is important to know so the user knows the limitations of the
target system.</para>
</sect2>
<sect2>
<title>Installing XFree86 4.x software</title>
<para>XFree86 4 can be installed using the FreeBSD ports system
or using &man.pkg.add.1;. If the user is building XFree86-4
from source and has USA_RESIDENT set in
<filename>/etc/make.conf</filename>, the user may first have to
fetch <filename>Wraphelp.c</filename> if XDM-AUTHORIZATION-1
support is desired.</para>
</sect2>
<sect2>
<title>Configuring XFree86 4.x</title>
<para>Configuration of XFree86 4.1 is a several step process.
The first step is to build an initial configuration file with
the configure option to XFree86. As the super user, simply run:</para>
<screen>&prompt.root; XFree86 -configure</screen>
<para>This will generate a skeleton XFree86 configuration file
in the current working directory called XF86Config.new. The
XFree86 program will attempt to probe the graphics hardware on
the system and will write a configuration file to load the
proper drivers for the detected hardware on the target system.</para>
<para>The next step is to test the currently existing
configuration to verify that XFree86 can work with the graphics
hardware on the target system. To preform this task, the user
needs to run:</para>
<screen>&prompt.root; XFree86 -xf86config XF86Config.new</screen>
<para>If the user is presented with a black and grey grid and an
X mouse cursor, then the configuration was successful. To exit
the test, just press ctrl, alt and backspace simultaneously.</para>
<indexterm><primary>XFree86 4 Tuning</primary></indexterm>
<para>Next, the user needs to tune the
<filename>XF86Config.new</filename> configuration file to their
personal taste. Open up the file in a text editor such as
&man.emacs.1; or &man.ee.1;. The first thing the user will want to
do is 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
<filename>XF86Config.new</filename> file under the "Monitor"
section as such:</para>
<programlisting>Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Horizsync 30-107
VertRefresh 48-120
EndSection</programlisting>
<para>The <varname>Horizsync</varname> and
<varname>VertRefresh</varname> keywords may not exist in the
user's configuration file. If they do not, they need to be
added, with the correct horizontal synchronization rate placed
after the <varname>Horizsync</varname> keyword and the vertical
synchronization rate after the <varname>VertRefresh</varname>
keyword. In the example above the target monitor's rates where
entered.</para>
<indexterm><primary>XF86Config</primary></indexterm>
<para>While the <filename>XF86Config.new</filename>
configuration file is still open in an editor, next the user
needs to select what the default resolution and color depth is
desired. This is defined in the <literal>Screen</literal>
section.</para>
<programlisting>Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultColorDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection</programlisting>
<para>The <varname>DefaultColorDepth</varname> keyword describes
the color depth the user wishes to run at by default. This can
be overridden with the <command>-bpp</command> command line
switch to &man.XFree86.1;. The Modes keyword describes the
resolution the user wishes to run at for the given color depth.
In the example above, the default color depth is twenty four
bits per pixel. At this color depth, the accepted resolution is
one thousand twenty four pixels by seven hundred and sixty eight
pixels.</para>
<para>If a user wants to run at a resolution of one thousand
twenty four pixels by seven hundred sixty eight pixels at twenty
four bits per pixel, then the user needs to add the
<varname>DefaultColorDepth</varname> keyword with the value of
twenty four, and add to the <varname>"Display"</varname>
subsection with the desired Depth the Modes keyword with the
resolution the user wishes to run at. Note that only VESA
standard modes are supported as defined by the target system's
graphics hardware.</para>
<para>Finally, the user can write out the configuration file and
test it using the test mode given above. If all is well, then
the configuration file needs to be installed in a common
location where &man.XFree86.1; can source it in the future.
This is typically <filename>/etc/X11/XF86Config</filename> or
<filename>/usr/X11R6/etc/X11/XF86Config</filename>.</para>
<screen>&prompt.root; cp XF86Config.new /etc/X11/XF86Config</screen>
<para>Once the configuration file has been placed in a common
location, XFree86 can then be used through &man.xdm.1;. In
order to use &man.startx.1; the user will have to install the
<filename>X11/wrapper</filename> port.</para>
</sect2>
<sect2>
<title>Advanced Configuration Topics</title>
<sect3>
<title>Configuration with Intel i810 graphics chipsets</title>
<indexterm><primary>Intel i810 graphic chipset</primary></indexterm>
<para>Configuration with Intel i810 integrated chipsets
requires the agpgart AGP programming interface for XFree86 to
be able to drive the card. To enable the agpgart programming
interface, the <filename>agp.ko</filename> kernel loadable
module needs to be loaded into the kernel with
&man.kldload.8;. This can be done automatically with the
&man.loader.8;. Simply add this line to
<filename>/boot/loader.conf</filename> to have the loader load
agp.ko at boot time:</para>
<programlisting>agp_load="YES"</programlisting>
<para>Next, a device node needs to be created for the
programming interface. To create the agp device node, run
&man.MAKEDEV.8; in the <filename>/dev</filename> directory as
such:</para>
<screen>&prompt.root; cd /dev
&prompt.root; sh MAKEDEV agpgart</screen>
<para>This will allow the user to configure the graphics
hardware as any other graphics board.</para>
</sect3>
</sect2>
</sect1>
<sect1 id="x-fonts">
<title>Using Fonts in XFree86</title>
@ -1873,6 +2083,7 @@ esac</screen>
</sect3>
</sect2>
</sect1>
</chapter>
<!--