Nouveau/ja

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Nouveau and the translation is 85% complete.

nouveauNVIDIA グラフィックカード向けのオープンソースドライバです。FreeDesktop プロジェクトの傘下で保守されています。

制限

大部分がプロプライエタリであるハードウェアを扱うオープンソースプロジェクトである以上、クローズドソースの nvidia-drivers には存在しない Nouveau 固有の制限がいくつか存在します。とはいえ、Nouveau は常に成長を続けているので、これらの制限は時が経てば変わる可能性があります。

このドライバを使用したい方は、必要なカード(や機能)に対するサポートが追加されたかどうかを、アップストリームの機能表で確認するべきです。アップストリームにはまた、機能表と相互参照するためのカードのコードネーム一覧もあります。

インストール

カーネル

次のカーネルオプションを有効にします:

カーネル nouveau を有効化する
Device Drivers  --->
   Graphics support  --->
      <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
         <*> Enable legacy fbdev support for your modesetting driver
      <M/*> Nouveau (NVIDIA) cards

ファームウェア

Kepler シリーズ(GeForce 600番台)以降では、起動時にファームウェアを読み込む必要があるかもしれません。必要なファームウェアをカーネルに組み込むことをお勧めします。systemd を使うシステムではこれがデフォルトです。ファームウェアのカーネル組み込みについてのさらなる情報については、Linux firmware の記事をお読みください。

どのファームウェアが必要なのかを確認するために、upstream の コードネーム一覧を参照してください。

nouveau カードのためのファームウェアは sys-firmware/nvidia-firmware パッケージで配布されています。カーネルでファームウェアを定義する前に、インストールされていることを確認してください:

root #emerge --ask sys-firmware/nvidia-firmware

ドライバー

ファイル /etc/portage/make.confVIDEO_CARDS を nouveau に設定する
VIDEO_CARDS="... nouveau ..."

VIDEO_CARDS の値を設定または変更した後は、変更を反映させるために、忘れずに次のコマンドを使用してシステムを更新してください:

root #emerge --ask --changed-use --deep @world

udev

NVIDIA のプロプライエタリドライバが既にインストールされている場合、udev のルールファイルが /lib/udev/rules.d/99-nvidia.rules にインストールされているはずです。これを無効化せずに nouveau ドライバを使おうとすると、10ms ごとに出力される次のようなメッセージで X11 のログファイルが埋まってしまいます。

ファイル /var/log/Xorg.0.lognvidia-drivers 向けの古い udev ルールを残した結果
 [   180.669] (II) NOUVEAU(0): EDID vendor "SAM", prod id 430
 [   180.669] (II) NOUVEAU(0): Using hsync ranges from config file
 [   180.669] (II) NOUVEAU(0): Using vrefresh ranges from config file
 [   180.669] (II) NOUVEAU(0): Printing DDC gathered Modelines:
 [   180.669] (II) NOUVEAU(0): Modeline "1600x1200"x0.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz eP)
 [   180.669] (II) NOUVEAU(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "800x600"x0.0   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)
 [...]
 [   180.669] (II) NOUVEAU(0): Modeline "1152x864"x0.0  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync (67.5 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz e)
 [   180.669] removing GPU device /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card2 /dev/dri/card2

x11-drivers/nvidia-drivers パッケージを削除せずにこれを防ぐには、udev のルールファイル /lib/udev/rules.d/99-nvidia.rules を削除・移動・名前変更して、udev に読み込まれないようにします。詳しくは udev の高度な設定を参照してください。ただし nvidia-drivers が更新されるとこのファイルは再びインストールされるため、nvidia-drivers の削除を検討してください。

設定

パーミッション

If the acl USE flag is enabled globally and elogind is being used (default for desktop profiles) permissions to video cards will be handled automatically. It is possible to check the permissions using getfacl:

user $getfacl /dev/dri/card0 | grep larry
user:larry:rw-

A broader solution is to add the user(s) needing access the video card to the video group:

root #gpasswd -a larry video

Note that users will be able to run X without permission to the DRI subsystem, but hardware acceleration will be disabled.

xorg.conf

X serverはXorgの設定ファイルを手動で編集することなく、そのまま使えるよう設計されています。マウスや、キーボードやディスプレイといったデバイスは検出され、設定される"べき"なのです。

とはいえ、X サーバの主要な設定ファイルは xorg.conf ファイルです。

Intel GPU と Nouveau の間で切り換える

Sometimes users may want to switch between two drivers. One way this matter is handled is through initramfs and early Kernel Mode Setting.

For example, if initramfs is built using dracut, and nouveau is meant to be used, the following adjustments must take place:

ファイル /etc/dracut.conf
#add_drivers+=" i915 " # Note leading and trailing spaces
add_drivers+=" nouveau " # Note leading and trailing spaces
#force_drivers+=" i915 " # Note leading and trailing spaces
force_drivers+=" nouveau " # Note leading and trailing spaces

In kernel mode setting method using GRUB, the variable GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub can be changed to enable or disable either of GPUs by taking the right values.

For instance, to disable i915 and enable nouveau, we will add the following to GRUB_CMDLINE_LINUX_DEFAULT variable: i915.modeset=0 nouveau.modeset=1.

制限

クローズドソースの x11-drivers/nvidia-drivers と比較したときの、現時点での問題やデメリットをいくつか次に示します:

  • 同じカード/チップセットにおけるパフォーマンス(特に3Dパフォーマンス)は、nvidia-driversを使用するよりも遥かに悪くなるかもしれません。
  • 高いリフレッシュレート(例えば60Hzよりも上)で実行しようとすると失敗するかもしれません。
  • 様々なNVIDIAカードにある高度な設定(例えばSLIなしのQuadroカードにおける複数のディスプレイへの対処)は正しく機能しないかもしれません。


トラブルシューティング

マルチモニタの問題

デュアル モニター/ディスプレイを使用しているときに EDID プローブの可能性があると画面が頻繁にフリーズする場合は、GRUB/etc/default/grub ファイルの GRUB_CMDLINE_LINUX_DEFAULT 変数に video=VGA-1:e または video=VGA-1:d (それぞれ有効または無効) を追加してみてください。または他のローダーのそれぞれのカーネル コマンドライン オプション。dmesg または /var/log/Xorg.0.log にリストされているモニターの名前に置き換えてください (つまり、CRT-1、VGA-1、LVDS-1、DVI-1 など)。

For instance, on a Dell Inspiron 8100 laptop with a connected external display connected via the laptop's external VGA port, a possible command line is: video=LVDS-1:1280x1024@60 video=VGA-1:1280x1024@60. The EDID (DRM) probe on the external VGA connected display is still causing freezing during nouveau/DRM load for the author, but at least it's usable if the display is connected after GRUB is loaded and prior to the nouveau/DRM modules loading. And with the prior mentioned command line LVDS/VGA resolutions, the displays are cloned and centred with somewhat correct resolutions for cloned displays.

NVIDIA Optimus

When using a laptop with NVIDIA's Optimus technology (usually found in laptops built in 2010 and later), everything will be passed through the integrated graphics controller (usually Intel) before it gets to the discrete video card (NVIDIA), which can cause a lot of otherwise unexplained problems when enabled. There are a few ways to handle this, but the simplest is to disable Optimus through the BIOS (normally accessed by pressing F12 during boot). This will result in increased power consumption (decreased battery life, increased running temperature), as the NVIDIA card will now be handling all of the work all of the time.

関連項目

外部資料