Last time I tried using nvidia-smi it worked fine in my Ubuntu 16.04 machine with a Pascal Titan X.

After a month or so of not using the machine, I booted up and acceleration no longer works. I tried to run nvidia-smi and I get this error:

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

I tried re-installing the latest version of the driver with:

sudo ./NVIDIA-Linux-x86_64-390.42.run -no-drm

Rebooted, and nvidia-smi reports the same error. Running lsmod | grep nvidia shows nothing.

I tried installing the driver this way:

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-384

Then restarted - still nothing for lsmod | grep nvidia and same error for nvidia-smi.

In my /var/log/syslog, I see this message:

nvidia: version magic '4.4.0-116-generic SMP mod_unload modversions ' should be '4.4.0-116-generic SMP mod_unload modversions retpoline '

How can I trouble-shoot and get acceleration working again?

  • Maybe something knocked over your machine and the card got loose? Run lspci and make sure the card is really being seen by the kernel. Also, try reseating the card. Yes, it sounds dumb, but it happens! – JayEye Mar 13 '18 at 4:18
  • Thanks for the suggestions. The machine definitely did not get knocked over or anything like that. The monitor comes on, but I have thought of reseating the card too. I'll do that and if it fixes it I will update my post. lspci reports: 01:00.0 VGA compatible controller: NVIDIA Corporation Device 1b00 (rev a1) – Jeshua Lacock Mar 13 '18 at 4:27
  • Try installing one of the latest kernels and install nvidia driver after that. – Michal Przybylowicz Mar 14 '18 at 17:25

Check that your nvidia kernel module supports retpoline since all new kernels are built with this to mitigate Spectre. You may be running the nouveau driver now, and you may need to rebuild the nvidia kernel module with a patched gcc compiler. See: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1750937

  • Since that thread is pretty horrendous; to summarize what I did to get it working again was to purge the unofficial gcc 5.4.1 that was installed (and related 5.4.1 packages), then install the official gcc 5.4.0 (that has been updated for dkms and the 116 kernel), purge the nvidia driver, then reinstall it and now all is well. Thank you! – Jeshua Lacock Mar 15 '18 at 0:07

I just noticed that you downloaded the 390 drivers from nvidia, but tried to reinstall the 384.

nvidia's installation procedure is weird, I have to re-read the installation instructions every few months, but if you follow them to the letter they should work. At least the CUDA part does, I have no experience with the display drivers.

After you've installed the 390 drivers, run sudo nvidia-modprobe and see what the error messages, if any, are.

I think the reason for the original failure is that the kernel was upgraded (automatically or not, it does not matter), and nvidia drivers need to be rebuilt. At least that's my usual failure mode with the CUDA drivers.

  • Reinstalling didn't help because the version of gcc that I was running was not updated for the new kernel. Once I installed the official gcc 5.4.0 and reinstalled the driver then all was well. – Jeshua Lacock Mar 15 '18 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.