Difference between revisions of "NVIDIA (日本語)"

From ArchWiki
Jump to: navigation, search
Line 57: Line 57:
 
NVIDIA のビルドをする一時ディレクトリの中へ移動します:
 
NVIDIA のビルドをする一時ディレクトリの中へ移動します:
 
  $ cd ~/devel/abs/nvidia
 
  $ cd ~/devel/abs/nvidia
{{Filename|nvidia.install}} と {{Filename|PKGBUILD}} が正しいカーネルバージョン変数を含むように、それらのファイルを編集する必要があります。
+
{{ic|nvidia.install}} と {{ic|PKGBUILD}} が正しいカーネルバージョン変数を含むように、それらのファイルを編集する必要があります。
  
 
カスタムカーネルを実行している間に、適切なカーネルとローカルバージョン名を得ましょう:
 
カスタムカーネルを実行している間に、適切なカーネルとローカルバージョン名を得ましょう:
Line 70: Line 70:
  
 
==設定==
 
==設定==
おそらく、ドライバをインストールした後に Xorg server の設定ファイルを作成する必要はないかもしれません。Xorg server が設定ファイルなしできちんと機能してるかどうか調べるために、[[Xorg#Running Xorg| a test]] を実行することができます。しかし、様々な設定を調節するために、{{Filename|/etc/X11/xorg.conf}} を作成することが要求されるかもしれません。この設定は NVIDIA Xorg 設定ツールで生成できますし、あるいは、手動でも作成できます。手動で作成された場合、最小の設定 ([[Xorg]] server に基本的なオプションだけを与えるという意味です。) となるか、自動検知されたか事前に設定された Xorg のオプションを迂回できる [[Xorg#Manual configuration|設定]]を含みます。
+
おそらく、ドライバをインストールした後に Xorg server の設定ファイルを作成する必要はないかもしれません。Xorg server が設定ファイルなしできちんと機能してるかどうか調べるために、[[Xorg#Running Xorg| a test]] を実行することができます。しかし、様々な設定を調節するために、{{ic|/etc/X11/xorg.conf}} を作成することが要求されるかもしれません。この設定は NVIDIA Xorg 設定ツールで生成できますし、あるいは、手動でも作成できます。手動で作成された場合、最小の設定 ([[Xorg]] server に基本的なオプションだけを与えるという意味です。) となるか、自動検知されたか事前に設定された Xorg のオプションを迂回できる [[Xorg#Manual configuration|設定]]を含みます。
  
 
===Automatic configuration===
 
===Automatic configuration===
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{Filename|xorg.conf}}) and can be run by:
+
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:
 
  # nvidia-xconfig
 
  # nvidia-xconfig
  
This command will auto-detect and create (or edit, if already present) the {{Filename|/etc/X11/xorg.conf}} configuration according to present hardware.
+
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.
  
 
If there are instances of DRI, ensure they are commented out:
 
If there are instances of DRI, ensure they are commented out:
Line 90: Line 90:
  
 
===Minimal configuration===
 
===Minimal configuration===
To create a basic {{Filename|/etc/X11/xorg.conf}}, as root:
+
To create a basic {{ic|/etc/X11/xorg.conf}}, as root:
 
  # vi /etc/X11/xorg.conf
 
  # vi /etc/X11/xorg.conf
  
Line 114: Line 114:
 
Or add it to the the desktop environment's auto-startup method.
 
Or add it to the the desktop environment's auto-startup method.
  
{{Tip | On rare occasions the {{Filename|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.}}
+
{{Tip | On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.}}
  
 
===Advanced: xorg.conf===
 
===Advanced: xorg.conf===
Edit {{Filename|/etc/X11/xorg.conf}}, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up {{Filename|xorg.conf}} before making any edits. The Xorg server will need to be restarted before any changes are applied.
+
Edit {{ic|/etc/X11/xorg.conf}}, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up {{ic|xorg.conf}} before making any edits. The Xorg server will need to be restarted before any changes are applied.
  
 
* See [http://us.download.nvidia.com/XFree86/Linux-x86_64/256.53/README/index.html NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.]
 
* See [http://us.download.nvidia.com/XFree86/Linux-x86_64/256.53/README/index.html NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.]
Line 258: Line 258:
 
To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.
 
To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.
  
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, {{Filename|/etc/X11/dfp0.edid}}.
+
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.
  
 
Edit xorg.conf by adding to the "Device" section:
 
Edit xorg.conf by adding to the "Device" section:
Line 337: Line 337:
 
{{Note|GTX 4xx/5xx series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}
 
{{Note|GTX 4xx/5xx series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}
  
Place the following line in your [[xinitrc|{{filename|~/.xinitrc}}]] file to adjust the fan when you launch Xorg. Replace <n> with the fan speed percentage you want to set.
+
Place the following line in your [[xinitrc|{{ic|~/.xinitrc}}]] file to adjust the fan when you launch Xorg. Replace <n> with the fan speed percentage you want to set.
  
 
  nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=<n>"
 
  nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=<n>"
Line 348: Line 348:
 
  -a  [fan:1]/GPUCurrentFanSpeed=<n>" &
 
  -a  [fan:1]/GPUCurrentFanSpeed=<n>" &
  
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{filename|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change <n> to the speed percentage you want.
+
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change <n> to the speed percentage you want.
  
 
  [Desktop Entry]
 
  [Desktop Entry]
Line 370: Line 370:
  
 
===Old Xorg Settings===
 
===Old Xorg Settings===
If upgrading from an old installation, please remove old {{Filename|/usr/X11R6}} paths as it can cause trouble during installation.
+
If upgrading from an old installation, please remove old {{ic|/usr/X11R6}} paths as it can cause trouble during installation.
  
 
===Corrupted screen: "Six screens" issue===
 
===Corrupted screen: "Six screens" issue===
Line 436: Line 436:
  
 
===Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace===
 
===Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace===
If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{Filename|/etc/modprobe.d/modprobe.conf}}:
+
If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:
 
  options nvidia NVreg_Mobile=1
 
  options nvidia NVreg_Mobile=1
  

Revision as of 12:21, 13 February 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start

Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

この記事は、NVIDIAプロプライエタリなグラフィックカードドライバのインストールと設定をカバーしています。オープンソースのドライバについての情報に関しては、 Nouveau を見てください。

Contents

インストール

以下は、stock kernel26 パッケージを使っている人向けの指示です。カスタム kernel のセットアップには、next サブセクションまで読み飛ばしてください。

Tip: NVIDIA のサイトで提供されているパッケージよりも pacman を通して NVIDIA ドライバをインストールする方がたいていの場合有益です。なぜなら、そうすることで、システムをアップデートした際にドライバもアップデートすることができるからです。

1. NVIDIA の driver download site を訪れて、お持ちのビデオカードに合ったドライバを見つけてください。

2. 新しめのビデオカード (GF FX の後に出た最新の GPU) 用のドライバをインストールします:

# pacman -S nvidia nvidia-utils

古めのビデオカード (Geforce FX シリーズ) をお持ちのユーザは以下をインストールします:

# pacman -S nvidia-173xx nvidia-173xx-utils

あるいは、(GF 4 までのビデオカードの場合):

# pacman -S nvidia-96xx nvidia-96xx-utils
Note: For the latest card models, it may be required to install Template:Package AUR and Template:Package AUR from the AUR since the stable drivers may not support the newly introduced features.
Note: On 64 bit systems, For 32-bit programs to take advantage of nvidia-utils you must also install the equivalent lib32 package (for example lib32-nvidia-utils).
Tip: Rebooting is generally recommended after updating kernel and graphic drivers.

ドライバがインストールされたら、続けて #Configuring へと進んでください。

カスタム kernel の場合のインストール方法

まず最初に、ABS システムがどのような働きをするのかを他の記事をいくつか読んで知ることで得るものがあります:

Note: There is the Template:Package AUR package on AUR which turns out to make it easier to install the nvidia driver for custom kernels and multiple kernels

以下の内容は、ABS を使用する NVIDIA ドライバのカスタムパッケージを作るための簡単なチュートリアルです:

ABS をインストールしてツリーを生成します:

# pacman -S abs
# abs

一般ユーザで、新しいパッケージを作るための一時ディレクトリを作成します:

$ mkdir -p ~/devel/abs

NVIDIA パッケージのディレクトリのコピーを作成します:

$ cp -r /var/abs/extra/nvidia/ ~/devel/abs/

NVIDIA のビルドをする一時ディレクトリの中へ移動します:

$ cd ~/devel/abs/nvidia

nvidia.installPKGBUILD が正しいカーネルバージョン変数を含むように、それらのファイルを編集する必要があります。

カスタムカーネルを実行している間に、適切なカーネルとローカルバージョン名を得ましょう:

$ uname -r
  1. nvidia.install にある、 KERNEL_VERSION="2.6.xx-ARCH" 変数をカスタムカーネルのバージョンで置き換えます。例えば、KERNEL_VERSION="2.6.22.6"KERNEL_VERSION"2.6.22.6-custom" のようにしますが、カーネルのバージョンが何か、text/numbers のローカルバージョンが何かによります。このファイルの中のすべてのバージョン番号に対して置換を行ってください。
  2. PKGBUILD にある, _kernver='2.6.xx-ARCH' 変数を変更して、上記のように、適切なバージョンに合うようにしてください。
  3. 一つ以上のカーネルが並行してシステムにインストールされてるなら、(デフォルトの -ARCH kernel とカスタムカーネルが並ぶように) PKGBUILD の "pkgname=nvidia" 変数を一意な識別子、例えば nvidia-2622 や nvidia-custom へと変更します。こうすることで、カスタム NVIDIA モジュールは異なるパッケージ名となり、オリジナルのパッケージを上書きしないようになるので、両方のカーネルが NVIDIA モジュールを使えるようにできます。

それからこうします:

$ makepkg -ci

-c オプションは、NVIDIA ドライバのビルドが終わった後にファイルを片付けるように makepkg に伝え、また、 -i は makepkg が自動で pacman を起動して出来あがったパッケージをインストールするように指示するものです。

設定

おそらく、ドライバをインストールした後に Xorg server の設定ファイルを作成する必要はないかもしれません。Xorg server が設定ファイルなしできちんと機能してるかどうか調べるために、 a test を実行することができます。しかし、様々な設定を調節するために、/etc/X11/xorg.conf を作成することが要求されるかもしれません。この設定は NVIDIA Xorg 設定ツールで生成できますし、あるいは、手動でも作成できます。手動で作成された場合、最小の設定 (Xorg server に基本的なオプションだけを与えるという意味です。) となるか、自動検知されたか事前に設定された Xorg のオプションを迂回できる 設定を含みます。

Automatic configuration

The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file (xorg.conf) and can be run by:

# nvidia-xconfig

This command will auto-detect and create (or edit, if already present) the /etc/X11/xorg.conf configuration according to present hardware.

If there are instances of DRI, ensure they are commented out:

#    Load        "dri"

Double check your Template:Filename to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.

Warning: That may still not work properly with Xorg-server 1.8

Automatic configuration with multiple monitors

The NVIDIA package provides Twinview. This tool will help by automatically configuring all the monitors connected to your video card. This only works for multiple monitors on a single card. To configure Xorg Server with Twinview run:

# nvidia-xconfig --twinview

Minimal configuration

To create a basic /etc/X11/xorg.conf, as root:

# vi /etc/X11/xorg.conf

And add the driver:

Section "Device"
   Identifier     "Device0"
   Driver         "nvidia"
   VendorName     "NVIDIA Corporation"
EndSection
Tip: Make sure, in order to have full multimedia functionality, to have xorg-input-drivers installed.

Tweaking

GUI: nvidia-settings

The NVIDIA package includes the nvidia-settings program that allows adjustment of several additional settings.

For the settings to be loaded on login, run this command from the terminal:

$ nvidia-settings --load-config-only

Or add it to the the desktop environment's auto-startup method.

Tip: On rare occasions the ~/.nvidia-settings-rc may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the issue.

Advanced: xorg.conf

Edit /etc/X11/xorg.conf, and add the option to the correct section. NVIDIA tests and ships the drivers with the recommended setting so note that some edits may cause instability, tearing, among other problems. Since not all options may work for a given system, consider backing up xorg.conf before making any edits. The Xorg server will need to be restarted before any changes are applied.

Enabling desktop composition

As of NVIDIA driver version 180.44, support for GLX with the Damage and Composite X extensions is enabled by default. Refer to Composite for detailed instructions.

Disabling the logo on startup

Add the "NoLogo" option under section Device:

Option "NoLogo" "1"

Enabling hardware acceleration

Note: RenderAccel is enabled by default since drivers version 97.46.xx

Add the "RenderAccel" option under section Device:

Option "RenderAccel" "1"

Overriding monitor detection

The "ConnectedMonitor" option under section Device allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: "CRT" for analog connections, "DFP" for digital monitors and "TV" for televisions.

The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:

Option "ConnectedMonitor" "DFP"
Note: Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI digital connections only.

Enabling triple buffering

Enable the use of triple buffering by adding the "TripleBuffer" Option under section Device:

Option "TripleBuffer" "1"

Use this option if the graphics card has plenty of ram (equal or greater than 128MB). The setting only takes effect when syncing to vblank is enabled, one of the options featured in nvidia-settings.

Note: This option may introduce full-screen tearing and reduce performance.

Using OS-level events

Taken from the NVIDIA driver's README file: "[...] Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited." It may help improving performance, but it is currently incompatible with SLI and Multi-GPU modes.

Add under section Device:

Option "DamageEvents" "1"
Note: This option is enabled by default in newer driver versions.

Enabling power saving

Add under section Monitor:

Option "DPMS" "1"

Forcing Powermizer performance level (for laptops)

Add under section Device:

# Force Powermizer to a certain level at all times
# level 0x1=highest
# level 0x2=med
# level 0x3=lowest
# AC settings:
Option "RegistryDwords" "PowerMizerLevelAC=0x3"
# Battery settings:
Option	"RegistryDwords" "PowerMizerLevel=0x3"

Settings are better explained in NVIDIA Driver for X.org:Performance and Power Saving Hints.

Letting the GPU set its own performance level based on temperature

Add under section Device:

Option "RegistryDwords" "PerfLevelSrc=0x3333"

Disable vblank interrupts (for laptops)

When running the interrupt detection utility powertop, it can be observed that the Nvidia driver will generate an interrupt for every vblank. To disable, place in the Device section:

Option "OnDemandVBlankInterrupts" "1"

This will reduce interrupts to about one or two per second.

Enabling overclocking

Warning: Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.

To enable GPU and memory overclocking, place the following line in the Device section:

Option "Coolbits" "1"

This will enable on-the-fly overclocking within an X session by running:

$ nvidia-settings
Note: GTX 4xx/5xx series Fermi cores cannot currently be overclocked using the Coolbits method. The alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of nvflash and NiBiTor 6.0. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits.
Setting static 2D/3D clocks

Set the following string in the Device section to enable PowerMizer at its maximum performance level:

Option "RegistryDwords" "PerfLevelSrc=0x2222"

Set one of the following two strings in the Device section to enable manual GPU fan control within nvidia-settings:

Option "Coolbits" "4"
Option "Coolbits" "5"

Enable screen rotation through XRandR

Place the following line in the Device section:

Option "RandRRotation" "True"

After restarting Xorg:

$ xrandr -o left

The Screen should be rotated. To restore:

$ xrandr -o normal
Note: Editing xorg.conf may be unnecessary since screen rotation should be enabled by default, ideally by using the respective DE tools, such as SystemSettings in KDE.

Tips and tricks

Enabling Pure Video HD (VDPAU/VAAPI)

Hardware Required:

At least a video card with second generation PureVideo HD [1]

Software Required:

Nvidia video cards with the proprietary driver installed will provide video decoding capabilities with the VDPAU interface at different levels according to PureVideo generation.

You can also add support for the VA-API interface with:

# pacman -S vdpau-video

Check VA-API support with:

$ vainfo

To take full advantage of the hardware decoding capability of your video card you will need a media player that supports VDPAU or VA-API.

To enable hardware acceleration in MPlayer edit ~/.mplayer/config

vo=vdpau
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,


To enable hardware acceleration in VLC go:

Tools -> Settings -> Videos and codec -> check "Use GPU acceleration"

To enable hardware acceleration in smplayer go:

Options -> Preferences -> General -> Video Tab -> select vdpau as output driver

To enable hardware acceleration in gnome-mplayer go:

Edit -> Preferences -> set video output to vdpau

Playing HD movies on cards with low memory:

If your graphic card doesn't have a lot of memory(>521MB?), you can experience glitches when watching 1080p or even 720p movies. To avoid that start simple window manager like TWM or MWM.

Additionally increasing the MPlayer's cache size in ~/.mplayer/config can help, when your hard drive is spinning down when watching HD movies.

Using TV-out

A good article on the subject can be found here

X with a TV (DFP) as the only display

The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.

To force nvidia to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.

To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the "DFP" section (again, "DFP-0" or similar), click on the "Acquire Edid" Button and store it somewhere, for example, /etc/X11/dfp0.edid.

Edit xorg.conf by adding to the "Device" section:

Option "ConnectedMonitor" "DFP"
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"

The "ConnectedMonitor" option forces the driver to recognize the DFP as if it were connected. The "CustomEDID" provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.

This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.

Displaying GPU temperature in the shell

Method 1 - nvidia-settings

Note: This method requires that you're using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer nvidia cards such as the G210/220 as well as embedded GPUs such as the Zotac IONITX's 8800GS.

To display the GPU temp in the shell, use nvidia-settings as follows:

$ nvidia-settings -q gpucoretemp

This will output something similar to the following:

Attribute 'GPUCoreTemp' (hostname:0.0): 41.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target types: X Screen, GPU.

The GPU temps of this board is 41 C.

In order to get just the temperature for use in utils such as rrdtool or conky, among others:

$ nvidia-settings -q gpucoretemp -t
41

Method 2 - nvidia-smi

Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. To display the GPU temp in the shell, use nvidia-smi as follows:

$ nvidia-smi -a

This should output something similar to the following:

$ nvidia-smi -a

==============NVSMI LOG==============


Timestamp			: Mon Dec 13 20:11:28 2010

Driver Version			: 260.19.29


GPU 0:
	Product Name		: GeForce 8400 GS
	PCI Device/Vendor ID	: 6e410de
	PCI Location ID		: 0:1:0
	Board Serial		: 2648101198649
	Display			: Connected
	Temperature		: 40 C
	Utilization
	    GPU			: 1%
	    Memory		: 8%

In order to get just the temperature for use in utils such as rrdtool or conky, among others:

$ nvidia-smi -a | grep Temp | cut -c17-18
40

Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli

Method 3 - nvclock

Use nvclock which is available from the [extra] repo. Note that nvclock cannot access thermal sensors on newer nvidia cards such as the G210/220.

There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to this post by the author (thunderbird) of nvclock, the nvclock values should be more accurate.

Set Fan Speed at Login

You can adjust the fan speed on your graphics card with nvidia-settings's console interface. First ensure that your Xorg configuration sets the Coolbits option to 4 or 5 in your Device section to enable fan control.

Option "Coolbits" "4"
Note: GTX 4xx/5xx series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.

Place the following line in your ~/.xinitrc file to adjust the fan when you launch Xorg. Replace <n> with the fan speed percentage you want to set.

nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=<n>"

You can also configure a second GPU by incrementing the GPU and fan number.

nvidia-settings -a "[gpu:0]/GPUFanControlState=1" \ 
-a "[gpu:1]/GPUFanControlState=1" \
-a "[fan:0]/GPUCurrentFanSpeed=<n>" \
-a  [fan:1]/GPUCurrentFanSpeed=<n>" &

If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create ~/.config/autostart/nvidia-fan-speed.desktop and place this text inside it. Again, change <n> to the speed percentage you want.

[Desktop Entry]
Type=Application
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=<n>"
X-GNOME-Autostart-enabled=true
Name=nvidia-fan-speed

Troubleshooting

Gaming using Twinview

In case you want to play fullscreen games when using Twinview, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably don't want to play on both screens at the same time.

To correct this behavior for SDL, try:

export SDL_VIDEO_FULLSCREEN_HEAD=1

For OpenGL, add the appropiate Metamodes to your xorg.conf in section Device and restart X:

Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL;  1280x1024,NULL;"

Another method that may either work alone or in conjunction with those mentioned above is starting games in a separate X server.

Old Xorg Settings

If upgrading from an old installation, please remove old /usr/X11R6 paths as it can cause trouble during installation.

Corrupted screen: "Six screens" issue

For some users using Geforce GT 100M's, the screen turns out corrupted after X starts; divided into 6 sections with a resolution limited to 640x480.

To solve this problem, enable the Validation Mode NoTotalSizeCheck in section Device:

Section "Device"
 ...
 Option "ModeValidation" "NoTotalSizeCheck"
 ...
EndSection

'/dev/nvidia0' Input/Output error

This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is not the issue. The Nvidia documentation does not talk in detail on what you should do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.

First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there's only one video processor. In such case you should find out the amount of your system's video memory (e.g. with lspci -v) and pass allocation parameters to the kernel, e.g.:

vmalloc=64M
or
vmalloc=256M

Another thing to try is to change your BIOS IRQ routing from Operating system controlled to BIOS controlled or the other way around. The first one can be passed as a kernel parameter:

PCI=biosirq

The noacpi kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.

Note: The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.

'/dev/nvidiactl' errors

Trying to start an opengl application might result in errors such as:

Error: Could not open /dev/nvidiactl because the permissions are too
restrictive. Please see the FREQUENTLY ASKED QUESTIONS 
section of /usr/share/doc/NVIDIA_GLX-1.0/README 
for steps to correct.

Solve by adding the appropiate user to the "video" group and relogin:

# gpasswd -a username video

32 bit applications do not start

Under 64 bit systems, installing lib32-nvidia-utils that corresponds to the same version installed for the 64 bit driver fixes the issue.

Errors after updating the kernel

If a custom build of nvidia's module is used instead of the package from [extra], a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.

Crashing in general

  • Try disabling RenderAccel in xorg.conf.
  • If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add nopat at the end of the kernel line in /boot/grub/menu.lst.
  • If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in /etc/profile:
export IGNORE_CC_MISMATCH=1
  • If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument nopat to the kernel line in menu.lst.

More information about trouble-shooting the driver can be found in the NVIDIA forums.

Bad performance after installing a new driver version

If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on:

$ glxinfo | grep direct

If the command prints:

direct rendering: No 

then that could be an indication for the sudden FPS drop.

A possible solution could be to regress to the previously installed driver version and rebooting afterwards.

CPU spikes with 400 series cards

If you're experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the Device section of your Xorg configuration:

 Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"

Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace

If while using the legacy nvidia drivers Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via Ctrl-Alt-Backspace (or whatever the new "kill X" keybind is), try adding this in /etc/modprobe.d/modprobe.conf:

options nvidia NVreg_Mobile=1

One user had luck with this instead, but it makes performance drop significantly for others:

options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1

Note that NVreg_Mobile needs to be changed according to the laptop:

  • 1 for Dell laptops.
  • 2 for non-Compal Toshiba laptops.
  • 3 for other laptops.
  • 4 for Compal Toshiba laptops.
  • 5 for Gateway laptops.

See NVIDIA Driver's Readme:Appendix K for more information.

Refresh rate not detected properly by XRandR dependant utilities

The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the MetaMode bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.

In order to support DynamicTwinView, the NVIDIA driver must make each MetaMode appear to be unique to XRandR. Presently, the Nvidia driver accomplishes this by using the refresh rate as a unique identifier.

Use nvidia-settings -q RefreshRate to query the actual refresh rate on each display device.

The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.

This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to "false", which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.

External links