(SOLVED) **Need help installing CUDA on Linux Mint 19.3 - GeForce GTX 970M -**

**In the Device Driver Manager I have these as options (Nvidia) - 384,387,390,410,415,440,390,435 and xorg video nouveau.

**I do 3D modeling and Game Design. I’m trying to enable CUDA GPU, so I can use it for renders.

**I’m using Blender 2.82, but the option to use CUDA GPU is greyed out. :(

**Can somebody help me get this to work? I’m new to Linux so I need a step-by-step instructions. I tried multiple times, but I cant seam to get it to work correctly. I dont mind starting over from scratch! But Please, I want to avoid login/loops or boot issues etc…

Thank you guys! :D

**Here is my system out put!:

System: Host: ColexiumStudios-GE72-6QF Kernel: 5.3.0-51-generic x86_64 bits: 64 compiler: gcc
v: 7.5.0 Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Machine: Type: Laptop System: Micro-Star product: GE72 6QF v: REV:1.0 serial: Chassis:
type: 10 serial:
Mobo: Micro-Star model: MS-1794 v: REV:0.A serial: UEFI: American Megatrends
v: E1794IMS.10C date: 01/07/2016
Battery: ID-1: BAT1 charge: 39.8 Wh condition: 40.7/53.4 Wh (76%) volts: 12.2/10.9
model: MSI BIF0_9 serial: N/A status: Unknown
CPU: Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP arch: Skylake-S
rev: 3 L2 cache: 6144 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 41599
Speed: 2873 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 2870 2: 2869 3: 2869
4: 2869 5: 2869 6: 2870 7: 2870 8: 2870
Graphics: Device-1: Intel HD Graphics 530 vendor: Micro-Star MSI driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:191b
Device-2: NVIDIA GM204M [GeForce GTX 970M] vendor: Micro-Star MSI driver: N/A
bus ID: 01:00.0 chip ID: 10de:13d8
Display: x11 server: X.Org 1.20.5 driver: modesetting unloaded: fbdev,vesa
resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) v: 4.5 Mesa 19.2.8
compat-v: 3.0 direct render: Yes

Have the 440 driver installed, then please check if libcuda is installed:
ls /usr/lib/x86_64-linux-gnu/libcuda*
if not install it
sudo apt install libnvidia-compute-440
check if nvidia-modprobe is installed:
which nvidia-modprobe
if not, install it:
https://community.linuxmint.com/software/view/nvidia-modprobe

Now it’s important to know which Blender package you installed, whether it has cuda support enabled and if it is bundling the cuda runtime. How did you install Blender?
Also, please post the output of nvidia-smi

So when I run " /usr/lib/x86_64-linux-gnu/libcuda*" This is the result: /usr/lib/x86_64-linux-gnu/libcudart.so.9.1.85 /usr/lib/x86_64-linux-gnu/libcuda.so /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/libcuda.so.440.33.01

I manually used FILE SYSTEM explore and it doesnt come up with anything by that name. However, if i type in "libcuda* this is whats displayed:
libcuda.so
libcuda.so.1
libcuda.so.440.33.01
libcudart.so.9.1
libcudart.so.9.1.85

So in the TERMINAL, I copy and pasted: sudo apt install libnvidia-compute-440

This is what the output was:
Reading package lists… Done
Building dependency tree
Reading state information… Done
libnvidia-compute-440 is already the newest version (440.33.01-0ubuntu1).
libnvidia-compute-440 set to manually installed.
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

I do have that in the file system

I copy and pasted nvidia-smi .This was the result.
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 downloaded the Blender-2.82a-linux64.tar.xz from the website. Extracted it etc.

Looks like the driver isn’t loading. Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).

nvidia-bug-report.log (130.2 KB)

Okay here is the log

  • 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
  • open bios setup
    Please check if secure boot is enabled in bios and disable it.
1 Like

So I tried to remove stray blacklist files, this was the result:
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

So I tried this:( sudo update-initramfs -u ) This was the result
update-initramfs: Generating /boot/initrd.img-5.3.0-51-generic
cryptsetup: WARNING: Invalid source device /swapfile
cryptsetup: WARNING: target cryptswap1 has a random key, skipped

It doesn’t seam to be working correctly :(

That was just a test if those blacklist files exist. please ignore the errors and check secure boot setting in bios.

Wow!!! That worked!!! I wanna buy a beer! After all the forums I went to, your method worked!!! Thank you sooo much!! I really appreciate it! I opened Blender and Bam!! GPU is available!!! :D

So it looks like this one of the main issue was because secure boot enabled?

1 Like

It was the only issue.

Weird thing happen. So while I was using Blender the CUDA became grayed out again. The update manager Prompted me to update nvidia-cuda-dev In this case I would repeat the steps, but tell the update manager to ignore this?

So i repeated the steps, then did a reboot. Seams to be working. The nvidia icon on the task bar, indicates that the nvidia GPU is the active graphics card. So all good on that front. So the best thing to do would be to disable updates for nvidia on the update manager I guess??

Updates shouldn’t be a problem. If the nvidia driver gets updated in the background, a reboot is necessary.

I get this error in Blender when I render. (cuda error at cuctxcreate: unknown error) Do you know where this error may be coming from? :)

Please create and attach an new nvidia-bug-report.log.

nvidia-bug-report.log (30.5 KB)

Okay here is the new log report

You just attached the script itself, not the output.