Ubuntu 18.04.3 - NVIDIA driver cannot be installed


I have a dual boot (Ubuntu 18.04.3 and Windows 10) laptop Acer Aspire 7 series, with an NVIDIA GeForce GTX 1050 (2 GB GDDR5 Dedicated VRAM). Every time I install an NVIDIA driver (because I also want to install Cuda and run some deep learning algorithms), my laptop stops working. It doesn’t stop/freeze immediately after the installation. It stops/freezes after I reboot.

Also, immediately after the installation, I tried to verify that the installation was completed correctly, by typing nvidia-smi in my terminal. I got the error message that “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver”.

I tried to switch off secure boot and add nomodeset in my kernel parameters, but it wasn’t successful.

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

The resulting .gz file
nvidia-bug-report.log.gz (1.19 MB)

Please follow this:

  • delete /etc/X11/xorg.conf
  • remove the kernel parameter ‘nomodeset’
  • make sure nvidia-prime is installed (sudo apt install nvidia-prime)
  • switch to nvidia (sudo prime-select nvidia)
  • remove stray blacklist files (sudo rm /lib/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf)
  • update the initrd (sudo update-initramfs -u)
  • reboot
    If this doesn’t resolve the issue, please create a new nvidia-bug-report.log.
1 Like

I did all the above. During the 5th step, this was printed:
~$ sudo rm /lib/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf
rm: cannot remove ‘/lib/modprobe.d/blacklist-nvidia.conf’: No such file or directory
rm: cannot remove ‘/etc/modprobe.d/blacklist-nvidia.conf’: No such file or directory

After the reboot my computer froze with a black screen.

Please reboot to recovery after black screen and create a new nvidia-bug-report.log
If you have internet connection, you can use pastebinit to upload it from console.

  • install pastebinit (sudo apt install pastebinit)
  • unzip logfile (gunzip nvidia-bug-report.log.gz)
  • upload logfile (pastebinit -i nvidia-bug-report.log)
  • note down and post the url you’re given

I am trying to install pastebinit but it fails in the root terminal.

create log, prime-select intel, reboot, upload.

I did
~$ sudo apt-get purge nvidia*
to be able to enter my computer.
After that prime-select intel was executed and the report log re-executed.
nvidia-bug-report.log.gz (1.17 MB)

So, what do you think of my latest report?

Sorry, missed that thread.
According to the logs, on the boot when you created it the xserver was coming up right, looks good. In which state did you create it?

Not sure. Right now, I cannot find the nvidia-bug-report.sh. Probably because of the sudo apt-get purge nvidia-*. So, during when my pc wasn’t functional, I managed to run it and then, after the purge, upload it.

Please try this:
create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing

[Desktop Entry]
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"

Reinstall the nvidia driver from repo/ppa, make sure prime-select is set to nvidia and reboot.

I did all the above and, for the first time, my laptop booted without freezing or showing black screen.

I also executed nvidia-smi and it worked. I received the following message:

| NVIDIA-SMI 440.26 Driver Version: 440.26 CUDA Version: 10.2 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 49C P0 N/A / N/A | 205MiB / 2000MiB | 2% Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |
| 0 3138 G /usr/lib/xorg/Xorg 124MiB |
| 0 3315 G /usr/bin/gnome-shell 58MiB |
| 0 3953 G …uest-channel-token=15731842721092268049 18MiB |

Is there any other configuration that I have to do? I would also like to install CUDA on this laptop.

Looks good. To not break your driver on cuda install, follow this:

  • download the cuda .deb
  • add the repo to your system (first three steps from install instructions on download page)
  • don’t install cuda
  • instead, run sudo apt install cuda-toolkit-10-1
  • set PATH variable if necessary

Thank you very much for your help. I will try it and if anything comes up, I will let you know.

I am using Mint with Cinnamon, can you please help me to get this fixed? :D


I have the same issue as original poster. Here’s my bug report log nvidia-bug-report.log.gz (146.4 KB)

SOLVED: The error was either secure boot / fast boot was still enabled in BIOS. I turned these off and rebooted and it works.

Best, Hud