You've probably completed the BLFS book's chapter on installing X and need to get it working. This guide is meant as a reference to getting it working with the least problems.
This guide will cover:
- setting up X
- selecting the correct driver
- testing X
- finalizing the setup
1. Setting up X
If you've gotten X completely installed now you need to set it up to work with your hardware. To begin the setup of X, as root run the following command from the console:
This will create a reference xorg.conf.new file in the root user folder.
2. Selecting the correct driver
Now that you have created the xorg.conf.new file, you can begin to set it up for your hardware.
Let's open xorg.conf.new up in a text editor, such as VIM.
Scroll down to the section marked as "Driver" and check for the entry marked as:
Code:
Section "Device"
Identifier "<name of manufacturer>"
Driver "<name of driver>"
The possible driver options for B/LFS are:
Code:
ati - AMD/ATI Radeon and later GPUs
cirrus - Qemu Virtual Video Server
fbdev - Xorg FrameBuffer Driver
intel - Intel 8x0 or later video driver (Does not support PowerVR GMA500 or GMA3600 chipsets.)
mach64 - ATI Rage Pro (driver is 2D only and unaccelerated.)
mga - Matrox G series graphics cards.
nouveau - Nvidia TNT or later video cards
openchrome - VIA Chrome series
r128 - ATI Rage 128 series.
savage - S3 Savage, ProSavage, and Twister series GPUs.
sis - SiS and Volari series.
tdfx - 3Dfx Voodoo Banshee, 3, 4, and 5 driver (does not support Glide API or SLI multi-chip)
vesa - Default VESA driver for X
vmware - VMware Virtual Video Server
Be aware that only Intel, Nouveau, and ATI drivers will have support in LibMesa for hardware accelerated OpenGL support while the rest will fallback to the Software Rasterizer and Gallium llvmpipe software rendering agent.
There are other hardware drivers available on the Xorg repository such as:
Code:
amd
apm
ark
ast
chips
cyrix
freedreno
geode
glide
glint
i128
i740
i810
impact
imstt
modesetting
neomagic
newport
nsc
nv
omap
opentegra
qxl
radeonhd
rendition
s3
s3virge
siliconmotion
sisusb
sunbw2
suncg3
suncg6
suncg14
sunffb
sunleo
suntcx
tga
trident
tseng
v4l
vermilion
vga
via
voodoo
wsfb
xgi
xgixp
These drivers have not been tested on B/LFS and some are known not to compile on GNU/Linux, or require extra software and configurations to get working. many are out of date as well and are not supported by the current X-Server package.
Some drivers are also for embedded ARM based projects like omap, opentegra, and freedreno which are outside the scope of B/LFS. These will build on x86/x64 B/LFS, but require build support in libdrm, the Linux kernel, and LibMesa's ilo driver support to work properly, however, without proper hardware to test them against the usability of these drivers is unknown.
Be aware that the drivers vesa and fbdev are fallback drivers only and are not intended for general usage except in situations where a driver may not exist.
If you have an Intel, Nvidia, or ATI chipset you can enable GlamorEGL support for 2D rendering, and if it was compiled in at build time.
*Note: All modern GPUs supported by the Nvidia, AMD/ATI, and Intel drivers will support or require Glamor to operate under 2D modes. You probably should enable Glamor by default on these chipsets anyway.
To enable GlamorEGL go down to the section marked as "Device" and enter the following using the vim editor:
Code:
Section "Device"
Identifier "<name of manufacturer>"
Driver "<name of driver>"
Option "AccelMethod" "glamor"
Now hit "Esc" key and type in ":x" to save and exit.
3. Testing the configuration
Now you need to test the configuration to run a test of X issue the following command from the console:
Code:
Xorg -config xorg.conf.new -retro
This will launch Xorg with a "X" mouse cursor which you should be able to move around the screen.
If the mouse doesn't work, this means xf86-input-evdev may have a problem with your mouse device, and possibly other input drivers. To remedy this you may need to download the following drivers:
xf86-input-joystick http://xorg.freedesktop.org/archive/...-1.6.2.tar.bz2
xf86-input-keyboard http://xorg.freedesktop.org/archive/...-1.8.0.tar.bz2
xf86-input-mouse http://xorg.freedesktop.org/archive/...-1.9.1.tar.bz2
Install them using this command sequence:
Code:
./configure $XORG_CONFIG
make
make install
These drivers are the basic input fallback drivers much like the xf86-video-fbdev and xf86-video-vesa drivers are the fallback basic video drivers.
Now exit this with Ctrl+Alt+F1 to exit X and press Ctrl+C to kill the X command and go back to the console prompt, and re-issue steps 1 and 2 if needed, and try the test again. If it works, you're in business. Now exit again as described.
4. Finalizing the setup
Now to finalize and commit the configuration into the system execute the following command:
Code:
cp -v xorg.conf.new /etc/X11/xorg.conf
This will copy the configuration file into the appropriate folder.
Now to run X, execute the following:
You should have the twm window manager open with three white virtual terminals.
To further test X and ensure it is working properly execute:
Look through the readout for:
direct rendering: Yes
You can also run a small test called glxgears to check the frame rate limitations:
This will run a small demo that will test the framerate and some minor capabilities of the hardware. To exit the test press "Esc".
This concludes how to setup X on B/LFS. Enjoy.