重启后nvidia-smi命令不可执行出现“Make sure that the latest NVIDIA driver is installed and running.”的问题解决
目录
- 原因分析:
- 解决方法
- 方法1: 更改内核启动顺序 显示内核的启动顺序
- 【推荐】方法2:重新执行nvidia的安装命令
重启后nvidia-smi命令不可执行,出现“Make sure that the latest NVIDIA driver is installed and running.”
原因分析:
NVIDIA驱动是在低版本的时候安装,由于系统更新,内核版本升级导致NVIDIA无法应用在高内核版本
vi /etc/default/grub
解决方法
方法1: 更改内核启动顺序 显示内核的启动顺序
grep menuentry /boot/grub/grub.cfg
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5bce3795-da96-4c6f-bed2-67d37185a77d' { submenu 'Ubuntu 高级选项' $menuentry_id_option 'gnulinux-advanced-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu,Linux 4.8.0-26-lowlatency' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-lowlatency-advanced-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.8.0-26-lowlatency (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-lowlatency-init-upstart-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.8.0-26-lowlatency (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-lowlatency-recovery-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu,Linux 4.8.0-26-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-advanced-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.8.0-26-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-init-upstart-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.8.0-26-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-recovery-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu,Linux 4.4.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-advanced-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.4.0-21-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-init-upstart-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Ubuntu, with Linux 4.4.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-recovery-5bce3795-da96-4c6f-bed2-67d37185a77d' { menuentry 'Memory test (memtest86+)' { menuentry 'Memory test (memtest86+, serial console 115200)' {
假设你要以4.4.0-21内核版本启动,则将文件/etc/default/grub中
GRUB_DEFAULT=0
改为
GRUB_DEFAULT=6
或者改为
GRUB_DEFAULT=”Ubuntu,Linux 4.4.0-21-generic“
保存后
Ubuntu,Linux 5.4.0-37-generic
3. 然后使用命令sudo update-grub
4.重新启动后输入uname -r查看,内核即为想要的内核。
【推荐】方法2:重新执行nvidia的安装命令
./NVIDIA-Linux-x86_64-440.82.run --no-opengl-files
执行你下载的官方驱动安装程序,简单省事,推荐该方法!
到此这篇关于重启后nvidia-smi命令不可执行,出现“Make sure that the latest NVIDIA driver is installed and running.”的文章就介绍到这了,更多相关重启后nvidia-smi命令不可执行内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!
赞 (0)