Installing Nvidia Driver on CentOS 6

转自: http://pyrx.sourceforge.net/blog/103-installing-nvidia-driver-on-centos-6


This post explains how to install NVIDIA proprietary drivers on CentOS 6. By default, CentOS 6 comes with nouveau drivers, which for 3D (OpenGL) rendering, is order of magnitude slower that NVIDIA's proprietary drivers.  For instance, I had glxgear running at round 400 frames per second (FPS) before installing NVIDIA proprietary drivers and at around 1000 FPS after. So it pays to add this extra step to your CentOS 6 installation. Before we start, make sure you have all required packages installed:

yum groupinstall "Development Tools"
yum install kernel-devel kernel-headers dkms

The last package (dkms) is needed so that we don't have to reinstall NVIDIA drivers after each kernel updates. Now we are ready to download NVIDIA proprietary drivers - http://www.nvidia.com/Download/index.aspx

To find out your Video Card model number, click Main Menu → System Settings → Display or run:

lspci | grep VGA

I then run /sbin/init 3 and then chmod +x NVIDIA-Linux-x86-290.10.run followed by ./NVIDIA-Linux-x86-290.10.run. However, this gave me:
"ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver."

After trying many different options I have found a solution described at http://www.linuxquestions.org/questions/ubuntu-63/nouveau-kernel-driver-825432.

So I added the following line to /etc/modprobe.d/blacklist.conf file

blacklist nouveau

and then did:

$ mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak   
$ dracut -v /boot/initramfs-$(uname -r).img $(uname -r)

Reboot and run ./NVIDIA-Linux-x86-290.10.run to finish installing NVIDIA driver.

Another difference, between CentOS 6 and earlier versions of CentoOS is that system-config-packages (Add/remove applications) is now called gpk-application. You need to run yum install gnome-packagekit if gpk-application is not installed in your system. Also, if you are planning to do OpenGL development run (source: www.centos.org - Forums - CentOS 6 - Software Support - Help me ..):

yum install mesa-libGL-devel mesa-libGLU-devel

 


### CentOS 7 GPU Passthrough Configuration Guide For configuring GPU passthrough on CentOS 7, it involves several critical steps including ensuring the host system can recognize and properly handle the GPU device. The process starts with verifying whether the GPU is recognized by the operating system using a specific command-line instruction[^2]. Once confirmed, proceed to install necessary drivers compatible with CentOS 7 as detailed in external resources[^1]. #### Preparation Before Installation Before diving into driver installation, ensure that Virtualization Technology (VT-x/AMD-V) along with Intel VT-d or AMD IOMMU support are enabled within BIOS settings since these features facilitate direct hardware access required for GPU passthrough. #### Installing Required Packages Install prerequisite packages which include `qemu-kvm`, `virt-manager`, `libvirt` among others through yum package manager: ```bash yum groupinstall -y "Virtualization Host" yum install -y pciutils ``` These tools provide essential functionalities needed for managing virtual machines alongside identifying PCI devices like GPUs. #### Configuring Kernel Parameters Modify GRUB configuration file `/etc/default/grub` adding kernel parameters such as `intel_iommu=on` or `amd_iommu=on`. After modifying, regenerate grub config files according to architecture specifics followed by rebooting the machine to apply changes effectively. #### Setting Up vfio-pci Module Load `vfio-pci` module at boot time via editing `/etc/modules-load.d/vfio.conf` inserting `vfio-pci`. Unbind the VGA/HDMI audio part of the graphics card from its current driver (`nouveau`) then bind them back under control of `vfio-pci` utilizing scripts provided online specifically designed for this purpose. #### Creating VMs With Assigned Devices Finally, create new guest systems inside virt-manager assigning desired physical GPUs directly during setup stages following prompts carefully until completion. --related questions-- 1. What should one do if encountering issues while loading the `vfio-pci` module? 2. How does enabling IOMMU affect overall performance when performing GPU passthrough operations? 3. Can other distributions' methods be applied similarly here without modification? 4. Is there any particular reason why certain commands might fail on integrated/discrete GPU setups? 5. Are there alternative ways besides using `lspci | grep -i nvidia` to check compatibility between installed GPUs and CUDA platform?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值