This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Xorg/ハードウェア3Dアクセラレーションガイド

From Gentoo Wiki (test)
< Xorg
Jump to:navigation Jump to: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.

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

はじめに

ハードウェア3Dアクセラレーションとは何ですか、またどうしてそれが必要なのですか?

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.

どうすればハードウェア3Dアクセラレーションが動作しますか?

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

DRIとは何ですか?

ダイレクト・レンダリング・インフラストラクチャはDRIとして知られる、グラフィックハードウェアに安全、効率的に直接アクセスすることが出来るフレームワークです。それはXサーバ、いくつかのクライアントライブラリ、カーネルへの変更を含みます。DRIの一番主要な利用法は高速なOpenGLの実装の作成です。

DRMとは何ですか?通常のXorgとどのように関連しますか?

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

目的

このガイドはXorgのみでダイレクトレンダリングが動作しない人々のためのものです。DRMは以下のドライバで動作します。

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

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

Xorgのインストールとカーネルの設定

Xorgのインストール

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 your chipset is not supported by the kernel you might have some success by passing agp=try_unsupported as a kernel parameter. This will use Intel's generic routines for AGP support. To add this parameter, edit your bootloader 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

/usr/src/linuxは最近のカーネルにリンクするを確認してください。

root #cd /usr/src/linux
root #make menuconfig
KERNEL Hardware 3D acceleration options
'"`UNIQ--pre-00000003-QINU`"'

カーネルのコンパイルとインストール

root #make && make modules_install

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

videoグループへのユーザの追加

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

root #gpasswd -a $USER video

ダイレクトレンダリングの設定

Xorgの設定

Hopefully just adding your user to the video group is sufficient to enable direct rendering. However, you may also need to create a file in /etc/X11/xorg.conf.d/. You can name it anything you like; just make sure it ends in .conf. Open up your favorite text editor and create a file with this inside it:

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

Replace radeon with the name of your driver.

/etc/conf.d/modulesの変更

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

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

3Dアクセラレーションのテスト

新しいカーネルでリブート

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

Note
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/ut2004-demo 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.

Troubleshooting

It doesn't work. I don't have rendering, and I can't tell why.

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.

When I startx, I get this error: "[drm] failed to load kernel module agpgart"

That's because you compiled agpgart into the kernel instead of as a module. Ignore it unless you're having problems.

I have a Radeon, and I want TV-Out.

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.

It doesn't work. My card is so incredibly new and cool that it isn't supported at all.

Try out the binary drivers. For AMD cards, use ati-drivers; a listing is at http://support.amd.com/us/gpudownload/Pages/index.aspx. If those don't support it, use fbdev. It's slow, but it works.

I have a PCI card and it doesn't work. Help!

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

外部の情報