Cannot get CUDA to work

Same results

Thanks. It does says CUDA is installed. But it also says libnccl is not installed, but it doesn’t seems to be the problem.

        libcudart.so.12 -> libcudart.so.12.4.99
        libcuda.so.1 -> libcuda.so.550.90.07
        libcudadebugger.so.1 -> libcudadebugger.so.550.90.07
        libcuda.so.1 -> libcuda.so.550.90.07
libcuda is installed
        libcudart.so.12 -> libcudart.so.12.4.99
libcudart is installed
ERROR: libnccl is NOT installed
        libcudnn.so.9 -> libcudnn.so.9.2.0
        libcudnn_ops.so.9 -> libcudnn_ops.so.9.2.0
        libcudnn_heuristic.so.9 -> libcudnn_heuristic.so.9.2.0
        libcudnn_graph.so.9 -> libcudnn_graph.so.9.2.0
        libcudnn_engines_runtime_compiled.so.9 -> libcudnn_engines_runtime_compiled.so.9.2.0
        libcudnn_engines_precompiled.so.9 -> libcudnn_engines_precompiled.so.9.2.0
        libcudnn_cnn.so.9 -> libcudnn_cnn.so.9.2.0
        libcudnn_adv.so.9 -> libcudnn_adv.so.9.2.0
libcudnn is installed
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0

@JoseskVolpe yes, libnccl is an additional install…

So you have three screens connected (one is the laptop Screen)? If so, can you disconnect external screens and test again…

To be honest, the only work around for this hardware I see is to pass the nvidia card through to a VM with vfio-pci…

Tried it, still don’t work

Something i could do is check if that works in Leap or in other distributions. But, i would need a external storage first because i wouldn’t like to replace my Slowroll install with all my stuff already setuped just to make a diagnostic. Or see someone who got it working because i must not be the only one person in the whole world with a AMD/NVIDIA budget gaming laptop running Linux trying to make CUDA work, ¿am i right? lol

@JoseskVolpe I think your the first I’ve come across in these Forums :wink: Most are Intel/Nvidia or AMD/AMD…

clinfo | grep "Device Name"
  Device Name                                     NVIDIA T400

You can try a Live USB…

1 Like

The problem with Live USB is that it loads basic drivers with basic configurations, so usually we have issues that are solved in a post-installation (and sometimes with special configurations). And that often happens with NVIDIA drivers. I would also need a reboot which would be impossible on a Live USB as it’ll wipe all changes. So i need to install on a external USB drive.

So, i tested on my Windows 11 partition. Blender does detects CUDA and OptiX, CUDA works but OptiX crashes (probably a issue on Blender and not on the driver). Interesting is that it also detects HIP and works on my integrated AMD GPU (i thought that would only be available on dedicated GPUs)… I might see about making that work on Linux aswell later.
Of course i don’t consider it solved as i would like it working on Linux, but here i could confirm it’s not an hardware issue.

@JoseskVolpe I would suggest visiting the Nvidia forums and ask there… I do believe for openSUSE your an edge case… Like I said, I use to run an AMD gpu as primary display and the Nvidia (Quadro T400 and a Tesla P4) somethings worked, some didn’t…

I’ll ask there and then post the solution here

1 Like

You are mistaken. Live openSUSE image is by default persistent, it stores all changes on USB and it is perfectly possible to install additional packages (except kernel itself and bootloader). You cannot recreate initrd, so you will need to blacklist nouveau via kernel command line (if it is included in initrd on live).

1 Like

¡That’s cool! It’s a point to OpenSUSE from me. :3
I’ll try that Live USB.

@JoseskVolpe I run;

cat /etc/modprobe.d/50-nvidia.conf 

blacklist nouveau
options nouveau modeset=0
##Enable NVIDIA GSP Firmware
options nvidia NVreg_EnableGpuFirmware=1
##Power Management
options nvidia NVreg_DynamicPowerManagement=0x02
options nvidia NVreg_PreserveVideoMemoryAllocations=1

