Nvidia driver 384 ran well on Ubuntu 17.04 and 17.10. I switched to Ubuntu 18.04 (clean fresh install) and installed nvidia-driver-396 following this great answer
Then I installed cuda toolkit 9.2 using .run file. It failed to install with and without choosing to install nvidia driver along with it. Rebooted and tried again, then cuda was installed succesfully. But nvidia isn't running.
$ nvidia-settings
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) (prog-if 00 [VGA controller])
What I have tried so far:
Uninstalled nvidia (
nvidia-uninstall
) Successful but with warning: "Some symlinks could not be removed. The I removed cuda withrm -rf /usr/local/cuda*
and installed nvidia-driver-396 but still the same errorRemoved nvidia-396, installed 396 from nvidia's website (.run file). It started with a warning "Distribution provided pre-script failed". I proceeded and installation was successful. It also added nouveau to blacklist automatically. Still same result as 1.
Uninstalled previous one, removed blacklist entry, installed nvidia-390 Still same result
Uninstalled previous one, installed it from "Additional drivers" from GUI. No change.
Went to console mode. Stopped gdm. Then installed 396. No change. Installed 390 likewise. No change.
Tried using xorg-edgers ppa (Yes its is said they are same as graphics-drivers ppa but I am desperate now) Unmet dependency problems. So reverted to removed everything.
Uninstalled everything, went to recovery mode then installed nvidia-driver-390. No luck.
I felt nvidia driver from official website made some irrevesible changes. So tried installing it again so that I can uninstall it properly from recovery mode as suggested in the great answer using --unistall option. But now it fails to install. Error message says nouveau is running despite being blacklisted. I removed the blacklist entry later
I have Intel i5 with Intel HD graphics along with Nvidia GeForce 940M. Yes nvidia-prime was installed. Dual booted with Windows 10, Secure Boot is disabled
During all these steps, once I was able to start the nvidia x server app, though the nvidia-smi gave the same error. Once there was a resolution issue when cuda ran nvidia-xconfig. I removed the xorg.conf to fix it. Right now my pc has nouveau running, no other drivers installed, no blacklisting nvidia, no xorg.conf.
Can someone help. I don't see any reason why it should not work. nvidia driver 390.12 is reported to work well with kernel 4.15 but still it is not working on mine.