我安装了这个命令sudo apt-get install nvidia-390
,这里是输出
Reading package lists... Done
Building dependency tree
Reading state information... Done
nvidia-390 is already the newest version (390.116-0ubuntu1).
The following packages were automatically installed and are no longer required:
g++-6 libaccinj64-9.1 libatomic1:i386 libcublas9.1 libcufft9.1 libcufftw9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libdrm-amdgpu1:i386
libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386 libgl1:i386
libgl1-mesa-dri:i386 libglapi-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libllvm9:i386 libnppc9.1 libnppial9.1 libnppicc9.1
libnppicom9.1 libnppidei9.1 libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1 libnvblas9.1 libnvgraph9.1
libnvidia-cfg1-390 libnvidia-container-tools libnvidia-container1 libnvidia-fbc1-390 libnvidia-fbc1-390:i386 libnvidia-gl-390
libnvidia-ifr1-390 libnvidia-ifr1-390:i386 libnvrtc9.1 libnvtoolsext1 libnvvm3 libpciaccess0:i386 libsensors4:i386 libstdc++6:i386
libthrust-dev libvdpau-dev libx11-xcb1:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
libxdamage1:i386 libxfixes3:i386 libxshmfence1:i386 libxxf86vm1:i386 ocl-icd-opencl-dev opencl-c-headers
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
之后,我重新启动系统并尝试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.
我使用此命令检查是否正确安装了驱动程序dpkg -L nvidia-390
,它显示我确实正确安装了 nvidia-390。
/.
/sbin
/sbin/create-uvm-dev-node
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/nvidia-persistenced.service
/lib/udev
/lib/udev/rules.d
/lib/udev/rules.d/71-nvidia.rules
/lib/nvidia-390
/lib/nvidia-390/modprobe.conf
/usr
/usr/lib32
/usr/lib32/nvidia-390
/usr/lib32/nvidia-390/libnvidia-fbc.so.390.116
/usr/lib32/nvidia-390/libnvidia-ptxjitcompiler.so.390.116
/usr/lib32/nvidia-390/libGLdispatch.so.0
/usr/lib32/nvidia-390/libnvidia-ml.so.390.116
/usr/lib32/nvidia-390/libGL.la
/usr/lib32/nvidia-390/libEGL_nvidia.so.390.116
/usr/lib32/nvidia-390/libEGL.so.390.116
/usr/lib32/nvidia-390/libnvidia-tls.so.390.116
/usr/lib32/nvidia-390/libnvidia-fatbinaryloader.so.390.116
/usr/lib32/nvidia-390/libGLESv1_CM_nvidia.so.390.116
/usr/lib32/nvidia-390/libGL.so.390.116
/usr/lib32/nvidia-390/libnvidia-eglcore.so.390.116
/usr/lib32/nvidia-390/libnvidia-encode.so.390.116
/usr/lib32/nvidia-390/libnvidia-cfg.so.390.116
/usr/lib32/nvidia-390/libnvidia-egl-wayland.so.1.0.2
/usr/lib32/nvidia-390/libGLESv2_nvidia.so.390.116
/usr/lib32/nvidia-390/libGLX_nvidia.so.390.116
/usr/lib32/nvidia-390/libGLESv1_CM.so.1.2.0
/usr/lib32/nvidia-390/libnvidia-glsi.so.390.116
/usr/lib32/nvidia-390/libGLESv2.so.2.1.0
/usr/lib32/nvidia-390/tls
/usr/lib32/nvidia-390/tls/libnvidia-tls.so.390.116
/usr/lib32/nvidia-390/libOpenGL.so.0
/usr/lib32/nvidia-390/libnvidia-glcore.so.390.116
/usr/lib32/nvidia-390/libnvidia-compiler.so.390.116
/usr/lib32/nvidia-390/libnvcuvid.so.390.116
/usr/lib32/nvidia-390/libnvidia-wfb.so.390.116
/usr/lib32/nvidia-390/libGLX.so.0
/usr/lib32/nvidia-390/libnvidia-ifr.so.390.116
/usr/lib32/nvidia-390/vdpau
/usr/lib32/nvidia-390/vdpau/libvdpau_nvidia.so.390.116
/usr/lib32/vdpau
/usr/lib
/usr/lib/xorg
/usr/lib/xorg/modules
/usr/lib/xorg/modules/drivers
/usr/lib/xorg/modules/extensions
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/xorg
/usr/lib/nvidia-390-prime
/usr/lib/nvidia-390-prime/ld.so.conf
/usr/lib/nvidia-390-prime/alt_ld.so.conf
/usr/lib/nvidia-390
/usr/lib/nvidia-390/libnvidia-fbc.so.390.116
/usr/lib/nvidia-390/xorg
/usr/lib/nvidia-390/xorg/libglx.so.390.116
/usr/lib/nvidia-390/xorg/nvidia_drv.so
/usr/lib/nvidia-390/libnvidia-ptxjitcompiler.so.390.116
/usr/lib/nvidia-390/libGLdispatch.so.0
/usr/lib/nvidia-390/alternate-install-present
/usr/lib/nvidia-390/libnvidia-ml.so.390.116
/usr/lib/nvidia-390/libEGL_nvidia.so.390.116
/usr/lib/nvidia-390/libEGL.so.390.116
/usr/lib/nvidia-390/libnvidia-tls.so.390.116
/usr/lib/nvidia-390/libnvidia-fatbinaryloader.so.390.116
/usr/lib/nvidia-390/libGLESv1_CM_nvidia.so.390.116
/usr/lib/nvidia-390/ld.so.conf
/usr/lib/nvidia-390/libGL.so.390.116
/usr/lib/nvidia-390/libnvidia-eglcore.so.390.116
/usr/lib/nvidia-390/libnvidia-encode.so.390.116
/usr/lib/nvidia-390/libnvidia-cfg.so.390.116
/usr/lib/nvidia-390/libnvidia-egl-wayland.so.1.0.2
/usr/lib/nvidia-390/libGLESv2_nvidia.so.390.116
/usr/lib/nvidia-390/libGLX_nvidia.so.390.116
/usr/lib/nvidia-390/libGLESv1_CM.so.1.2.0
/usr/lib/nvidia-390/libnvidia-glsi.so.390.116
/usr/lib/nvidia-390/libGLESv2.so.2.1.0
/usr/lib/nvidia-390/tls
/usr/lib/nvidia-390/tls/libnvidia-tls.so.390.116
/usr/lib/nvidia-390/libOpenGL.so.0
/usr/lib/nvidia-390/libnvidia-glcore.so.390.116
/usr/lib/nvidia-390/bin
/usr/lib/nvidia-390/bin/nvidia-cuda-mps-server
/usr/lib/nvidia-390/bin/nvidia-xconfig
/usr/lib/nvidia-390/bin/nvidia-smi
/usr/lib/nvidia-390/bin/nvidia-bug-report.sh
/usr/lib/nvidia-390/bin/nvidia-persistenced
/usr/lib/nvidia-390/bin/nvidia-debugdump
/usr/lib/nvidia-390/bin/nvidia-cuda-mps-control
/usr/lib/nvidia-390/libnvidia-compiler.so.390.116
/usr/lib/nvidia-390/libnvcuvid.so.390.116
/usr/lib/nvidia-390/libnvidia-wfb.so.390.116
/usr/lib/nvidia-390/libGLX.so.0
/usr/lib/nvidia-390/libnvidia-ifr.so.390.116
/usr/lib/nvidia-390/vdpau
/usr/lib/nvidia-390/vdpau/libvdpau_nvidia.so.390.116
/usr/lib/nvidia-390/alt_ld.so.conf
/usr/lib/vdpau
/usr/src
/usr/src/nvidia-390-390.116
/usr/src/nvidia-390-390.116/nvidia-drm
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-connector.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-modeset.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-connector.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-crtc.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-helper.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm.Kbuild
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-dma-fence-helper.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-os-interface.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-linux.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem-nvkms-memory.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-helper.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-encoder.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem-user-memory.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-encoder.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-prime-fence.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-utils.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-crtc.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-fb.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-prime-fence.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-fb.c
/usr/src/nvidia-390-390.116/nvidia-drm/nv-pci-table.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-priv.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-conftest.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-drv.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-modeset.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-utils.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-drv.c
/usr/src/nvidia-390-390.116/nvidia-drm/nv-pci-table.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem-user-memory.c
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-gem.h
/usr/src/nvidia-390-390.116/nvidia-drm/nvidia-drm-ioctl.h
/usr/src/nvidia-390-390.116/Kbuild
/usr/src/nvidia-390-390.116/nvidia-uvm
/usr/src/nvidia-390-390.116/nvidia-uvm/clc365.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_non_replayable_faults.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_isr.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_volta.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_unsupported.c
/usr/src/nvidia-390-390.116/nvidia-uvm/clc06f.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pushbuffer.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tracker.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_module.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_group.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_thrashing.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_channel.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_range.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_test.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_tree.c
/usr/src/nvidia-390-390.116/nvidia-uvm/clc369.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_global.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pascal_host.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_test_rng.h
/usr/src/nvidia-390-390.116/nvidia-uvm/clc36f.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_map_external.h
/usr/src/nvidia-390-390.116/nvidia-uvm/clb06f.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tools_init.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_thread_context.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_events_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_utils_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pmm_gpu.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tracker.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_volta_fault_buffer.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_isr.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_replayable_faults.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_thrashing.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_space.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_utils.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_lock.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_mem.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_hal.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_debug_optimized.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_unit_test.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_block.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_maxwell.c
/usr/src/nvidia-390-390.116/nvidia-uvm/cla06f.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_fault_buffer_flush_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tools.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pte_batch.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_minimal_init.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_range.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pmm_gpu.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_peer_identity_mappings_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_init.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_rm_mem_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_page_tree_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pmm_sysmem_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/nvidia-uvm-sources.Kbuild
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_migrate.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_tree.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pascal.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_hmm.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pascal_ce.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_forward_decl.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_allocator.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_processors.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_heuristics.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_access_counters.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_maxwell_host.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_test_rng.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_group_tree_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_kvmalloc_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_map_external.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_utils.h
/usr/src/nvidia-390-390.116/nvidia-uvm/ctrl2080mc.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tools.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_api.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu_semaphore.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_channel_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_thread_context.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_mmu.h
/usr/src/nvidia-390-390.116/nvidia-uvm/nvCpuUuid.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_module_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_hmm.h
/usr/src/nvidia-390-390.116/nvidia-uvm/cla06fsubch.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pmm_sysmem.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_allocator.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_mmu_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_volta_access_counter_buffer.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pascal_fault_buffer.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_linux.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_events.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_pmm_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/clc076.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_block.c
/usr/src/nvidia-390-390.116/nvidia-uvm/clb0b5.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_policy.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_hal_types.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_push.h
/usr/src/nvidia-390-390.116/nvidia-uvm/clc0b5.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_kepler.c
/usr/src/nvidia-390-390.116/nvidia-uvm/nvidia-uvm.Kbuild
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_gpu.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_hal.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_va_block_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm_ioctl.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_prefetch.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_range_group.c
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_tlb_batch.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_perf_prefetch.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_lock_test.c
/usr/src/nvidia-390-390.116/nvidia-uvm/clc1b5.h
/usr/src/nvidia-390-390.116/nvidia-uvm/uvm8_procfs.c
...
输出lspci | grep 'VGA'
17:00.0 VGA compatible controller: NVIDIA Corporation GV104 [GeForce GTX 1180] (rev a1)
18:00.0 VGA compatible controller: NVIDIA Corporation GV104 [GeForce GTX 1180] (rev a1)
65:00.0 VGA compatible controller: NVIDIA Corporation GV104 [GeForce GTX 1180] (rev a1)
b3:00.0 VGA compatible controller: NVIDIA Corporation GV104 [GeForce GTX 1180] (rev a1)
为什么会发生这种情况?
答案1
sudo ubuntu-drivers list
然后尝试sudo ubuntu-drivers autoinstall
。如果希望驱动程序能够正确安装。nvidia-settings
在终端上运行以查看是否安装了 nvidia 显卡,如果是,则问题出在xrandr
检查分辨率上https://wiki.archlinux.org/index.php/Xrandr。我遇到了同样的问题,但我的问题与分辨率有关,后来解决了它。