I have a problem on Ubuntu 20.04 with nvidia drivers.
I started from the black screen ubuntu and it turned out that problem was in the memory overflow of logs (seems) and sudo apt-get autoclean worked.
But during the problem solving I did something like this: sudo apt purge *nvidia*. After this I tried install nvidia driver by NVIDIA-Linux-x86_64-510.54.run which was download from official nvidia site. It didn’t work and I also tried an installation with apt and ubuntu drivers autoinstall. Now I have black screen when I turned on nvidia but with sudo prime-select intel graphics works normally.
After this I tried Failed to initialize NVML: Driver/library version mismatch and gained good nvidia-smi answers with 510 driver and 11.6 cuda but Nvidia Geforce Off. But after rebooting I got black screen and nvidia-smi answers in console this: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Also I have a problem with sowtware & updates application: software-properties-dbus crashed with request_unixsocket
or software-properties-gtk crashed with dbus-exceptions. Reinstalling some packages like python3-six, python3-certifi, python3-requests, python3-idna, python3-chardet, python3-urllib3 and software-properties-gtk doesn’t work. software-properties-qt works but reinstalling drivers by it doesn’t help with nvidia problem described above.
Please uninstall all nvidia packages, then uninstall the runfile driver by running it again with --uninstall option. Then try installing the nvidia driver again using Software&Updates. Don’t install full “cuda” but only “cuda-toolkit” once the driver is working. If the problem persists, please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post.
Thank you! I very appreciate your answer. But I can’t follow it because Software & Update application as I mentioned above doesn’t work. I tried uninstall 510.54 and 470.86 by run files (in my terminal history I found out that I installed only this two versions) and script gave me this message: “There is no NVIDIA driver currently installed”.
dpkg -l |grep nvidia
ii libnvidia-cfg1-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-470 470.103.01-0ubuntu0.20.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVIDIA libcompute package
rc libnvidia-compute-510:amd64 510.47.03-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-decode-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-470:amd64 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-470:i386 470.103.01-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
rc linux-modules-nvidia-470-5.13.0-35-generic 5.13.0-35.40~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-35
rc linux-modules-nvidia-470-5.13.0-37-generic 5.13.0-37.42~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-37
rc linux-modules-nvidia-470-5.13.0-39-generic 5.13.0-39.44~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-39
rc linux-objects-nvidia-470-5.13.0-35-generic 5.13.0-35.40~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-35 (objects)
ii linux-objects-nvidia-470-5.13.0-37-generic 5.13.0-37.42~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-37 (objects)
ii linux-objects-nvidia-470-5.13.0-39-generic 5.13.0-39.44~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-39 (objects)
ii linux-signatures-nvidia-5.13.0-37-generic 5.13.0-37.42~20.04.1 amd64 Linux kernel signatures for nvidia modules for version 5.13.0-37-generic
ii linux-signatures-nvidia-5.13.0-39-generic 5.13.0-39.44~20.04.1 amd64 Linux kernel signatures for nvidia modules for version 5.13.0-39-generic
ii nvidia-compute-utils-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-510 510.47.03-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-510 510.47.03-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-470 470.103.01-0ubuntu0.20.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-510 510.47.03-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.16~0.20.04.2 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-470 470.103.01-0ubuntu0.20.04.1 amd64 NVIDIA binary Xorg driver
immediately afterwards, uninstall it again with option --uninstall
run
dpkg -l |grep nvidia
and ls -l /lib/x86_64-linux-gnu/*nvidia* /lib/x86_64-linux-gnu/libcuda*
again to make sure really no nvidia package or file is installed anymore.
After reboot, use Software&Updates again to install the driver.
thx for the answer! but I think there are more mess than you think because I have three cuda paths: cuda-11/ cuda-11.5/ cuda-11.6/ and noone has cuda-uninstaller in the bin directory. And they prevent for installation of the run file 495.29.05. Can you please explain how can I delete all cuda versions?
cuda-11.6/bin direcory for example looks so:
usr/local/cuda-11.6/bin$ ls -la
total 86684
drwxr-xr-x 3 root root 4096 апр 7 19:20 .
drwxr-xr-x 16 root root 4096 апр 7 19:20 ..
-rwxr-xr-x 1 root root 88800 мар 9 06:20 bin2c
lrwxrwxrwx 1 root root 4 мар 9 05:54 computeprof -> nvvp
-rwxr-xr-x 1 root root 115 мар 9 08:46 compute-sanitizer
drwxr-xr-x 2 root root 4096 апр 7 19:19 crt
-rwxr-xr-x 1 root root 5957192 мар 9 06:20 cudafe++
-rwxr-xr-x 1 root root 13585248 мар 9 06:12 cuda-gdb
-rwxr-xr-x 1 root root 778360 мар 9 06:12 cuda-gdbserver
-rwxr-xr-x 1 root root 356336 мар 9 06:06 cuda-memcheck
-rwxr-xr-x 1 root root 75880 мар 9 05:59 cu++filt
-rwxr-xr-x 1 root root 245072 мар 9 06:27 cuobjdump
-rwxr-xr-x 1 root root 277600 мар 9 06:20 fatbinary
-rwxr-xr-x 1 root root 2974 мар 18 20:39 ncu
-rwxr-xr-x 1 root root 2577 мар 18 20:39 ncu-ui
-rwxr-xr-x 1 root root 1580 мар 9 06:02 nsight_ee_plugins_manage.sh
-rwxr-xr-x 1 root root 82 мар 18 20:39 nsight-sys
-rwxr-xr-x 1 root root 751 мар 18 20:39 nsys
-rwxr-xr-x 1 root root 104 мар 18 20:39 nsys-exporter
-rwxr-xr-x 1 root root 739 мар 18 20:39 nsys-ui
-rwxr-xr-x 1 root root 6477920 мар 9 06:20 nvcc
-rwxr-xr-x 1 root root 654928 мар 9 06:20 __nvcc_device_query
-rw-r--r-- 1 root root 417 мар 9 06:20 nvcc.profile
-rwxr-xr-x 1 root root 33542440 мар 9 21:26 nvdisasm
-rwxr-xr-x 1 root root 10555496 мар 9 06:20 nvlink
lrwxrwxrwx 1 root root 6 мар 18 20:39 nv-nsight-cu -> ncu-ui
lrwxrwxrwx 1 root root 3 мар 18 20:39 nv-nsight-cu-cli -> ncu
-rwxr-xr-x 1 root root 5677088 мар 9 06:21 nvprof
-rwxr-xr-x 1 root root 109504 мар 9 06:05 nvprune
-rwxr-xr-x 1 root root 285 мар 9 05:54 nvvp
-rwxr-xr-x 1 root root 10299856 мар 9 06:20 ptxas
ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence
Daemon), but this may also happen if your kernel was configured without support for module unloading. Please be sure to exit any programs that may be using the GPU(s) before attempting to
upgrade your driver. If no GPU-based programs are running, you know that your kernel supports module unloading, and you still receive this message, then an error may have occurred that has
corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot your computer.
I gor clean answer for the dpkg -l |grep nvidia and ls -l /lib/x86_64-linux-gnu/*nvidia* /lib/x86_64-linux-gnu/libcuda*and rebooted but an error with Software&Updates happens again:
sudo software-properties-gtk
ERROR:dbus.proxies:Introspect error on :1.98:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 100, in <module>
app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 222, in __init__
self.backend.Reload();
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.98 was not provided by any .service files
I also tried to install drivers in the another ways:
sudo apt install nvidia-driver-510 nvidia-dkms-510 + CUDA Toolkit 11.7 Update 1 Downloads | NVIDIA Developer
But when I turned on nvidia the black screen appeared anyway.
I don’t understand why in the nvidia cuda-downloads I can only get instruction for the installation of version 510 but ubuntu-drivers autoinstall gives me version 470.
Thank you! But it doesn’t work :(
I rebooted and got black screen than I went to the recovery mode and terminal and created new bug-report. But do I need to try the same actions after installing this: sudo apt install nvidia-driver-510 nvidia-dkms-510 + CUDA Toolkit 11.6 Update 2 Downloads | NVIDIA Developer instead of current version was installed by sudo ubuntu-drivers autoinstall maybe? Because with 470 version I have mismatch in subversions of nvidia and cuda, I can show it: nvidia_libs.txt (5.5 KB) nvidia_packages.txt (3.5 KB) nvidia-bug-report.log.gz (301.5 KB)