I’ve just open a thread in the NVIDIA Forums

1 Like

@JoseskVolpe Further investigation here, do you have the file /etc/OpenCL/vendors/nvidia.icd installed?

Yes, i do.

I tried it, that USB drive was really slow and took me a whooole day, then it ran out of space ugh.
I’ve made a backup on my main USB drive and i’ll try that again on it.

Tested it on Leap 15 Live, installed the RPM version. ¡It works! Blender does detects CUDA. It crashes when it’s going to render tho, i’m gonna take a look into that if i have that issue on Tumbleweed aswell after making it detectable. But now i can confirm it does work in a AMD/NVIDIA setup.

I installed the open-source module, it didn’t worked, had to revert back to the proprietary module for CUDA to work on this live install.

@JoseskVolpe What did it show for OpenCL? If as root you run the command ldconfig it doesn’t emit anything?

It had shown that there was no GPU compatible for OpenGL paths.

Well… I already formated the USB drive to put my files back in. Sorry.

Looks like older .run versions of CUDA didn’t had the kernel driver module option, newer versions has. I unmarked this option. ¿Maybe that’s the reason it doesn’t works?

@JoseskVolpe Oh for sure, you need the driver closed or open…

So when I use the cuda run file I select the driver and in driver options select the open driver…

If I want to run a later driver I use (the same as the cuda options used);

NVIDIA-Linux-x86_64-555.52.04.run -ui=none --no-questions --accept-license \
                                  --disable-nouveau --no-cc-version-check -m=kernel-open \
                                  --install-libglvnd  2>&1

modinfo nvidia | grep "license"
license:        Dual MIT/GPL

 nvidia_check 
	libcudart.so.12 -> libcudart.so.12.5.39
	libcuda.so.1 -> libcuda.so.555.42.02
	libcudadebugger.so.1 -> libcudadebugger.so.555.42.02
	libcuda.so.1 -> libcuda.so.555.42.02
libcuda is installed
	libcudart.so.12 -> libcudart.so.12.5.39
libcudart is installed
	libnccl.so.2 -> libnccl.so.2.20.3
libnccl is installed
	libcudnn_ops.so.9 -> libcudnn_ops.so.9.2.0
	libcudnn_heuristic.so.9 -> libcudnn_heuristic.so.9.2.0
	libcudnn_graph.so.9 -> libcudnn_graph.so.9.2.0
	libcudnn_engines_runtime_compiled.so.9 -> libcudnn_engines_runtime_compiled.so.9.2.0
	libcudnn_engines_precompiled.so.9 -> libcudnn_engines_precompiled.so.9.2.0
	libcudnn_cnn.so.9 -> libcudnn_cnn.so.9.2.0
	libcudnn_adv.so.9 -> libcudnn_adv.so.9.2.0
	libcudnn.so.9 -> libcudnn.so.9.2.0
libcudnn is installed
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Apr_17_19:19:55_PDT_2024
Cuda compilation tools, release 12.5, V12.5.40
Build cuda_12.5.r12.5/compiler.34177558_0

./deviceQuery 

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA T400"
  CUDA Driver Version / Runtime Version          12.5 / 12.5
  CUDA Capability Major/Minor version number:    7.5
  Total amount of global memory:                 1685 MBytes (1766785024 bytes)
  (006) Multiprocessors, (064) CUDA Cores/MP:    384 CUDA Cores
  GPU Max Clock rate:                            1425 MHz (1.42 GHz)
  Memory Clock rate:                             5001 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 524288 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total shared memory per multiprocessor:        65536 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1024
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 3 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Managed Memory:                Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 6 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 12.5, CUDA Runtime Version = 12.5, NumDevs = 1
Result = PASS

¿So i should install the .run driver instead of what is packaged with the non-free X11 distribution repositories? The thread i mentioned says i should unmark that on the .run file.

Oh no, nvm, we’re talking about the module. Ugh, i’m confused.