I've just reinstalled gentoo on my laptop, and went with the latest 2.6 test kernel. I'm basing this HOW-TO on the following hardware, so be prepared to change some of the settings to fit your hardware/needs.
- Laptop - hp nx7000 DG706A
- Intel Pentium-M 1.6GHz
- 15,4" WSXGA LCD - 1680x1050 Widescreen
- ATI Radeon Mobility 9200 64MB RAM
- 1024MB DDR RAM
- 60GB ATA-100 5400rpm harddisk
- Realtek 8139c
- Intel WLAN (not supported)
- DVD+RW
- Table of contents
- Kernel setup
- ATI drivers
- XFree86 configuration
- fglrxconfig
- My XFree86 configuration
You have probably already a kernel configured, compiled and up and running. The question is if you have configured it right in regards to X, AGP, DRM/DRI and ATI.
Lets configure the kernel with the related settings:
Code: Select all
cd /usr/src/linux
make menuconfigCode: Select all
Device Drivers --->
Character devices --->Code: Select all
<M> Enhanced Real Time Clock Support
...
<M> /dev/agpgart (AGP Support)
< > ALI chipset support
< > ATI chipset support
< > AMD Irongate, 761, and 762 chipset support
< > AMD Opteron/Athlon64 on-CPU GART support
<M> Intel 440LX/BX/GX, I8xx and E7x05 chipset support
< > NVIDIA nForce/nForce2 chipset support
< > SiS chipset support
< > Serverworks LE/HE chipset support
< > VIA chipset support
[*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
< > 3dfx Banshee/Voodoo3+
< > 3dlabs GMX 2000
< > ATI Rage 128
< > ATI Radeon
< > Intel I810
< > Intel 830M, 845G, 852GM, 855GM, 865G
< > Matrox g200/g400
< > SiS video cardsNB!! I've chosen to compile with modules. You can of course also compile them into the kernel. Then you should skip next step (adding the modules to the autoload config file
NB!!! Wedge_ said in this forumpost that you do not need Radeon DRI support in the kernel. At this point I got it as you can see, and I have no problem with it, but I'm experimenting with it now, removing kernel DRM support that is, and will get back on this issue later on.
If you did as me and compiled your support as modules, add the following to '/etc/modules.autoload.d/kernel-2.6':
Code: Select all
rtc
agpgart
intel_agp
fglrxInstall your new kernel. Everyone has it's own ways of doing so, I do this:
Code: Select all
cp /usr/src/linux/arch/i386/boot/bzImage /boot/mm-sources-beta9-mm2-XctUpdate your grub or lilo config and reboot.
The rest should be like normal setup...
2. ATI drivers
Now that the kernel is right we emerge the ati-drivers:
Code: Select all
emerge ati-drivers
opengl-update atiThe last thing to do is to configure XFree86 to use your new ati driver (fglrx). You can use a number of ways lik 'XFree86 --configure', 'xf86config', fglrxconfig or do it by hand, either by examples (XF86config.example) or copy one a working one from the net (gentoo forums) and change/tweak it to fit your need. I'll focus on fglrx and my own XFree86 config file.
3a. fglrxconfig
ati-drivers comes with its own configuration script, called 'fglrxconfig'. With some simple yes and no questions you get a fully, but in need of some tweaks, working 'XFree86-4' config file.
Run fglrxconfig to configure XFree86:
Code: Select all
/opt/ati/bin/fglrxconfig3b. My XFree86 configuration
My XFree86 config file is almost identical to the one created with 'fglrxconfig', at least when it comes to vga driver settings. This config file should also work just fine with a 2.4.xx kernel.
Most of the changes are that I have a widescreen LCD display, so you probably want to change the "Monitor section" and also remove the 'TouchPad' section in "Core Pointer's InputDevice section". This also means fixing the "ServerLayout sections" to get mouse support in X.
Alright, here is my XFree86 config file (have removed most of the comments for spacesaving):
Code: Select all
laptop root # cat /etc/X11/XF86Config
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************
# **********************************************************************
# DRI Section
# **********************************************************************
Section "dri"
Mode 0666
EndSection
# **********************************************************************
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
Section "Module"
# This loads the DBE extension module.
Load "dbe" # Double buffer extension
SubSection "extmod"
# Option "omit xfree86-dga"
EndSubSection
# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"
# This loads the GLX module
Load "glx" # libglx.a
Load "dri" # libdri.a
EndSection
# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:-1"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# This option allows the X server to start up even if the
# mouse device can't be opened/initialized.
AllowMouseOpenFail
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
Section "InputDevice"
Identifier "Keyboard1"
Driver "Keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "no"
Option "XkbOptions" ""
Option "XkbCompat" ""
EndSection
# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************
Section "InputDevice"
# Identifier and driver
Identifier "TouchPad"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/misc/psaux"
Option "ZAxisMapping" "6 7"
EndSection
Section "InputDevice"
Identifier "USBmouse"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5 - 48.5
VertRefresh 40 - 70
Option "DPMS"
EndSection
Section "Monitor"
Identifier "LCD-WXSGA"
ModelName "Flat Panel"
VendorName "hp"
# Option "DPMS"
HorizSync 31.5 - 48.5
VertRefresh 40-70
EndSection
Section "Monitor"
Identifier "CRT-21@Work"
ModelName "G550"
VendorName "Sony"
Option "DPMS"
# HorizSync ""
# VertRefresh ""
EndSection
Section "Monitor"
Identifier "CRT-19@Home"
ModelName "96P"
VendorName "Samtron"
HorizSync 30-96
VertRefresh 50-160
Option "DPMS"
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
# Standard VGA Device:
Section "Device"
Identifier "Standard VGA"
VendorName "Unknown"
BoardName "Unknown"
Driver "vga"
EndSection
# === ATI device section ===
Section "Device"
Identifier "vga0"
VendorName "ATI"
BoardName "ATI Mobility Radeon 9200"
Driver "fglrx"
# === Own Settings (CTh) ===
# VideoRam 65536
Option "AGPMode" "4"
Option "AGPFastWrite" "True"
Option "EnablePageFlip" "True"
# === disable PnP Monitor ===
# Option "NoDDC"
# === disable/enable XAA/DRI ===
Option "no_accel" "no"
Option "no_dri" "no"
# === FireGL DDX driver module specific settings ===
# === Screen Management ===
Option "DesktopSetup" "0x00000100"
Option "MonitorLayout" "AUTO, NONE"
Option "IgnoreEDID" "off"
Option "HSync2" "unspecified"
Option "VRefresh2" "unspecified"
Option "ScreenOverlap" "0"
# === TV-out Management ===
Option "NoTV" "yes" # "no" to turn on TV out
Option "TVStandard" "PAL-B"
Option "TVHSizeAdj" "0"
Option "TVVSizeAdj" "0"
Option "TVHPosAdj" "0"
Option "TVVPosAdj" "0"
Option "TVHStartAdj" "0"
Option "TVColorAdj" "0"
Option "GammaCorrectionI" "0x00000000"
Option "GammaCorrectionII" "0x00000000"
# === OpenGL specific profiles/settings ===
Option "Capabilities" "0x00000000"
# === Video Overlay for the Xv extension ===
Option "VideoOverlay" "on"
# === OpenGL Overlay ===
# Note: When OpenGL Overlay is enabled, Video Overlay
# will be disabled automatically
Option "OpenGLOverlay" "off"
# === Center Mode (Laptops only) ===
Option "CenterMode" "off"
# === Pseudo Color Visuals (8-bit visuals) ===
Option "PseudoColorVisuals" "off"
# === QBS Support ===
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
# === FSAA Management ===
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
# === Misc Options ===
Option "UseFastTLS" "1"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "no"
Option "ForceGenericCPU" "no"
BusID "PCI:1:0:0" # vendor=1002, device=4c66
Screen 0
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
Section "Screen"
Identifier "Screen0"
Device "vga0" # ATI Radeon Mobility 9200
Monitor "LCD-WXSGA"
DefaultDepth 24
# Option "backingstore"
Subsection "Display"
Depth 24
Modes "1680x1050" "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0 # initial origin if mode is smaller than desktop
# Virtual 1280 1024
EndSubsection
EndSection
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
Section "ServerLayout"
# The Identifier line must be present
Identifier "Server Layout"
Screen "Screen0"
InputDevice "TouchPad" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
### EOF ###With this settings I had X up and running with 1680x1050 resolution, giving me a score of just over 1800 in glxgears
Please comment or point out errors or give suggestions.
Changelog:
20031113 - Initial version
20031113#2 - Removed Radeon module in kernel setup - no need since I wasn't using it.





