With hardware 3D acceleration, three-dimensional rendering uses the graphics processor on your video card instead of taking up valuable CPU resources drawing 3D images. It's also referred to as "hardware acceleration" instead of "software acceleration" because without this 3D acceleration your CPU is forced to draw everything itself using the Mesa software rendering libraries, which takes up quite a bit of processing power. While Xorg typically supports 2D hardware acceleration, it often lacks hardware 3D acceleration. Three-dimensional hardware acceleration is valuable in situations requiring rendering of 3D objects such as games, 3D CAD and modeling.
In many cases, both binary and open-source drivers exist. Open-source drivers are preferable since we're using Linux and open source is one of its underlying principles. Sometimes, binary drivers are the only option, like with nVidia's cards. Binary drivers include media-video/nvidia-kernel and media-video/nvidia-glx for nVidia cards, media-video/mgavideo for Matrox cards and media-video/ati-drivers for ATI cards. Other open-source drivers include media-video/kyro-kernel for KyroII cards and media-video/ati-gatos for ATI cards, which aim to support ATI's video capabilities more fully.
The Direct Rendering Infrastructure (
X11-DRM is an
This guide is for people who can't get direct rendering working with just
Xorg. X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64
and sis300 series drivers. See the
With suggestions, questions, etc., e-mail
Please read our
Probe for your chipset and enable just that one.
# emerge pciutils; lspci | grep AGP # 00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)Your output may not match the above due to different hardware.
If your chipset is not supported by the kernel you might have some succes by
passing
Most, if not all, kernels should have these options. This was configured using gentoo-sources-2.4.20-r5.
# ls -l /usr/src/linux lrwxrwxrwx 1 root root 22 May 29 18:20 /usr/src/linux -> linux-2.4.20-gentoo-r5Make sure /usr/src/linux links to your current kernel. # cd /usr/src/linux # make menuconfig
Processor type and features ---> <*> MTRR (Memory Type Range Register) support Character devices ---> <M> /dev/agpgart (AGP Support) [*] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 supportEnable your chipset instead of the above. [ ] Direct Rendering Manager (XFree86 DRI support)
If you use a 2.4 kernel, make sure the Direct Rendering Manager (DRM) is
# make dep && make clean bzImage modules modules_install # mount /boot # cp arch/i386/boot/bzImage /boot
If you want your kernel to be named something other than bzImage, be sure to copy to /boot/yourname instead. Don't forget to set up grub.conf or lilo.conf and run /sbin/lilo if you use LILO.
# emerge x11-drm
Open
... Section "Module" Load "dri" Load "glx" ... EndSection ... Section "Device" Driver "radeon" ... EndSection ... Section "dri" Mode 0666 EndSection
If you are using a different driver, replace "radeon" with yours.
Reboot your computer to your new kernel. It's time to see if you have direct rendering and how good it is.
# startxNo need to load modules for your driver or agpgart, if you compiled agpgart as a module. They will be loaded automatically. # glxinfo | grep rendering direct rendering: YesIf it says "No," you don't have 3D acceleration. # glxgearsTest your frames per second (FPS) at the default size. The number should be significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.
First you have to check whether the x11-drm package works. If it doesn't and you have checked your logs to verify it's not a configuration error, you might want to consider the CVS sources. There are also daily driver snapshots available if you do not wish to build the full CVS.
Check the DRI
The DRI project has a document about CVS compiling themselves. Please read
Verify that the DRI kernel module(s) for your system were built:
# cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel; ls
For the 3dfx Voodoo, you should see
Install over your XFree86 or X.org installation. You may wish to back up xfree or xorg-x11.
# quickpkg xorg-x11This backs up your Xorg-X11 package. # make install
Follow the "Configure Xorg" section above.
To load the appropriate DRM module in your running kernel, copy the kernel
module to
A few options may increase performance by up to 30 percent (or more) over the
default. Set them in
Section "Device" Option "AGPMode" "4"This increased FPS from 609 to 618. Option "AGPFastWrite" "True"This had no measurable effect, but it may increase instability of your computer. You may also need to set it in your BIOS. Option "EnablePageFlip" "True"This improved FPS from 618 to 702. It also is "risky" but few people have reported problems. ... EndSection
If you want to set even more features, check out the
Whenever you rebuild your kernel or switch to another kernel, you'll have to rebuild the kernel module. Note that you don't need to remerge xfree or xorg-x11, but you will need to remerge x11-drm.
Try
That's because you compiled agpgart into the kernel instead of as a module. Ignore it unless you're having problems.
You aren't using the x11-drm driver. Check if you compiled DRM and the driver into the kernel; you shouldn't have.
Check out ati-gatos drivers.
Try out the binary drivers. For ati-drivers, a listing is at
In section "Device" enable ForcePCIMode.
Option "ForcePCIMode" "True"