Fglrx

From Gentoo Linux Wiki

Jump to: navigation, search

Catalyst is the name of the proprietary driver for AMD/ATI based chipsets for Linux and Windows. It is also known as fglrx and x11-drivers/ati-drivers in the Portage tree. Please Note that the current version of Fglrx does NOT support any cards that are not Directx Level 10 or above; anything x1950 or lower must use the Open Source drivers.

Contents

[edit] Installing fglrx

Installing fglrx is relatively straightforward.

# emerge -av x11-drivers/ati-drivers

Or enable the fglrx video card, which pulls in x11-drivers/ati-drivers:

File: /etc/make.conf
...
VIDEO_CARDS="fglrx"
...

And then rebuild x11-base/xorg-server:

# emerge -av1 x11-base/xorg-server

[edit] Configuring X

AMD ships fglrx with a free tool to quickly get a working xorg.conf, which can also be used to further tweak the configuration.

# /opt/bin/aticonfig --initial --input=/etc/X11/xorg.conf

This backups your xorg.conf and modifies it for fglrx. Finally, eselect can be used to tell X.Org about fglrx:

# eselect opengl set ati

Now you can (re)start X, and things should be fine. If not, continue to #Troubleshooting.

[edit] Tweaking xorg.conf

Several tweaks are known in the community. Please note that these aren't default for a reason.

Fix me: add tweaks

[edit] AIGLX with fglrx

Using ati-drivers 8.433 or later, you can enable and use AIGLX and thus use compositing window managers like Compiz Fusion. Some users have reported instability, but you'll have to see for yourself. You have to modify

File: /etc/X11/xorg.conf
...
Section "Extensions"

        Option        "Composite"        "On"

EndSection
...
...
Section "ServerFlags"

        Option        "AIGLX"            "On"

EndSection
...

[edit] Troubleshooting

[edit] Startup problems

[edit] AGP

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."

Note: If you can't find it, add it. In the Section "Device" right under Driver "fglrx"
File: /etc/X11/xorg.conf
...
        Option "UseInternalAGPGART" "no"
...

Now simply add the modules to /etc/modules.autoload.d/kernel-2.6.

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

Finally, run

# update-modules

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

[edit] Unable to modprobe fglrx

If the module cannot be loaded ("operation not permitted"), check that the kernel's Direct Rendering Manager is disabled:

Linux Kernel Configuration:
Device Drivers  --->
    Graphics support  --->
        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->

If you are using a precompiled kernel you can try to unload the dri and radeon module before modprobing fglrx.

# modprobe -r dri radeon # modprobe fglrx

[edit] PreInitDAL failed

This can happen if multiple monitors were detected, even though you don't have multiple monitors. To fix it, use aticonfig --enable-monitor and aticonfig --force-monitor to specify which monitors you use. Example, if you have a VGA + DVI card, but only use your VGA connection:

# aticonfig --enable-monitor=crt1 --force-monitor=crt1,notmds1

Some had success with disabling framebuffer in kernelconfig, recompile, reboot! This happend as i upgraded from 8.28.8 to 8.32.5.

[edit] Crashes/freezes

[edit] X crashes when playing a video using Xv

Even though Xv is scheduled for launch, the bindings don't work correctly yet. Add the following option to your Xorg.conf file in the device section:

File: /etc/X11/xorg.conf
...
 Option "TexturedVideo" "on"
...

[edit] System freezes after logout with GDM or KDM

If you use GDM modify /etc/X11/gdm/custom.conf

File: /etc/X11/gdm/custom.conf
...
[daemon]
AlwaysRestartServer=true

If you use KDM add to the [X-:*-Core] section the following

File: /usr/share/config/kdm/kdmrc
...
[X-:*-Core]
...
TerminateServer=true
...

[edit] Any 3D app crashes fglrx

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:

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

Then just tell mount to update based on the new information:

# mount /dev/shm

[edit] Mplayer in full-screen

If you have problems with mplayer not playing in full screen, set

File: /etc/X11/xorg.conf
...
Option "VideoOverlay"       "on"
...

Into your device section.

[edit] Runtime warnings/errors

[edit] libGL: failed to open DRM

If you get this error (for example if you use glxgears):

libGL error: failed to open DRM

then you are trying to run as a user that doesn't have permission to use the DRI (root is the default allowed user). To let all users access the DRI, add the following section to your /etc/X11/xorg.conf:

File: /etc/X11/xorg.conf
...
Section "dri"
   Mode 0666
EndSection
...

Alternatively, you can use the group "video" to control access. If you want to do this, add the following section to your /etc/X11/xorg.conf:

File: /etc/X11/xorg.conf
...
Section "dri"
  Group "video"
  Mode 0660
EndSection
...

And then add the users which use X to the video group:

# gpasswd -a john video

[edit] No direct rendering

If fglrxinfo says "mesa3d.org" instead of "ATI" after A SUCCESSFUL modprobe of fglrx, for example like so:

display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.2.1)

you may need to do

# emerge -av eselect-opengl # eselect opengl set ati # source /etc/profile

Also, make sure DRI is enabled and started with the proper permissions set in your xorg.conf as well, as explained in this section. A proper output looks like follows:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: MOBILITY RADEON X300 Generic
OpenGL version string: 2.0.5695 (8.23.7)

OpenGL should work properly now with DRI enabled. Check with glxinfo.

[edit] ACPI script missing finger command

If you get the following errors in /var/log/acpid:

/etc/acpi/ati-powermode.sh: line 8: finger: command not found
/etc/acpi/ati-powermode.sh: line 10: finger: command not found

Install the netkit-fingerd package, which provides the the finger command.

# emerge -av netkit-fingerd

[edit] Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

ACPI service is probably not runing.

# /etc/init.d/acpid start

[edit] Failed to load module "dri2" (module does not exist, 0)

Check your ModulePath, I had to modify it like this:

# slocate dri2*.so /usr/lib64/opengl/xorg-x11/extensions/libdri2.so
File: /etc/X11/xorg.conf
...
Section "Files"
    ModulePath "/usr/lib64/xorg/modules"
    ModulePath "/usr/lib64/opengl/xorg-x11/extensions/"
EndSection
...
Personal tools
In other languages