Score:1

I installed ImageMagick and now nvidia-smi cannot communicate with nvidia drivers

in flag

I am running Ubuntu 20.04.3 LTS and was using a Nvidia GPU just fine yesterday. I then installed imagemagick (only new install although this may include dependencies), restarted my PC, and now I am unable to use my GPU. Nvidia-smi command returns

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Anyone know what setting ImageMagick may have automatically changed on install to cause this issue?

EDIT: /var/log/Xorg.0.log shows the following line: (II) NVIDIA(GPU-0): Deleting GPU-0

EDIT 2: List of packages installed by imagemagick:

  • imagemagick-6.q16:amd64
  • imagemagick:amd64
  • libilmbase24:amd64
  • libopenexr24:amd64
  • libmagickcore-6.q16-6-extra:amd64
  • libnetpbm10:amd64
  • netpbm:amd64
  • linux-modules-5.13.0-25-generic:amd64
  • linux-image-5.13.0-25-generic:amd64
  • linux-modules-extra-5.13.0-25-generic:amd64
  • linux-hwe-5.13-headers-5.13.0-25:all
  • linux-headers-5.13.0-25-generic:amd64

EDIT 3:

$ dkms status
nvidia, 460.73.01, 5.11.0-46-generic, x86_64: installed
nvidia, 460.73.01, 5.8.0-53-generic, x86_64: installed

$ uname -r
5.13.0-27-generic
Organic Marble avatar
us flag
Why did you install ImageMagick? It comes installed on Ubuntu desktop systems by default.
heynnema avatar
ru flag
Check to make sure that Secure Boot is disabled in your BIOS.
Sven Voigt avatar
in flag
@OrganicMarble I needed the convert command and apt said I needed to install imagemagick
Sven Voigt avatar
in flag
@heynnema secure boot is disabled in BIOS (checked today after the issues). Although, yes, I needed to do that to originally get the GPU to work
heynnema avatar
ru flag
Edit your question and show me `dkms status` and `uname -r`.
Sven Voigt avatar
in flag
@heynnema edited the question. Thanks
Score:0
ru flag

Based on dkms status and uname -r information, you need to reinstall your Nvidia drivers.

Open Software & Updates, select the "Additional Drivers" tab, and note what drivers are available for your configuration.

Select the Nvidia driver that indicates "proprietary, tested", probably version 470. Do not select the 495 driver.

Reboot when complete. Recheck the nvidia-smi command output.

Sven Voigt avatar
in flag
Thanks for the help, nvidia-smi shows my gpu. However, the command `dkms` no longer exists. Do you have any idea what the issue was? Was it that the kernel was updated and the 460 drivers don't work with the 5.13 kernel?
heynnema avatar
ru flag
@SvenVoigt The correct command would be `dkms status`. The issue was that your kernel got upgraded, and the Nvidia dkms driver didn't get rebuilt for the newer kernel for some reason. Did you install the Nvidia version 470?
Sven Voigt avatar
in flag
Yes, I installed Nvidia driver version 470. Oh and I see, they needed to be rebuilt. Thanks! When I try to run `dkms status` I get the error message `Command 'dkms' not found, but can be installed with: sudo apt install dkms`. Maybe it was only installed for driver version 460
heynnema avatar
ru flag
@SvenVoigt `dkms` must be there for Nvidia to work. Go ahead and reinstall it and then try `dkms status` again... show me that output.
Sven Voigt avatar
in flag
`dkms status` outputs nothing. Just runs and finishes running the command
heynnema avatar
ru flag
@SvenVoigt That's strange. Show me `ls -al ls /lib/modules/$(uname -r)/updates/dkms` and `ls -al /usr/src`.
Sven Voigt avatar
in flag
The updates folder doesn't exist in `/lib/modules/5.13.0-27-generic/`. `usr/src` has `linux-headers-5.13.0-25-generic linux-hwe-5.13-headers-5.13.0-25 nvidia-470.86 linux-headers-5.13.0-27-generic linux-hwe-5.13-headers-5.13.0-27` folders
heynnema avatar
ru flag
@SvenVoigt Very strange! I don't know how Nvidia is working then. It properly shows the Nvidia source code in /usr/src. Show me `ls -al /var/lib/dkms` and `grep -i dkms /var/log/dpkg.log*`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.