首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NVIDIA设备不存在!

NVIDIA设备不存在!
EN

Ask Ubuntu用户
提问于 2022-05-15 11:37:20
回答 1查看 1.7K关注 0票数 1

几天前我发了问题。我试图重新安装驱动程序,从官方的NVIDIA网站下载它,也从其他驱动程序或ubuntu-driver autoinstall命令重新安装它,但他们都没有解决问题。我可以安装他们没有任何错误,但在重新启动后,我面临一些问题(轮式配置文件是按需)。现在nvidia-smi不起作用了:

代码语言:javascript
复制
┌──(rootubuntu)-[~]
└─$ nvidia-smi 
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

nvidia-persistenced.service未能启动,我收到了以下消息:

代码语言:javascript
复制
Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 127 has read and write permissions for those files.

/dev/中也没有nvidia:

代码语言:javascript
复制
┌──(rootubuntu)-[~]
└─# ls /dev
acpi_thermal_rel  cuse         hidraw0    i2c-6    loop12  loop9         nvme0      pts       snd        tty11  tty21  tty31  tty41  tty51  tty61      ttyS12  ttyS22  ttyS4    v4l    vcsa3  vfio
autofs            disk         hidraw1    i2c-7    loop13  loop-control  nvme0n1    random    spidev0.0  tty12  tty22  tty32  tty42  tty52  tty62      ttyS13  ttyS23  ttyS5    vcs    vcsa4  vga_arbiter
block             dma_heap     hpet       initctl  loop14  mapper        nvme0n1p1  rfkill    stderr     tty13  tty23  tty33  tty43  tty53  tty63      ttyS14  ttyS24  ttyS6    vcs1   vcsa5  vhci
bsg               dri          hugepages  input    loop15  mcelog        nvme0n1p2  rtc       stdin      tty14  tty24  tty34  tty44  tty54  tty7       ttyS15  ttyS25  ttyS7    vcs2   vcsa6  vhost-net
btrfs-control     drm_dp_aux0  hwrng      kmsg     loop2   media0        nvme0n1p4  rtc0      stdout     tty15  tty25  tty35  tty45  tty55  tty8       ttyS16  ttyS26  ttyS8    vcs3   vcsu   vhost-vsock
bus               ecryptfs     i2c-0      kvm      loop3   mei0          nvme0n1p5  sda       tpm0       tty16  tty26  tty36  tty46  tty56  tty9       ttyS17  ttyS27  ttyS9    vcs4   vcsu1  video0
char              fb0          i2c-1      log      loop4   mem           nvram      sda1      tpmrm0     tty17  tty27  tty37  tty47  tty57  ttyprintk  ttyS18  ttyS28  udmabuf  vcs5   vcsu2  video1
console           fd           i2c-2      loop0    loop5   mqueue        port       sda3      tty        tty18  tty28  tty38  tty48  tty58  ttyS0      ttyS19  ttyS29  uhid     vcs6   vcsu3  zero
core              full         i2c-3      loop1    loop6   net           ppp        sg0       tty0       tty19  tty29  tty39  tty49  tty59  ttyS1      ttyS2   ttyS3   uinput   vcsa   vcsu4  zfs
cpu               fuse         i2c-4      loop10   loop7   ng0n1         psaux      shm       tty1       tty2   tty3   tty4   tty5   tty6   ttyS10     ttyS20  ttyS30  urandom  vcsa1  vcsu5
cpu_dma_latency   gpiochip0    i2c-5      loop11   loop8   null          ptmx       snapshot  tty10      tty20  tty30  tty40  tty50  tty60  ttyS11     ttyS21  ttyS31  userio   vcsa2  vcsu6

如果可以的话请帮忙。

EN

回答 1

Ask Ubuntu用户

发布于 2023-04-29 11:58:14

我有类似的症状,/dev/nvidia不存在,lsmod | grep nvidia什么也没回。而nvidia-坚持失败了。

代码语言:javascript
复制
Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 119 has read and write permissions for those files.

我尝试使用--reinstall选项重新安装我的nvidia驱动程序包。我被要求重新配置dpkg。然后发生了这样的事情:

代码语言:javascript
复制
$ sudo apt-get install --reinstall nvidia-driver
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
$ sudo dpkg --configure -a
Setting up nvidia-driver-bin (470.182.03-1) ...
Setting up libcuda1:amd64 (470.182.03-1) ...
Setting up libnvidia-cfg1:amd64 (470.182.03-1) ...
Setting up nvidia-egl-icd:amd64 (470.182.03-1) ...
Setting up libglx-nvidia0:amd64 (470.182.03-1) ...
Setting up nvidia-kernel-support (470.182.03-1) ...
Setting up xserver-xorg-video-nvidia (470.182.03-1) ...
Setting up nvidia-vulkan-icd:amd64 (470.182.03-1) ...
Setting up nvidia-vdpau-driver:amd64 (470.182.03-1) ...
Setting up libgl1-nvidia-glvnd-glx:amd64 (470.182.03-1) ...
Setting up nvidia-kernel-dkms (470.182.03-1) ...
Loading new nvidia-current-470.182.03 DKMS files...
Building for 5.10.0-22-amd64
Building initial module for 5.10.0-22-amd64
Done.

nvidia-current.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-22-amd64/updates/dkms/

nvidia-current-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-22-amd64/updates/dkms/

nvidia-current-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-22-amd64/updates/dkms/

nvidia-current-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-22-amd64/updates/dkms/

nvidia-current-peermem.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-22-amd64/updates/dkms/

depmod...

DKMS: install completed.
Setting up nvidia-smi (470.182.03-1) ...
Setting up nvidia-driver-libs:amd64 (470.182.03-1) ...
Setting up libnvcuvid1:amd64 (470.182.03-1) ...
Setting up nvidia-driver (470.182.03-1) ...
Setting up libnvidia-encode1:amd64 (470.182.03-1) ...
Processing triggers for glx-alternative-mesa (1.2.1~deb11u1) ...
Processing triggers for glx-alternative-nvidia (1.2.1~deb11u1) ...
Processing triggers for libc-bin (2.31-13+deb11u6) ...
Processing triggers for update-glx (1.2.1~deb11u1) ...
Processing triggers for glx-alternative-nvidia (1.2.1~deb11u1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/nvidia because link group glx is broken
Processing triggers for libc-bin (2.31-13+deb11u6) ...
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-22-amd64

在重新启动后,nvidia正常工作。不过有一点要注意:我是在Debian上这样做的,但是这个解决方案的性质预计也适用于Ubuntu系统。

我个人不建议按建议的*.run文件手动安装驱动程序这里文件,因为您将错过驱动程序更新。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1408652

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档