From Gentoo Wiki
< Xorg
Jump to: navigation, search
This page is a translated version of the page Xorg/Hardware 3D acceleration guide and the translation is 49% complete.

Outdated translations are marked like this.
Other languages:
English • ‎español • ‎italiano • ‎русский • ‎中文(中国大陆)‎ • ‎日本語 • ‎한국어

この文書はGentoo LinuxのXorgでDRMを使用して3Dアクセラレーションを動作させるためのガイドです



ハードウェア3Dアクセラレーションを利用すると3D画像の描画に貴重なCPU資源を奪う代わりにグラフィックカード上のGPUを使用して3Dレンダリングします。これはまた、ハードウェア3Dアクセラレーション無しではあなたのCPUは処理能力をかなり取り上げるMesaソフトウェアレンダリングライブラリを使用して描画することを強いられるため、ソフトウェアアクセラレーションの代わりにハードウェアアクセラレーションと呼ばれます。Xorgは2Dハードウェアアクセラレーションを一般的にサポートしていますが、3Dアクセラレーションはしばしば不足しています。3Dハードウェアアクセラレーションは3Dオブジェクトをレンダリングする必要があるゲーム、3D CAD、モデリングなどの状況で有用です。

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.


多くの場合、バイナリドライバとオープンソースドライバが存在します。オープンソースドライバは、私たちはLinuxを使っていてオープンソースであることはその根本原則の一つであるのでより望ましいです。時にはバイナリドライバが唯一の選択肢となる場合があります。特にあなたのグラフィックカードが新しく、そのカードの機能をサポートするオープンソースドライバが書かれていない場合などです。nVidiaのグラフィックカードのバイナリドライバは x11-drivers/nvidia-drivers に、AMD/ATIのグラフィックカードのバイナリドライバは x11-drivers/ati-drivers にあります。




DRM (ダイレクト・レンダリング・マネージャ)は、ダイレクトレンダリングに必要なカーネルモジュールを追加することにより、グラフィックカードのための3Dアクセラレーションを追加するXorgの付加機能です。



  • 3dfx
  • intel
  • matrox
  • nouveau
  • rage128
  • radeon
  • mach64
  • sis300
  • via

より詳細な情報とドキュメントについてはDRI ホームページを見てください。



Xorgを動作させるためにはXorg 設定ガイドを見てください。



root #emerge --ask pciutils
root #lspci | grep AGP
# 00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)


If the chipset is not supported by the kernel, some success may be obtained by passing agp=try_unsupported as a kernel parameter. This will use Intel's generic routines for AGP support. To add this parameter, edit the bootloader's configuration file.

Most, if not all, kernels should have these options. This was configured using a standard sys-kernel/gentoo-sources kernel.

root #ls -l /usr/src/linux
lrwxrwxrwx 1 root root 22 2007-02-14 20:12 /usr/src/linux -> linux-2.6.18-gentoo-r4


root #cd /usr/src/linux
root #make menuconfig

KERNEL Hardware 3D acceleration options
Processor type and features --->
<*> MTRR (Memory Type Range Register) support
Device drivers --->
   Graphics support --->
   <M> /dev/agpgart (AGP Support) --->
      (The agpgart option is not present on 64-bit kernels;
      just choose the appropriate chipset support.)
      <M> Intel 440LX/BX/GX, I8xx and E7x05 support
      (Enable the appropriate chipset instead of the above.)
   <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
      <M> (Select the appropriate  graphics card from the list)


root #make && make modules_install

grub.conflilo.conf かの設定してください。 設定終わったら、 /sbin/lilo を実効してください.

When using LILO, issue:

root #lilo

When using GRUB 2, run:

root #grub-mkconfig -o /boot/grub/grub.cfg


Next, add the appropriate user(s) to the video group:

root #gpasswd -a $USER video



Hopefully just adding the appropriate user to the video group is sufficient to enable direct rendering. However, Xorg may need some additional configuration via the /etc/X11/xorg.conf.d/ directory. New configuration files created in this directory may be named any alpha-numeric file name, as long as the file suffix ends in .conf. Open up a favorite text editor and create a file with this inside it:

FILE /etc/X11/xorg.conf.d/10-dri.conf
Section "Device"
  Driver "radeon"
Section "dri"
  Mode 0666

Replace radeon with the name of the appropriate driver.


You will need to add the module name that your card uses to /etc/modules-load.d/video.conf to ensure that the module is loaded automatically when the system starts up.

FILE /etc/modules-load.d/video.conf
intel-agp # Substitute with your driver
If you compiled agpgart as a module, you will also need to add it to /etc/modules-load.d/video.conf.



Reboot your computer to your new kernel and login as a normal user. It's time to see if you have direct rendering and how good it is. glxinfo and glxgears are part of the x11-apps/mesa-progs package, so make sure it is installed before you attempt to run these commands.

user $startx

No need to load modules for your driver or agpgart, even if you compiled them as a module. They will be loaded automatically.

user $glxinfo | grep rendering
direct rendering: Yes

If it outputs "No", you don't have 3D acceleration.

user $glxgears

Test your frames per second (FPS) at the default size. The number should be significantly higher than before configuring DRM. Do this while the CPU is as idle as possible.

FPS may be limited by your screen's refresh rate, so keep this in mind if glxgears reports only about 70-100 FPS. games-fps/xonotic or other 3D games are better benchmarking tools, as they give you real-world performance results.

Get the most out of direct rendering

If you want to set more features, for performance or other reasons, check out the feature matrix on the DRI web site or the features listing on Sourceforge.


Problem with rendering

Try modprobe radeon before you start the X server (replace radeon with the name of your driver). Also, try building agpgart into the kernel instead of as a module.

Failed to load kernel module agpgart when running startx

error: "[drm] failed to load kernel module agpgart" after invoking `startx` is caused by presents of compiled agpgart in the kernel instead of as a module. Ignore it unless you're having problems.

TV-Out on Radeon GPU

The drivers originally developed by the GATOS project have been merged into Xorg's codebase. You don't need anything special for TV-Out; x11-drivers/xf86-video-ati will work just fine.

Compatibility for freshly released GPUs

Try out the binary drivers. For AMD cards, use ati-drivers. If those don't support it, use fbdev. It's slow, but it works.

PCI card doesn't work properly

Create a config file in /etc/X11/xorg.conf.d/; name it anything you want as long as it ends in .conf. Add the following to it:

FILE /etc/X11/xorg.conf.x/10-pcimode.confAdding ForcePCI Mode
Section "Device"
  Option "ForcePCIMode" "True"