1、NVIDIA命令查看系统信息、查询系统资源、配置信息、系统运行状况、
https://blog.csdn.net/s_sunnyy/article/details/78547516?locationNum=4&fps=1
https://blog.csdn.net/ghw15221836342/article/details/79571559
命令举例:
- nvidia-smi 命令
- nvidia-smi -L 命令:列出所有可用的 NVIDIA 设备
- nvidia-smi topo --matrix 命令:查看系统拓扑
- nvidia-smi -q -d CLOCK 命令:查看当前的 GPU 时钟速度、默认时钟速度和最大可能的时钟速度
- nvidia-smi -q -d SUPPORTED_CLOCKS :显示每个 GPU 的可用时钟速度列表
2、NVIDIA驱动安装
-
$ nvidia-detect
kmod-nvidia
Because nvidia-detect outputs the package name on RHEL based systems, it may be used in the following way to install the correct NVIDIA driver for your system:
yum install $(nvidia-detect)
More verbose output is availabe using the verbose (-v) switch, for example:
$ nvidia-detect -v
Probing for supported NVIDIA devices...
10de:0fc1 NVIDIA Corporation GK107 GeForce GT 640
This device requires the current 346.59 NVIDIA driver kmod-nvidia
$ nvidia-detect -v
Probing for supported NVIDIA devices...
10de:0ca3 NVIDIA Corporation GT215 GeForce GT 240
This device requires the legacy 340.xx NVIDIA driver kmod-nvidia-340xx
$ nvidia-detect -v
Probing for supported NVIDIA devices...
10de:0392 NVIDIA Corporation G73 GeForce 7600 GS
This device requires the legacy 304.xx NVIDIA driver kmod-nvidia-304xx
nvidia-detect will also check compatibility between the detected devices recommended driver and the current Xorg Server. The Xorg compatibility tests are always performed and compatibility information is displayed if run with the --xorg (-x) command line argument:
$ nvidia-detect --xorg
Probing for supported NVIDIA devices...
10de:0ca3 NVIDIA Corporation GT215 GeForce GT 240
This device requires the legacy 340.xx NVIDIA driver kmod-nvidia-340xx
Checking ABI compatibility with Xorg Server...
Xorg Video Driver ABI detected: 13
ABI compatibility check passed
nvidia-detect may be run from within a script and will return the following codes:
0: No supported devices found
1: Device supported by the current NVIDIA kmod-nvidia driver
2: Device supported by the NVIDIA legacy kmod-nvidia-96xx driver
3: Device supported by the NVIDIA legacy kmod-nvidia-173xx driver
4: Device supported by the NVIDIA legacy kmod-nvidia-304xx driver
5: Device supported by the NVIDIA legacy kmod-nvidia-340xx driver
For a full list of supported devices, see:
ftp://download.nvidia.com/XFree86/Linux-x86_64/352.79/README/supportedchips.html
Bugs should be reported at http://elrepo.org/bugs
Page last modified on Friday 12 of February, 2016 13:28:22 MST
3、卸载所以NVIDIA驱动相关的:
#for case1: original driver installed by apt-get:
sudo apt-get remove --purge nvidia*
#for case2: original driver installed by runfile:
sudo chmod +x *.run
sudo ./NVIDIA-Linux-x86_64-384.59.run --uninstall
禁用nouveau: sudo nano /etc/modprobe.d/blacklist.conf
在文件的最后一行添加: blacklist nouveau 之后,
执行命令sudo update-initramfs -u
重启电脑: lsmod | grep nouveau #如果没有输出,即说明安装成功
4、安装驱动:
sudo ./NVIDIA-Linux-xxx.run -no-opengl-files
- –no-opengl-files 只安装驱动文件,不安装OpenGL文件。这个参数最重要
- –no-x-check 安装驱动时不检查X服务
- –no-nouveau-check 安装驱动时不检查nouveau
后面两个参数可不加。
5、重启,并不会出现循环登录的问题
ps:如果因为自己的操作失误,循环登录不要慌张,也不要重新装系统,跟着我的步骤来,我这些坑都遇到过。