I have Ubuntu 18.04 installed on ASUS laptop with GEFORCE 940MX GPU card. I have tried everything using proprietary drivers or using NVIDIA run file to install cuda drivers. Finally, I was able to install NVIDIA and CUDA drivers using cuda run file.
OpenGL and NVIDIA-X-config were not installed during this installation.
Also, secure boot is disabled prior to installation.
Now, nvidia-smi works after this installation, but whenever I reboot system it gives 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.”
It will be really helpful if experts can comment how to overcome this issue. Thanks in advance
This is probably an Optimus laptop, so you shouldn’t use the .run installer. Use the driver from ubuntu graphics ppa, then download the .deb and install cuda-toolkit.
I had to use the run-installer to prevent the installation of “drm” (direct rendering machine?) which apparantly allows the intel onboard graphics card to be used by the graphical user interface (gdm? lightdm? xorg?).
The GPU memry should be untouched by the GUI since the NVIDIA GPU is used for deep-learning and is needed in it’s full capacity.
It’s 2019, you don’t need to specify any monitors in xorg.conf since 2007 anymore, except for very specific cases. Just setting the device to use should be enough which that snippet does.
Just connect the monitor and use Gnome’s control center to arrange them. Unless you have set ‘nomodeset’ and killed the intel gpu.
hmm, the snippet is working (can login to the GUI after rebooting), but the nvidia-smi is still not working (same error as before: “NVIDIA-SMI has failed because it couldn’t communicate …” ).
There’s no kernel driver installed.
Did you already uninstall the .run installer driver using the --uninstall option?
Afterwards, you should install the nvidia driver from repo, either software&drivers application or
sudo apt install nvidia-driver-430
Only if that has been done the post I linked to works, of course.
As I mentioned before, installing the driver via sudo apt install nvidia-driver-430 leads to the fact that the nvidia GPU is used for the GUI / x-server.
I can’t have that.
My configuration (before rebooting) was:
Intel onboard graphics for GUI
Nvidia RTX 2080 for CUDA computations only
Therefore I had to install it via the runfile like this:
where the options --no-open-gl-files and --no-drm prevent the system from allocating memory on the Nvidia GPU for the X-server (a problem I had before)
Is there a way to install the ppa drivers with the above mentioned options? (no-open-gl and no-drm)?
As far as I understand it drm (direct rendering manager?) is especially guilty of this behaviour, to borrow memory from the Nvidia GPU for the x-server, so it needs to be suppressed.
The nvidia-headless-435 contains only the driver, while the full nvidia-driver-435 package contain everything including display component such OpenGL libraries. If you hope to connect the display to a NVIDIA display card, install the full package, otherwise, install only the driver.
The nvidia-utils-435 package provide utilities such as nvidia-smi.
Reboot. If the installation is successful, command nvidia-smi will show all NVIDIA GPUs."