# [HOWTO] ATI closed source binary drivers

## sonicwim

Because I had some problems getting the ATI closed source binary drivers to work on my Gentoo box this info might perhaps help others.

Your mileage may vary of course!  :Laughing: 

I have an ASUS P5Q Pro motherboard with an Intel P45 chipset if this matters...

1. Log out of your current X seesion, open a console session and power down your X server

```
# /etc/init.d/xdm stop
```

2. Remove the open source driver and select the right OpenGL version

```
# emerge -C x11-drivers/xf86-video-ati

# eselect opengl set xorg-x11
```

3. Set the right VIDEO_CARDS variable in /etc/make.conf and update world to

install x11-drivers/ati-drivers

```
# vi /etc/make.conf

VIDEO_CARDS="fglrx"

# emerge -DutNav world
```

4. Create /etc/X11/xorg.conf

This example is for an ATI Radeon HD 4870 and a 23" Samsung monitor running 32 bit color in full HD resolution with a plain USB mouse and plain PS/2 keyboard, so adjust where needed.

One might also feel the need to add custom font paths.

```
# vi /etc/X11/xorg.conf

Section "ServerLayout"

   Identifier     "ServerLayout0"

   Screen      0  "Screen0" 0 0

EndSection

Section "Files"

   ModulePath   "/usr/lib/xorg/modules"

   ModulePath   "/usr/lib/opengl/xorg-x11/extensions"

EndSection

Section "Module"

   Load  "dbe"

   Load  "dri2"

   Load  "record"

   Load  "dri"

   Load  "extmod"

   Load  "glx"

EndSection

Section "ServerFlags"

   Option       "AIGLX" "On"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

   Option       "AutoRepeat" "500 30"

   Option       "XkbModel" "pc105"

   Option       "XkbLayout" "de"

   Option      "XkbVariant"  "nodeadkeys"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mice"

   Option       "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

   Identifier  "Monitor0"

   Option       "VendorName" "Samsung"

   Option       "ModelName" "SyncMaster XL2370"

   Option       "VertRefresh" "60"

   Option       "DPMS" "true"

EndSection

Section "Device"

   Identifier  "Device0"

   Driver      "fglrx"

   VendorName  "ATI"

   BoardName   "Radeon 4870"

   Option       "XAANoOffscreenPixmaps" "true"

   Option      "AddARGBGLXVisuals" "true"

   Option      "DynamicClocks" "on"

   Option      "UseFastTLS" "0"

   BusID       "PCI:1:0:0"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Device0"

   Monitor    "Monitor0"

   DefaultDepth     24

   SubSection "Display"

      Viewport   0 0

      Depth     24

      Modes    "1920x1080" "1280x1024" "1024x768" "800x600" "640x480"

   EndSubSection

EndSection

Section "DRI"

   Group        "video"

   Mode         0660

EndSection

Section "Extensions"

   Option       "Composite" "Enable"

EndSection
```

5. Re-emerge xf86-input-evdev to avoid input problems due to version mismatches

```
# emerge -C x11-drivers/xf86-input-evdev

# emerge -DutNav x11-drivers/xf86-input-evdev
```

6. Compile your new kernel without DRM support for your card (not doing so will hang your machine when X starts)

```
# cd /usr/src/linux && make oldconfig && make menuconfig

Device Drivers ->

    Graphics support ->

        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
```

Quit the configuration manager and build your kernel

```
# make && make modules_install
```

Install your kernel on /boot and adjust Grub

```
# mount /boot

# cp arch/i386/boot/bzImage /boot/kernel-linux-2.6.XX-gentoo-rX

# vi /boot/grub/menu.lst
```

7. Select your new OpenGL implementation, reboot and enjoy!

```
# eselect opengl set ati

# reboot
```

----------

## Veldrin

nice howto.

instead of using a full blown monolithic xorg.conf, you may also use the split one. And from my experience, only the device and dri sections are really required. e.g /etc/X11/xorg.conf.d/10-drivers.conf

```
Section "Device" 

  Identifier "RadeonHD 4830"

  Driver "fglrx"

EndSection

Section "dri"

  Mode 0666

EndSection
```

V.

----------

## GES

Some cards are also needed too:

```
# update-pciids

# emerge radeon-ucode

```

----------

## Veldrin

radeon-ucode is only required if the open radeon driver is used. the OP explicitly stated, that this howto is for the proprietary fglrx (ati-drivers).

V.

----------

## GES

 *Veldrin wrote:*   

> radeon-ucode is only required if the open radeon driver is used.

 

Thanks, I did not know.

----------

## sonicwim

Hi yall,

I found some little errors in my xorg.conf but they are trivial so it took me a while to notice them...   :Embarassed: 

In the Monitor section VendorName, ModelName and VertRefresh are not options but keywords so they should not be preceded by Option and the keywords don't need double quotes. The vertical refresh rate also does not need double quotes...

In the Device section the keywords XAANoOffscreenPixmaps, AddARGBGLXVisuals and DynamicClocks aren't really needed either...

That's all folks!   :Wink: 

----------

