3d Accelerated Graphics Troubleshooter

Check if direct rendering is working

A way to tell if 3D accelerated graphics are working is to use the glxinfo tool (from the package mesa-utils):

This will return a string indicating whether or no direct rendering is enabled. If it says yes then 3d graphics are enabled and working. There is no need to follow this troubleshooter.

If it says no then 3D graphics are not enabled, the following troubleshooter will help to diagnose 3D graphics problems.

Check that the Kernel AGP Driver is Loaded

This check is only required for AGP cards, this can be skipped for PCI cards. To check for AGP support:

If this produces no output, the agpgart support needs to be compiled into the kernel or the appropriate kernel module loaded.

Note that the above will only work if the relevant kernel messages are still in the kernel ring buffer, which may not be the case if the system has been up for a while. An alternate check is:

If it complains about an unsupported chipset/bridge, make sure that chipset-specific AGP support is included in the configured kernel. This chipset support is for the motherboard, not the video card, so if this is an ATI Radeon on an Intel motherboard, the required chipset support is intel-agp.ko, not ati-agp.ko.

Check that the Kernel DRM Module is Loaded

It is now necessary to check that the DRM (Direct Rendering Module, the kernel module) is loaded and that the video card has been found:

This should produce several lines of information:

 [drm] AGP 0.99 on Intel i815 @ 0xe8000000 64MB
 [drm] Initialized radeon 1.1.1 20010405 on minor

Note that 64MB is the size of the AGP aperture, not the size of the video card memory. The AGP aperture size is how much system memory can be accessed by the card if X chooses to allow it.

If this returns the DRM version but not card-specific DRM output, the video card may not be supported, or it may not be getting probed due to the PCI ID being missing from the device driver module.

Note that the above will only work if the relevant kernel messages are still in the kernel ring buffer, which may not be the case if the system has been up for a while. An alternate check is:

Check that the Direct Rendering Modules are starting in X

Start the [xserver], if it is not running:

The following command can be used to check that the direct rendering modules are starting:

This should return something like:

or

If this does not produce any output, it is necessary to check that that the [dri] and [glx] modules are being loaded in the Xorg configuration file (typically /etc/X11/org.conf, if it exists at all, and see here for more detail) configuration file:

 Section "Module"
   ...
   Load "dri"
   ... 
   Load "glx"
   ...
 EndSection

If the X log contains something like this:

(EE) AIGLX error: dlopen of /usr/lib/dri/i915_dri.so failed (/usr/lib/dri/i915_dri.so: cannot open shared object file: No such file or directory)
(EE) AIGLX: reverting to software rendering
(II) AIGLX: Screen 0 is not DRI capable
(EE) AIGLX error: dlopen of /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
(EE) GLX: could not load software renderer
(II) GLX: no usable GL providers found for screen 0

make sure that the package libgl1-mesa-dri is installed.

Check that the Direct Rendering Modules are working correctly

Check for any errors or messages that may have been written to the /var/log/Xorg.0.log error log, which may be a clue as to why direct rendering is not working:

 grep -i dri /var/log/Xorg.0.log
 grep -i drm /var/log/Xorg.0.log
 grep -i agp /var/log/Xorg.0.log
 grep '(EE)' /var/log/Xorg.0.log
 grep '(WW)' /var/log/Xorg.0.log

The following error message means that the libdri module is too old:

 (EE) [dri] RADEONDRIScreenInit failed because of a version mismatch
 (EE) [dri] libdri version is 4.2.0 but version 5.0.0 is needed.
 (EE) [dri] Disabling DRI.

The following error message means that the modules may be loading out of sequence:

Despite the fact that the agpgart module has loaded and initialized without problems, it is necessary to ensure that agpgart loads before the driver module for the chipset (like the radeon module). If agpgart loads later, the driver module will not see the AGP bus. It is also necessary to ensure that the kernel module for the AGP bridge loads before the driver module for your chipset. For example, if your AGP bridge is an AMD Irongate (this can be determined via lspci !-v and looking for the line containing AGP), make sure that amd_k7_agp is loaded before the radeon driver module.

If the kernel has been updated and the updated version shows up after you modprobe the appropriate foocard.o, make sure that the kernel has not been compiled with drm built in. If the following command shows that multiple versions are loaded, recompile the kernel without drm and install the updated module again:

If the following output line occurs:

This may be because the modules were built with a different [gcc] compiler version than the kernel. The [dmesg] tool will show warnings about version magic mismatches, if this is the case. Rebuild the kernel and the modules with the same compiler. If i915/i810 chipsets are being used, it is possible that the i810 driver contains a bug.

If the following output line occurs:

This means that the section about having the correct AGP modules loaded has been overlooked. Users of a 2.6.x kernel need to make sure both the agpgart core module and the appropriate chipset-specific module are loaded. The following command can be used to determine what sort of AGP chipset you have. Intel needs intel-agp, VIA needs via-agp, etc.

If an output line similar to the following occurs:

This is because none of the DRI drivers support rendering in 8-bit mode. If the video card is aVoodoo3, it will only works in 16-bit mode and will error if 32-bit mode is used. It is necessary to change the depth appropriately by adding the following entry to the !/etc/X11/XF86Config-4 configuration file:

If there are no [dri] lines in the output, and a message says Direct Rendering disabled, It may be that the display resolution is too high for 3d graphics rendering:

This will find a warning message:

It may be necessary to reduce the resolution or color depth. The video ram necessary for a given resolution/depth is width*height*(depth/8)*3 kilobytes. (The 3 is for front, back, and depth buffers).

If you are using Intel i8xx hardware and it says:

It may be necessary to allocate more system memory to the integrated graphics. In the Device section of the Xorg configuration file, increase the VideoRam parameter to a higher value:

A message such as the following indicates that 'glx' may not be loaded. Thia message may also occur if the parts of the Nvidia proprietary driver have been installed. It is necessary to remove the proprietary driver components.

Check the userspace configuration

The following command should show libGL trying to load the driver-specific hardware rendering library:

 export LIBGL_DEBUG=verbose
 glxinfo

This should show:

The following messages indicate that the driver files are missing:

 libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/r200_dri.so
 libGL error: dlopen /usr/X11R6/lib/modules/dri/r200_dri.so failed (/usr/X11R6/lib/modules/dri/r200_dri.so: cannot open shared object file: No such file or directory) libGL error:
 unable to find driver: r200_dri.so

It is necessary to ensure that libexpat.so.1 is installed:

The xlibmesa-dri package provides the r200_dri.so files:

If the driver complains about unresolved symbols, this means that the libGL version does not suit the [dri] drivers. It is necessary to reinstall both [libGL] and [dri]:

libGL error: dlopen /usr/X11R6/lib/modules/dri/radeon_dri.so failed (/usr/X11R6/lib/modules/dri/radeon_dri.so: undefined symbol: _glapi_noop_enable_warnings)

The following errors indicate that the user does not have permission to use the DRI (root is the default allowed user).

 libGL error: failed to open DRM: Operation not permitted
 libGL error: reverting to (slow) indirect rendering

The following section added to the Xorg configuration file will allow all users access the DRI:

 Section "DRI"
   Mode 0666
 EndSection