(non-DDC) ATI Radeon Driver for Linux HOWTO

9/18/05 - sorry I haven't updated things in awhile, but I tend to use Livna now exclusively for my drivers, so I rarely build the drivers anymore! But feel free to with questions.

If you'd like to help me out, I'd love to drink to repletion - if not surfeit.

See Livna for RPMs (both i386 and x86_64)!

As of 1/20/05 (3/20/05 for x86_64), Livna now offers Fedora fglrx drivers, currently located in their lvn directory for i386 builds and the x86_64 lvn directory. I'd recommend using their drivers - but I'll keep up information here for those wishing to build their own driver packages. (But see this bug and the temporary RPMs here if you're using kernel >2.6.11)

Don't know how to set up yum/apt for snagging RPMs? See Eric Raymond's HOWTO:
http://tldp.org/HOWTO/Fedora-Multimedia-Installation-HOWTO

Intro

I recently upgraded my graphics card to a Radeon 9600XT. Its currently supported under Linux only when using the ATI (read: proprietary) drivers. This page is designed to make it easier for those installing the drivers under Fedora Core 1-4, particularly those with non-DDC monitors like me.

FC3 pre-install step

The newer fglrx drivers don't need the kernel source to be lying around, by default they build against the self-compiled kernel (typically in /lib/modules/<kernel version>/build) - so, no preinstall step required!

Installation

First thing is to install the driver if you don't want to go with the RPMs at the top of this page. Download the latest either from ATI or at Schneider digital. The latter includes some extra scripts that you can get from ATI as well, if you look around.

Right - now just go to your console (ctrl-alt-f1, and be sure to kill any running Xservers, just do an "init 3" as root if you're in a graphical login (i.e. runlevel 5)). If you have an old version of the fglrx rpm, I recommend the following to first remove any old versions of the driver:

$ rpm -e fglrx
$ rm -rf /lib/modules/fglrx
(note: this may also be necessary for XOrg updates, so the GL dependencies don't interfere with the upgrade.)

Now install the new rpm:

$ rpm --replacefiles -ivh --force fglrx_6_8_0-8.12.10-1.i386.rpm
The "--force" will most likely be necessary to avoid some conflicts with the built in libGL that is part of MesaGL (if you use the RPMs from Livna, however, this won't be a problem). Also, since the driver depends on the kernel to load properly, this will require you to rebuild the module *every time you upgrade the kernel.* This is extremely important - if you forget to do this after rebooting to the new kernel (and still have the default runlevel set to 5 in /etc/inittab (i.e. a graphical login)), force grub to start in init level 3 (hit "e" on the grub screen) so it won't try to load an invalid kernel module:
# make sure you put the proper values/parameters below!!!
kernel /boot/vmlinuz- ro root=LABEL=/ init 3
The "init 3" at the end is the important bit.

using version 8.12.10 of the fglrx driver and kernels >2.6.11, you'll need the following patches (note that you also need to configure your kernel with CONFIG_DRM=m):

Patch 1
Patch 2
(patches obtained at http://www.hot.ee/amurde)

So, copy the patches to /lib/modules/fglrx/build_mod, apply the patches and build the module:

cd /lib/modules/fglrx/build_mod
patch -p0 < p1.patch
patch -p0 < p2.patch
sh make.sh
cd /lib/modules/fglrx
sh make_install.sh

X config

So everything should be installed (either using the RPMs or installing the files manually), and now the ATI install probably says something like "run fglrxconfig now". One word of advice: don't. Its a total waste of energy and time. It just makes a lame-brained XF86Config file that probably won't work for you. Just paste this file into your existing xorg.conf file (note the change in filename from XFree to XOrg in going from FC1->FC2) and tweak the parameters if need be (but see below if you have a non-DDC monitor). You can leave in any pre-existing "Device" sections and specify the one you'd like to use in the "Screen" section, like so:

Section "Screen"
        Identifier   "Screen0"
        Device       "Radeon 9600XT - fglrx"
        Monitor      "Monitor0"
        DefaultDepth    24

        Subsection "Display"
                Depth       24
                Modes       "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
        EndSubsection

EndSection
which would load the device specified in the available file.

WARNING 1!

If your monitor is non-DDC (like mine, a Panasonic P21), then the driver file given won't work. The xorg.conf is set to

    Option "MonitorLayout"              "AUTO, AUTO"
which means if it can't find a DDC enabled monitor, you lose. Set this section instead to:
# === Screen Management ===
#    Option "DesktopSetup"               "0x00000000"
    Option "MonitorLayout"              "NONE, CRT"
    Option "IgnoreEDID"                 "off"
    Option "HSync2"                     "30-115"
    Option "VRefresh2"                  "50-160"
#    Option "ScreenOverlap"              "0"
which assumes the monitor is on the VGA/HD15 connector (and is thusly listed second in the monitorlayout settings). Be sure to set your refresh rates too, just in case. (See this link for additional options/settings for the MonitorLayout parameter)

WARNING 2!

For some reason, Xv and OpenGL overlays cannot be used simultaneously. So, if you want to watch something in mplayer using the xv output (or you use your ATI based box as a mythfrontend), and yet the "OpenGLOverlay" is enabled, you'll get lousy playback. Likewise, if you want to play Doom3 and "VideoOverlay" is set to "on" (see the xorg.conf parameters for the flgrx driver), you'll get crappy performance. You'll literally need to reconfigure and restart X inbetween operations. Mega-lame.

Finishing Up

So after all my tweaking, I ended up with this xorg.conf file.

Now test the setup with a non-root user using "startx" - DON'T reboot the machine into initlevel 5 or using "init 5", as this might lead to a state you can't recover from. Check /var/log/Xorg.0.log (on Fedora machines, anyway) for errors if something goes terribly wrong.

Links

Handy links for some additional Fedora/ATI resources:
fglrx driver release notes
http://fedoranews.org/contributors/youssef_makki/tvout/
http://www2.ati.com/drivers/linux/linux_8.12.10.html


See some other RPM packages I've built for FC2/3.