dpkg -l | grep nvidia
ii libnvidia-cfg1-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-455 455.32.00-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-decode-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-455:amd64 455.32.00-0ubuntu1 amd64 NVENC Video Encoding runtime library
ii libnvidia-extra-455:amd64 455.32.00-0ubuntu1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-455:amd64 455.32.00-0ubuntu1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-455 455.32.00-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-455 455.32.00-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-455 455.32.00-0ubuntu1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-455 455.32.00-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-455 455.32.00-0ubuntu1 amd64 NVIDIA kernel source package
ii nvidia-modprobe 455.32.00-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-prime 0.8.8.2 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 455.32.00-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-455 455.32.00-0ubuntu1 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-455 455.32.00-0ubuntu1 amd64 NVIDIA binary Xorg driver
和
nvcc -V
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2020 NVIDIA Corporation
Built on Tue_Sep_15_19:10:02_PDT_2020
Cuda compilation tools, release 11.1, V11.1.74
Build cuda_11.1.TC455_06.29069683_0
但
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.
the nvidia bug report starts off with a bunch of failed conftests:
#error acpi_walk_namespace() conftest failed!
^
/tmp/selfgz20040/NVIDIA-Linux-x86_64-455.23.05/kernel/conftest/functions.h:64:2: error: #error wait_on_bit_lock() conftest failed!
#error wait_on_bit_lock() conftest failed!
^
/tmp/selfgz20040/NVIDIA-Linux-x86_64-455.23.05/kernel/conftest/functions.h:69:2: error: #error radix_tree_replace_slot() conftest failed!
#error radix_tree_replace_slot() conftest failed!
and then finishes with general errors:
./arch/x86/include/asm/bug.h:35:22: error: expected identifier or '(' before string constant
asm_inline volatile("1:\t" ins "\n"
还:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.5.0-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1)
sudo lshw -C 视频
[sudo] password for iviti: *-display UNCLAIMED description: VGA compatible controller product: GP106M [GeForce GTX 1060 Mobile] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list configuration: latency=0 resources: memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128) memory:a4080000-a40fffff *-display description: VGA compatible controller product: Intel Corporation vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 00 width: 64 bits clock: 33MHz capabilities: pciexpress msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:158 memory:a2000000-a2ffffff memory:b0000000-bfffffff ioport:5000(size=64) memory:c0000-dffff
答案1
我的猜测是:您用版本 5.5 替换了默认的 gcc 编译器(8.4?),结果出乎意料的是,Nvidia 驱动程序不再成功编译。
假设您确实需要 Nvidia 驱动程序 455(标准 Ubuntu 存储库尚未提供),并且驱动程序构建在 Ubuntu 上确实有效,请撤消 gcc 上的替代方案,使用名为 gcc、g++、ar、ranlib 等的链接指向 ...CUDA/bin 目录中的旧版本(该目录应位于 PATH 中的第一个)。
使用正确版本的系统 gcc,至少 Nvidia 驱动程序应该能够工作。
要覆盖用于 CUDA 工作的 gcc,而不更改系统用于更新视频模块等内容的内容,请参阅
运行向量加法的 cuda 示例程序的步骤?
以下是相关段落的摘录:
首先阅读 CUDA 安装指南中的 Ubuntu 部分:例如https://docs.google.com/viewer?url=https%3A%2F%2Fdocs.nvidia.com%2Fcuda%2Fpdf%2FCUDA_Installation_Guide_Linux.pdf&pdf=true
第 6 章中关于设置环境变量 PATH 和 LD_LIBRARY_PATH 的建议表明,您的 cuda 添加应该位于现有 PATH 的开头。这样,您只需将 ...cuda/bin 的链接添加到所需版本,即可用旧版本覆盖系统 g++ 或 gcc。您最不想做的事情就是更改系统默认编译器——当内核更新时,该编译器可能无法成功更新您的视频驱动程序。如果您所做的一切都可能使用旧编译器,请继续修改 .profile 中的 PATH 设置,以便每次登录时都设置您的 cuda 路径。如果您只希望 CUDA 工作使用旧编译器,请将 PATH、LD_LIBRARY_PATH 修改放入脚本中,以便在需要时进行源代码处理。