噸NVIDIA Linux 專有統一驅動程序支持各種功能,例如 3d 渲染、opengl 等。本文介紹在 Debian Linux 版本 6.x amd64 上安裝和配置 NVIDIA 專有圖形驅動程序。
為什麼使用專有的 Unix 驅動程序
全面支持 3D 加速。這允許您在 Linux 上使用以下具有 3D 和 OpenGL 的應用程序:
- PlanetPenguin Racer、Extreme Tux Racer 和 Neverball 等遊戲。
- Linux 視頻編輯應用程序,例如cinelerra。
- 使用 compiz 提供的 3D 桌面效果,compiz 是 X Window 系統的合成窗口管理器。 使用 3D 圖形硬件為窗口管理創建快速復合桌面效果。
讓我們看看如何在 Debian Linux 上安裝 NVIDIA 驅動程序。
第 1 步:在 Debian 上安裝 Nvidia 的編譯器和所需工具
首先,安裝 build-essential 和內核頭文件包。# apt-get install build-essential linux-headers-$(uname -r)
第 2 步:禁用 Debian 上的 nouveau 驅動程序
NVIDIA 硬件的開源驅動程序包含在標準 Linux 發行版中。 您需要禁用 nouveau 驅動程序。創建以下文件 disable-nouveau.conf。# vi /etc/modprobe.d/disable-nouveau.conf
添加以下代碼。
# Disable nouveau blacklist nouveau options nouveau modeset=0
保存並關閉文件。
第 3 步:下載適用於 Debian Linux 的 nvidia 驅動程序
使用權 此頁面可抓取 最新版本的 nvidia 驅動程序(將其存儲在 $HOME:$ wget -O NVIDIA-Linux-x86_64-295.59.run https://in.download.nvidia.com/XFree86/Linux-x86_64/295.59/NVIDIA-Linux-x86_64-295.59.run
示例輸出:
--2012-07-17 18:49:52-- https://in.download.nvidia.com/XFree86/Linux-x86_64/295.59/NVIDIA-Linux-x86_64-295.59.run
Resolving in.download.nvidia.com... 122.178.225.56, 122.178.225.32
Connecting to in.download.nvidia.com|122.178.225.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58529480 (56M) [application/octet-stream]
Saving to: `/home/vivek/NVIDIA-Linux-x86_64-295.59.run'
0% [ ] 5,03,684 459K/s
步驟#4:重新啟動系統
您需要使用 reboot 命令重新引導系統,並使用單用戶模式登錄或在 grub 提示符下選擇恢復模式。# reboot
登錄到單用戶模式後,如果使用 apt/apt-get 命令安裝了以下軟件包,請刪除它們:# apt-get --purge remove xserver-xorg-video-nouveau nvidia-kernel-common nvidia-kernel-dkms nvidia-glx nvidia-smi
查找所有已安裝的 nvidia 軟件包並使用 dpkg 命令將其刪除(不要跳過此步驟)。# dpkg --list | grep -i --color nvidia
第 4 步:在 Debian Linux 上安裝 NVIDIA 驅動程序
確保您沒有使用 Xorg 或其他圖形環境,例如 Gnome 或 KDE。 如果您正在運行 Gnome,請使用以下命令停止它:# /etc/init.d/gdm3 stop
您還可以使用 cp 命令備份現有的 /etc/X11/xorg.conf 文件。# cp -v /etc/X11/xorg.{conf,factory}
通過鍵入以下命令安裝 Unix 驅動程序:# sh /home/vivek/NVIDIA-Linux-x86_64-295.59.run
按照屏幕上的說明操作。當你升級時,一定要升級你的 xorg.conf。最後,重新啟動系統。# reboot
如何使用 NVIDIA 驅動程序配置 Xorg?
登錄到您的 Gnome 或 KDE 桌面並輸入以下 nvidia-settings 命令:$ nvidia-settings
或者像這樣訪問 Gnome 菜單:System > Preferences > NVIDIA X Server Settings
示例輸出:
基於 Debian 軟件包的驅動安裝說明
可以使用 NVIDIA 的官方安裝程序或 Debian 驅動程序包安裝 NVIDIA 驅動程序。本文介紹 NVIDIA 的官方安裝程序。但是,您可以按照描述的 Debian 驅動程序包方法進行操作。 這裡.
我修改後的 xorg.conf
這是我的 /etc/X11/xorg.conf:
Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "0" EndSection Section "Files" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor0" VendorName "Unknown" ModelName "Seiko/Epson" HorizSync 49.8 - 74.7 VertRefresh 40.0 - 60.0 Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "Quadro FX 3800M" # Power settings by VG - start # Laptop Battery life setting by VG Option "RegistryDwords" "PowerMizerLevel=0x3" # When on AC settings by VG Option "RegistryDwords" "PowerMizerLevelAC=0x3" # Power settings by VG - end #Compiz settings by VG - start Option "XAANoOffscreenPixmaps" "true" Option "AllowGLXWithComposite" "true" #Compiz settings by VG - end EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "1" Option "TwinViewXineramaInfoOrder" "CRT-0" Option "metamodes" "DFP: nvidia-auto-select +0+0, CRT: nvidia-auto-select +1920+0" #Compiz settings by VG - start - we need to set this to 24bit SubSection "Display" Depth 24 EndSubSection #Compiz settings by VG - end #Compiz settings by VG - start Option "AddARGBGLXVisuals" "true" #Compiz settings by VG - end EndSection # Dedicated "Extensions" section Section "Extensions" #Compiz settings by VG - start Option "Composite" "enable" #Compiz settings by VG - end EndSection
添加
利用 人命令man xorg.conf
參考:
請參考以下網址:
- NVIDIA Unix 驅動程序 下載頁面。
- Debian Linux 主頁。