3D Graphics not working in Ubuntu / Debian

From CLUG Wiki

Jump to: navigation, search

ATI Radeon

You might need to install the fglrx drivers.

sudo apt-get install fglrx-control fglrx-driver
cp /etc/X11/XF86Config-4 /etc/X11/XF86Config.save
fglrxconfig

A good wiki page for using proprietary ATI drivers under Ubuntu/Debian can be found at:- http://wiki.serios.net/wiki/Debian_ATI_proprietary_display_driver_installation

Optional in xorg.conf:

Section "Device"
    ...
    Option     "AGPMode" "4"
    Option     "AGPFastWrite" "True"
    Option     "EnablePageFlip" "True"
    ...
EndSection


If your X.org log file has a line it like the following:

   fglrx(0): [agp] unable to acquire AGP, error "xf86_EINVAL"

then you may have an MTRR issue.

The fix follows below (credit is due to the contributors to http://www.rage3d.com/board/showthread.php?t=33831753):-

Create a text file named fix_mtrr in /etc/init.d and copy this text into it:

   #!/bin/sh
   # Fix wrong MTRR setting
   echo "disable=0" >| /proc/mtrr
   echo "base=0x0 size=0x40000000 type=write-back" >| /proc/mtrr

Replace 0x40000000 with the size of your main memory (not video memory):

   0x08000000 = 128Mb
   0x10000000 = 256Mb
   0x40000000 = 1Gb
   0x60000000 = 1.5Gb
   0x80000000 = 2Gb

Add execute privileges:

chmod +x /etc/init.d/fix_mtrr

Create a symlink: /etc/rcS.d/S02fix_mtrr The symlink must point to: ../init.d/fix_mtrr

(or as an alternative to creating the symlink, you could do, as I did):

   update-rc.d fix_mtrr start 03 2 3 4 5 . stop 03 0 1 6 .

Reboot your system.

It the kernel options above are set correctly and your ATI driver is configured properly, then 2D and 3D acceleration sould work fine. To test it is now okay you can run:

   cat /proc/mtrr

You should then see something like:

   reg00: base=0x00000000 (   0MB), size=1024MB: write-back, count=1