My laptop runs Ubuntu 18.04 and is equipped with both integrated Intel and dedicated NVIDIA GPU, using Optimus technology. I was using nvidia-340 driver, installed from apt.

I needed CUDA, so I can run tensorflow code on GPU, so first I needed to upgrade my driver. I downloaded legacy 390 driver from official site and installed it, it appeared to work fine. Then I proceeded to install CUDA 9, but for some reason examples wouldn't run so I knew something was wrong.

After rebooting Ubuntu started to freeze immediately after I login. Desktop icons, background don't load, can't move mouse pointer.

Purging NVIDIA drivers and installing 340 again doesn't help. In that case, when I boot it gets stuck on that black screen with items ticked with green "[OK]"s. It seems to freeze upon starting gnome.

I tried "nomodeset" and various "acpi_os" options in GRUB. Doesn't help.

Best thing I could achieve was purging all NVIDIA drivers again (driver defaults to nouveau). Then I boot up, login, get to Desktop and can use everything, but resolution is ridiculous: 960x540. There's only one alternative (an even worse resolution).

After having viewed lots of askubuntu questions and YouTube videos today I still have no idea what could I do next. Please help.

  • What Nvidia hardware are you using (so we can verify it has the compute capability to support CUDA 9). Check the /etc/modprobe.d for any files blacklisting nouveau (you may have been dumped back to some vesa driver) and remove those lines/files. See if your PATH and LD_LIBRARY_PATH have the CUDA modifications. – ubfan1 Aug 21 '19 at 1:03
  • Hardware: NVIDIA GeForce GT 720M There is this file in /etc/modprobe.d: nvidia-installer-disable-nouveau.conf Found nothing CUDA related in either PATH or LD_LIBRARY_PATH. – Drinkwater Aug 21 '19 at 8:49

From the Intel GPU page Geforce and Titan

We see that the GT 720M has a compute capability of 2.1. This is too low for CUDA 9.0, but still enough for CUDA 8.0. However, Tensorflow has its own compute capability requirements, and they also are above the 2.1 you (and I) have on our machines. Even the dnn requirements are higher, so while it may be possible to run some 9.0 examples, you probably need a more capable GPU for what you want to do. Now the PATH and LD_LIBRARY_PATH modifications are clearly described in the Intel instructions for setting up CUDA, basically, adding the CUDA supplied bin and lib directories.

Getting back to the Nvidia drivers from the standard repos, delete that file you identified which suppresses the nouveau driver. reboot and you should be back to decent resolution. Install the Nvidia driver suggested in the "Software and Updates"/Additional Drivers tab.

Do the Alt-f3 etc. keys bring up a virtual terminal? Try getting to the desktop with Alt-f7. If that does not work, try the recovery grub boot option to get back to a desktop. Other places to check for leftover config changes are /etc/default/grub, the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" might have a nomodeset left in it. Check the driver in use with lshw -c video (expected to be nouveau in recovery I guess).
Check the /etc/modprobe.d files for any line blacklisting nvidia. The only one expected is nvidiafb for the framebuffer. There are lots of Nvidia black screen problems and answers on this site, use search to see if any of their fixes work for you.

  • I deleted nouveau blacklist file. Rebooted. Ended up with same weird resolution. Then I installed suggested Nvidia driver. Rebooted. Boot gets stuck on green [OK]s screen, right after something like: [OK] started Gnome display manager. – Drinkwater Aug 21 '19 at 21:30

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.