Once the base installation and configuration is completed, and you have booted into your new system, it's time to move on to configuring X (Xorg).
The installation of Xorg in Gentoo is fairly easy. A lot of the components that are included in your installation, are derived from make.conf. We did most of it at The Simple Guide to a Media PC (Installing Gentoo) (skip to the section about make.conf).
The two important parameters for Xorg, aside of the USE flags, are VIDEO_CARDS and INPUT_DEVICES, and have to be set up in /etc/make.conf.
The various parameters are like so:
Known video hardware is:
Known input devices are:
I also recommend to add these:
The actual installation is done by merging the x11-base/xorg-x11 package package:
# emerge -av xorg-x11
Depending on the options in make.conf, packages will be included in the merge. One of these packages is x11-base/xorg-server, which also displays the various use flags, input, and video devices. In my case this was:
[ebuild R ] x11-base/xorg-server-1.2.0-r3 USE="dri ipv6 nptl sdl xorg (-3dfx) -debug -dmx -kdrive -minimal -xprint" INPUT_DEVICES="joystick keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="fglrx nvidia* radeon v4l vesa vga -apm -ark -chips -cirrus -cyrix -dummy -epson -fbdev -glint -i128 (-i740) -i810 (-impact) (-imstt) -mach64 -mga -neomagic (-newport) (-nsc) -nv -r128 -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -via -vmware -voodoo" 0 kB
The main configuration file of Xorg is /etc/X11/xorg.conf. In Gentoo, a basic sample configuration file is available (and is called /etc/X11/xorg.sample).
First of, a more comprehensive guide on configuring Xorg (for Gentoo) can be found at the The X Server Configuration HOWTO. I'll only explain the system-specific stuff here.
Every xorg.conf has a ServerLayout which specifies which monitor, video card, and input to devices to actually use. Mine is:
Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection
If you're using ATI proprietary FireGL/Radeon drivers, be sure to explicitly disable AIGLX:
Option "AIGLX" "false"
The identifiers used can be just about anything, just as long as they match the other sections.
The Modules section specifies which modules for Xorg to load. Mine are:
Section "Module" Load "glx" Load "extmod" Load "xtrap" Load "record" Load "dbe" Load "dri" Load "freetype" Load "type1" EndSection
Specific modules are:
Specific info can be found here: The X Server Configuration HOWTO.
In my case, there are two sections, one for keyboard, the other for mouse:
Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "XkbModel" "105" Option "XkbLayout" "be" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5 6 7" EndSection
The Monitor can be either very simple, or very complicated. When relying on EDID to set up the monitor, this section contains the minimal:
Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" Option "DPMS" "true" EndSection
Notice the DPMS option, which enables power saving on your monitor. If the machine idles (e.g. in MythTV menus), this will turn off the monitor. MythTV has support for this built-in, so it won't interfere when looking at video recordings and/or DVDs.
The video card is set in the Device section.
My configuration is an nVIDIA one. I've kept things pretty basic for my setup, but the nVIDIA driver has a whole bunch of configuration parameters. Read the README included with the driver for more information on that:
Section "Device" Identifier "Card0" Driver "nvidia" EndSection
When I was using the onboard ATI Radeon X1250, I had this as configuration file. It is originally (partially) inherited from my laptop (which has a X700):
Section "Device" Identifier "Card0" Driver "fglrx" VendorName "ATI Technologies Inc" BoardName "Radeon X1250 (PCIE)" Option "VideoOverlay" "on" Option "OpenGLOverlay" "off" BusID "PCI:1:5:0" EndSection
A word of explanation: for Radeon, you have to specifically enable the video overlay. I've also disabled the OpenGL overlay (because of interference with the video overlay).
Notice the BusID, which is specific to my system. It can be fetched by running lspci as root:
As an example, the output from my laptop:
# lspci | grep VGA 01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X700 (PCIE)
This means the BusID will be PCI:1:0:0.
By default, the EDID of your monitor tells the resolution Xorg can use. However, for the sake of proper configuration, it's very recommended to set up the proper color depth and available resolutions. This is done in the Screen section, and its subsection Display. I'm using a 19-inch TFT monitor, and therefore, have this in my config file:
Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x1024" "1024x768" "800x600" "640x480" "640x400" EndSubSection EndSection
To be Gentoo-compliant, check whether the following is added:
Section "DRI" Group "video" Mode 0660 EndSection
This makes sure that only members of the group video can access and use DRI. Simply add your user (or the mythtv user, if you're using autostart) to that group.
To properly test Xorg, you can start X with your own user with the well-known command:
# startx
The log file of each session is kept at /var/log/Xorg.0.log, so if you have any problems, that's the first place to consult.
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |