Rocky Linux 安装显卡NVIDIA驱动
-
禁用内置的nouveau驱动
#写入禁用命令到blacklist-nvidia-nouveau.conf文件中 sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf" sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf" [root@NLPS6 install]# cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf blacklist nouveau options nouveau modeset=0 dracut --force #更新内核 #修改后重启电脑 reboot #验证 lsmod | grep nouveau #若该命令无输出,则说明禁用成功!
-
安装驱动
lshw -c video yum install epel-release #安装epel源 yum -y install gcc kernel-devel dkms yum install libglvnd-devel.x86_64 #到NVIDIA官网下载相应驱动:https://www.nvidia.cn/Download/index.aspx?lang=cn lspci | grep -i nvidia#查看显卡信息 辅助官网选择驱动 #将队员驱动下载到服务器上 chmod u+x NVIDIA-Linux-x86_64-510.68.02.run #为驱动安装包的所有者添加可执行权限 ./NVIDIA-Linux-x86_64-460.84.run #1. Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 【No】 #2. Nvidia’s 32-bit compatibility libraries? 【No】 #3. Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 【Yes】 #安装结束后 验证 nvidia-smi
脚踏实地,注重基础。