Gentoo Installation Guide: Difference between revisions

From cchtml.com
mNo edit summary
No edit summary
Line 1: Line 1:
==Installation==
Orginally found on the [http://gentoo-wiki.com/HOWTO_ATI_Drivers Gentoo Wiki], the GNU Free Documentation license allows me to copy/paste it here.
*[[Gentoo Installation Guide|Installation Guide]]


== Introduction ==


==Tips and Tricks==
This guide should help you install and configure the proprietry graphics drivers from ATI. This guide applies for ALL versions of fglrx - it was made before the (rather dramatic) 8.8.25 January 05 release, but it is maintained such that all versions should work.


*Note:  If you are using an ATI 7500 Mobility (or such card that isn't supported by the ati-drivers) this HOWTO will not help.  Instead use the ATI kernel drivers. See also: http://forums.gentoo.org/viewtopic-p-2137276.html#2137276


==Related Resources==
== Kernel Configuration ==
*[http://gentoo-wiki.com/HOWTO_ATI_Drivers Gentoo Wiki]
 
Get into menuconfig (cd /usr/src/your-kernel && make menuconfig) and check the following:
{{Box Code|menuconfig|<pre>
Loadable Module Support --->
[*] Enable loadable module support
  [*]  Module unloading
 
Processor type and features  --->
[*] MTRR (Memory Type Range Register) support
 
Device Drivers --->
Character Devices --->
  <M> /dev/agpgart (AGP Support) 
    <M> Your_AGP_Chipset_Here
  [ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
 
Graphics support --->
  [ ]  Support for framebuffer devices
 
Kernel Hacking --->
  [ ] Kernel debugging
</pre>
}}
Sync your kernel menuconfig with the selected portions posted here.
 
'''Please be aware that -mm and -rc(1,2,3,4,...) kernels often break fglrx due to unexpected changes in syntax, etc. If you want to use ati-drivers, use the stock gentoo-sources or at the very least, a STABLE 2.4 or 2.6 kernel!'''
 
Don't forget to compile, install, and reboot into the kernel. Directions for this are beyond the scope of this file; if you need help recompiling the kernel, [http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually click here].
 
== Grabbing a Driver Set ==
 
For installation it will be easier to drop out of X to a command prompt. Do this using whatever command your Window Manager uses.
I use fluxbox so it's just rightclick -> fluxbox menu -> exit. For KDE or GNOME it's probably just a matter of logging out. When all else fails, hit CTL+ALT+BACKSPACE to kill the X server ungracefully. If the X server only reboots or for some reason you've disabled this hotkey, log in as root and type '''init 3''' to bring the system run level down.
 
Thanks to portage, installing the drivers is easy. If you have not already done it recently, start by synchronising your portage tree:
 
emerge --sync
Getting the latest drivers will probably mean unmasking them.
 
echo "media-video/ati-drivers ~arch" >> /etc/portage/package.keywords
echo "media-video/ati-drivers-extra ~arch" >> /etc/portage/package.keywords
 
Replace {{Codeline|<~arch>}} with your system architecture; it's going to be either {{Codeline|~x86}} or {{Codeline|~amd64}}, the only two CPU architectures supported by the ATI driver.
 
Now let's install the drivers. ati-drivers-extra is a (god-awful) control panel for the driver you probably won't use; you can leave that part out if you want, but for completeness we mention it here.
 
su -
emerge -v ati-drivers ati-drivers-extra
 
The next step is switch to the ATi OpenGL subsytem:
 
(#opengl-update ati)
eselect opengl set ati
(very important!)(opengl-update is deprecated)
Configure X:
 
fglrxconfig
 
If for some reason this command doesn't work (the script isn't found), then try manually executing the script from its default location:
 
/opt/ati/bin/fglrxconfig
 
Now, let's get back into X.
 
startx
 
Open up a command prompt and run:
 
fglrxinfo
 
If the OpenGL vendor string says "ATI Technologies," then congrats! You've got the drivers working and hardware acceleration going great. If not...read on...
 
== Troubleshooting ==
 
=== Config Files ===
By default, the driver uses the Internal AGPGART. Sometimes the internal one doesn't work, and you will have to use the one provided with the kernel. Search your xorg.conf for the line that has the option "UseInternalAGPGART." Simply change the "yes" to "no."
 
{{Box File|xorg.conf|
Option "UseInternalAGPGART" "no"
}}
 
 
Now simply add the modules to {{Filename|/etc/modules.autoload.d/kernel-2.x}} where x is your kernel version.
 
Add the following (ORDER IS VERY IMPORTANT);
{{Box File|/etc/modules.autoload.d/kernel-2.x|
agpgart
intel-agp # change intel-agp to your chipset. eg: via-agp, nvidia-agp sis-agp.
fglrx
}}
 
Finally, run
 
modules-update
 
Then you can reboot and everything should work. If you have are having problems, check dmesg and /var/log/Xorg.0.log for more info.
 
=== Blank screen or monitor turning off after startx ===
 
Versions of ati-drivers >= 8.16.20 have an issue with this that's easily corrected by inserting:
{{Box File|xorg.conf|
    Option "ForceMonitors" "notv"
}}
in the device section of xorg.conf (discussed here: http://bugs.gentoo.org/show_bug.cgi?id=103028)
 
 
Check if you have a non-DDC monitor connected via VGA/HD15 connector. If so change your xorg.conf:
{{Box File|xorg.conf|
#  Option "DesktopSetup"              "0x00000000"
    Option "MonitorLayout"              "NONE, CRT"
    Option "IgnoreEDID"                "off"
    Option "HSync2"                    "30-85"
    Option "VRefresh2"                  "50-160"
#  Option "ScreenOverlap"              "0"
}}
where HSync2 and VRefresh2 are your monitor parameters.
 
 
Also, try changing the MonitorLayout option. The default is "AUTO, AUTO", which is to say X will attempt to autodetect what kind of monitor you've got on the first and second display heads. This can theoretically fail (though I have never observed it). Try changing it around a bit. For example, if you have an LCD and no secondary monitor, change the line to read:
 
{{Box File|xorg.conf|
    Option "MonitorLayout"              "TMDS, NONE"
}}
 
if you have a CRT, simply replace "TMDS" with "CRT".
 
=== Crashes on startup ===
'''If you are unable to use any 3d applications and get this error instead:'''
 
FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!
fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!
FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!
fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!
FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!
 
'''Then you do not have tmpfs mounted on /dev/shm, which the driver requires.''' To mount this, add to following line to {{filename|/etc/fstab}} (if it isn't there already):
 
{{Box File|/etc/fstab|
tmpfs    /dev/shm          tmpfs        defaults            0 0
}}
 
Then just do a:
mount /dev/shm
 
If the drivers still crap out on you, or for example you get a black screen on X init, try going into your system BIOS and change graphics-related stuff around. Believe it or not, for me my 9800 gives a black screen on X init if I have the AGP Aperture set at anything other than 128MB. I don't know what causes this, and I don't care; I'm just relating to you how I overcame ''my'' problem ;)
 
Also, '''whenever you update your compiler''', you '''must''' recompile your kernel otherwise you won't be able to insert the fglrx module. Note that recompiling your kernel means you must also unmerge/emerge ati-drivers!
 
== See Also ==
 
*[http://ati.cchtml.com/ ATi Unofficial Bugzilla (occasionally monitored by ATi personnel)]
*Check out user Wedge_'s excellent ATI Radeon [http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html FAQ here]

Revision as of 06:04, 13 November 2005

Orginally found on the Gentoo Wiki, the GNU Free Documentation license allows me to copy/paste it here.

Introduction

This guide should help you install and configure the proprietry graphics drivers from ATI. This guide applies for ALL versions of fglrx - it was made before the (rather dramatic) 8.8.25 January 05 release, but it is maintained such that all versions should work.

Kernel Configuration

Get into menuconfig (cd /usr/src/your-kernel && make menuconfig) and check the following:

Code: menuconfig
Loadable Module Support --->
 [*] Enable loadable module support
   [*]   Module unloading 

Processor type and features  --->
 [*] MTRR (Memory Type Range Register) support

Device Drivers --->
 Character Devices ---> 
  <M> /dev/agpgart (AGP Support)  
    <M> Your_AGP_Chipset_Here
  [ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

 Graphics support --->
  [ ]  Support for framebuffer devices

Kernel Hacking --->
  [ ] Kernel debugging

Sync your kernel menuconfig with the selected portions posted here.

Please be aware that -mm and -rc(1,2,3,4,...) kernels often break fglrx due to unexpected changes in syntax, etc. If you want to use ati-drivers, use the stock gentoo-sources or at the very least, a STABLE 2.4 or 2.6 kernel!

Don't forget to compile, install, and reboot into the kernel. Directions for this are beyond the scope of this file; if you need help recompiling the kernel, click here.

Grabbing a Driver Set

For installation it will be easier to drop out of X to a command prompt. Do this using whatever command your Window Manager uses. I use fluxbox so it's just rightclick -> fluxbox menu -> exit. For KDE or GNOME it's probably just a matter of logging out. When all else fails, hit CTL+ALT+BACKSPACE to kill the X server ungracefully. If the X server only reboots or for some reason you've disabled this hotkey, log in as root and type init 3 to bring the system run level down.

Thanks to portage, installing the drivers is easy. If you have not already done it recently, start by synchronising your portage tree:

emerge --sync

Getting the latest drivers will probably mean unmasking them.

echo "media-video/ati-drivers ~arch" >> /etc/portage/package.keywords
echo "media-video/ati-drivers-extra ~arch" >> /etc/portage/package.keywords

Replace <~arch> with your system architecture; it's going to be either ~x86 or ~amd64, the only two CPU architectures supported by the ATI driver.

Now let's install the drivers. ati-drivers-extra is a (god-awful) control panel for the driver you probably won't use; you can leave that part out if you want, but for completeness we mention it here.

su -
emerge -v ati-drivers ati-drivers-extra

The next step is switch to the ATi OpenGL subsytem:

(#opengl-update ati)
eselect opengl set ati
(very important!)(opengl-update is deprecated)

Configure X:

fglrxconfig

If for some reason this command doesn't work (the script isn't found), then try manually executing the script from its default location:

/opt/ati/bin/fglrxconfig

Now, let's get back into X.

startx

Open up a command prompt and run:

fglrxinfo

If the OpenGL vendor string says "ATI Technologies," then congrats! You've got the drivers working and hardware acceleration going great. If not...read on...

Troubleshooting

Config Files

By default, the driver uses the Internal AGPGART. Sometimes the internal one doesn't work, and you will have to use the one provided with the kernel. Search your xorg.conf for the line that has the option "UseInternalAGPGART." Simply change the "yes" to "no."

File: xorg.conf
Option "UseInternalAGPGART" "no"


Now simply add the modules to /etc/modules.autoload.d/kernel-2.x where x is your kernel version.

Add the following (ORDER IS VERY IMPORTANT);

File: /etc/modules.autoload.d/kernel-2.x
agpgart
intel-agp # change intel-agp to your chipset. eg: via-agp, nvidia-agp sis-agp.
fglrx

Finally, run

modules-update

Then you can reboot and everything should work. If you have are having problems, check dmesg and /var/log/Xorg.0.log for more info.

Blank screen or monitor turning off after startx

Versions of ati-drivers >= 8.16.20 have an issue with this that's easily corrected by inserting:

File: xorg.conf
    Option "ForceMonitors" "notv"

in the device section of xorg.conf (discussed here: http://bugs.gentoo.org/show_bug.cgi?id=103028)


Check if you have a non-DDC monitor connected via VGA/HD15 connector. If so change your xorg.conf:

File: xorg.conf
#   Option "DesktopSetup"               "0x00000000"
    Option "MonitorLayout"              "NONE, CRT"
    Option "IgnoreEDID"                 "off"
    Option "HSync2"                     "30-85"
    Option "VRefresh2"                  "50-160"
#   Option "ScreenOverlap"              "0"

where HSync2 and VRefresh2 are your monitor parameters.


Also, try changing the MonitorLayout option. The default is "AUTO, AUTO", which is to say X will attempt to autodetect what kind of monitor you've got on the first and second display heads. This can theoretically fail (though I have never observed it). Try changing it around a bit. For example, if you have an LCD and no secondary monitor, change the line to read:

File: xorg.conf
    Option "MonitorLayout"              "TMDS, NONE"

if you have a CRT, simply replace "TMDS" with "CRT".

Crashes on startup

If you are unable to use any 3d applications and get this error instead:

FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!
fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!
FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!
fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!
FGLTexMgr: open of shared memory object failed (Function not implemented)
__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!

Then you do not have tmpfs mounted on /dev/shm, which the driver requires. To mount this, add to following line to /etc/fstab (if it isn't there already):

File: /etc/fstab
tmpfs     /dev/shm           tmpfs        defaults            0 0

Then just do a:

mount /dev/shm

If the drivers still crap out on you, or for example you get a black screen on X init, try going into your system BIOS and change graphics-related stuff around. Believe it or not, for me my 9800 gives a black screen on X init if I have the AGP Aperture set at anything other than 128MB. I don't know what causes this, and I don't care; I'm just relating to you how I overcame my problem ;)

Also, whenever you update your compiler, you must recompile your kernel otherwise you won't be able to insert the fglrx module. Note that recompiling your kernel means you must also unmerge/emerge ati-drivers!

See Also