2014年8月17日日曜日

Linux に Nvidiaドライバー インストール

DebianにNvidia ドライバーを入れる

★やったこと


自分のグラボを調べる
$ lspci -nn | grep VGA

/etc/apt/sources.list にリポジトリを追記
または
から選んで(wheezyの場合のURL)

インテルなのでとりあえずこれを追記

deb http://ftp.de.debian.org/debian wheezy main non-free

nvidia-detectをインストール

#  apt-get install  nvidia-detect


nvidia-detect で更に詳細を調べる

$ nvidia-detect
Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G98 [GeForce 8400 GS] [10de:06e4] (rev a1)
Your card is supported by the default drivers and version 173.
It is recommended to install the
    nvidia-glx
package.

この公式サイトのDriversの項目のsupported devicesから上記の赤マークをみながらどれが合うか探す
https://wiki.debian.org/NvidiaGraphicsDrivers#Identification


かなり古いグラボだけど最新のドライバーも合うようだ


/etc/apt/sources.list にリポジトリを追記
(wheezyの場合のURL)
# wheezy-backports
deb http://http.debian.net/debian/ wheezy-backports main 
contrib non-free
(※  /debian/    と wheezy-backports の間はスペース1個入れないとエラーになる)

必要なパッケージをインストール
# aptitude update
# aptitude install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') 
# aptitude -t wheezy-backports -r install nvidia-kernel-
dkms
上記は推奨パッケージをインストールしてくれる



/etc/X11/xorg.conf.d に設定ファイルを作る
  • # mkdir /etc/X11/xorg.conf.d
    # echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf

再起動



GUIでデュアルディスプレイなどの設定 rootでする
# nvidia-settings


設定したらSave to Configuration File/etc/X11/xorg.conf.d/20-nvidia.confに上書き



ところが
xfce4と設定がダブってる?ようでnvidia設定が反映されず

・メニュー -> Settings -> Settings Editor のdisplays を右クリでReset
・ユーザーの .cache  を削除
・root の .cache を削除

をやったら設定が反映されるようになった

動作が少し速くなったような気がする
ゲーム以外の部分にも恩恵があるようだ


Debian 7.6

参考サイト: https://wiki.debian.org/NvidiaGraphicsDrivers#Identification

https://packages.debian.org/search?keywords=nvidia-detect

https://wiki.debian.org/NvidiaGraphicsDrivers#configure


0 件のコメント:

コメントを投稿