歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 8.04中安裝nVidia新版顯卡驅動

Ubuntu 8.04中安裝nVidia新版顯卡驅動

日期:2017/2/28 17:02:34   编辑:Linux教程

環境:Ubuntu 8.04 AMD64,nvidia-glx-new顯示驅動

目標:安裝nvidia新版驅動173.14.05。

步驟:

1. 下載驅動包:
http://www.nvidia.com/object/linux_display_amd64_173.14.05.html,下載的文件存盤備用。

2. 完全刪除原驅動,包括Ubuntu自帶的nv驅動和nvidia-glx-new驅動:
此步驟非常重要。參考英文如下。

If you wish to install the NVIDIA Linux graphics driver on a Fedora Core 6, Fedora 7/9 or RHEL5 system, please ensure that your system meets the following requirements:

* the latest update kernel is installed and in use
* a kernel-devel RPM is installed that corresponds to the kernel that is in use. Note, FC6 has a known bug which occasionally installs a kernel-devel RPM that is a different arch than the kernel (i586 & i686 mixed). See:
https://bugzilla.RedHat.com/bugzilla....cgi?id=211941
* the pkgconfig and xorg-x11-server-sdk RPMs are installed (only applies to FC6)
* Xen kernels are not currently supported

The items above can be addressed with the following commands (they need to be run as root):
# yum install kernel-devel xorg-x11-server-sdk pkgconfig
# yum update
# reboot

If you are using an SMP (multi-CPU and/or multi-core) enabled system in FC5(only), please replace kernel-devel with kernel-smp-devel in the command above.

The SELinux requirement can be addressed via two mechanisms after the NVIDIA Linux graphics driver has been installed:

1) If you do not wish to use SELinux enforcement, you can disable it by running the `setenforce 0` command before starting X, or by adding selinux=0 to the end of the kernel line in /etc/grub.conf and rebooting.

2) If you wish to use SELinux enforcement, you will need to change the security context of the NVIDIA X driver module and of the server-side NVIDIA GLX extension module. To achieve this, please run the commands listed for your platform below:

Linux/x86 (32-bit):
# chcon -t texrel_shlib_t /usr/lib/xorg/modules/drivers/nvidia_drv.so
# chcon -t texrel_shlib_t /usr/lib/xorg/modules/extensions/libglx.so.1.0.9631
# chcon -t texrel_shlib_t /usr/lib/tls/libnvidia-tls.so.1
# chcon -t texrel_shlib_t /usr/lib/libGLcore.so.1.0.9631

Linux/x86-64 (64-bit):
# chcon -t texrel_shlib_t /usr/lib64/xorg/modules/drivers/nvidia_drv.so
# chcon -t texrel_shlib_t /usr/lib64/xorg/modules/extensions/libglx.so.1.0.9631
# chcon -t texrel_shlib_t /usr/lib64/libGLcore.so.1.0.9631
# chcon -t texrel_shlib_t /usr/lib64/tls/libnvidia-tls.so.1


Debian GNU/Linux or [K]Ubuntu with Xorg 7.x

If you wish to install the NVIDIA Linux graphics driver on a Debian GNU/Linux or Ubuntu system that ships with Xorg 7.x, please ensure that your system meets the following requirements:

* development tools like make and gcc are installed
* the linux-headers package matching the installed Linux kernel is installed
* the pkg-config and xserver-xorg-dev packages are installed
* the nvidia-glx package has been uninstalled with the --purge option and the files /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel do not exist
If you use Ubuntu, please also ensure that the linux-restricted-modules or linux-restricted-modules-common packages have been uninstalled. Alternatively, you can edit the /etc/default/linux-restricted-modules or /etc/default/linux-restricted-modules-common configuration file and disable the NVIDIA linux-restricted kernel modules (nvidia, nvidia_legacy) via:

DISABLED_MODULES="nv nvidia_new"
Additionally, delete the following file if it exists:
/lib/linux-restricted-modules/.nvidia_new_installed
Please note: unfortunately, it has become difficult to keep track of the pre-/post-installation steps required for [K]Ubuntu, and the above instructions may be incomplete. If in doubt, it is recommended that you use your distributor's NVIDIA Linux graphics driver packages, exclusively.

3. 重新啟動,並關閉xserver:
關閉xserver命令(gnome):
sudo /etc/init.d/gdm stop

4. 安裝驅動:
sudo sh ./NVIDIA-Linux-x86_64-173.14.05-pkg2.run

5. 啟動xserver:
sudo /etc/init.d/gdm start

6. 調整分辨率:
如果啟動後顯示分辨率不正常,需要修改xorg.conf。
cd /etc/X11
sudo cp xorg.conf xorg.conf.mybackup
sudo vi /etc/X11/xorg.conf

確認Device裡面的Driver一項定義是"nvidia;
刪除Monitor定義裡面的Modeline一行;
Screen裡面Modes一行改為
Modes "nvidia-auto-select"

修改後重新啟動xserver。Ctrl-Alt-Backspace。

7. 調整個人分辨率配置:
如果登錄界面分辨率正常,但用戶登錄後變為低分辨率,需要在個人選項裡面調整:
System -> Preferences -> Screen Resolutions

8. 顯示驅動細節調整:
sudo nvidia-settings

必須用root權限運行,否則配置無法保存到xorg.conf裡面。

搞定。

PS,新驅動比Ubuntu自帶的nvidia-glx-new顯示效果強太多了,畫面變得通透,沒了霧蒙蒙的感覺。

原創:Coffee & Beer

Copyright © Linux教程網 All Rights Reserved