After enduring hell with the installation, I encounter failures in secure boot. I am running Ubuntu 24.04.2.
nvidia-smi returns the appropriate info with/without secure boot, but when enabling secure boot CUDA programs dont work. When using deviceQuery in the cuda-samples repo I am met with
./deviceQuery Starting…
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 999
→ unknown error
Result = FAIL
I do not have any issues running this without secure boot. I also tried sudo ./deviceQuery as recommended in another post (I am unable to link) to no avail.
As to how I installed everything:
I used the installation here:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda-repo-ubuntu2404-12-9-local_12.9.1-575.57.08-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2404-12-9-local_12.9.1-575.57.08-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2404-12-9-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-9
This worked fine. The driver installer command
sudo apt-get install -y cuda-drivers
resulted in a “no device found” error upon running nvidia-smi, so I uninstalled it and installed driver version 575.57.05 via the run file here.
I generated two keys MOK.dir and MOK.priv (I forget if I actually created these or if they just appeared after the installation, to be honest) and used
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.priv MOK.der $(modinfo -n nvidia)
and nvidia-smi worked in secure boot. However, I had used these keys on another installation attempt beforehand (which I had uninstalled). I am unsure if this would cause any issues. I am new to Linux and this stuff is way beyond my knowledge, so I am unsure how to check/know if this is the cause of my issues.
I figure this may be of some help:
$ dpkg -l | grep -i nvidia
ii cuda-nsight-compute-12-9 12.9.1-1 amd64 NVIDIA Nsight Compute
ii cuda-nsight-systems-12-9 12.9.1-1 amd64 NVIDIA Nsight Systems
ii cuda-nvtx-12-9 12.9.79-1 amd64 NVIDIA Tools Extension
ii libnvidia-cfg1-575:amd64 575.57.08-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-575 575.57.08-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-egl-gbm1:amd64 1.1.2.1-1ubuntu1 amd64 GBM EGL external platform library for NVIDIA
ii libnvidia-egl-wayland1:amd64 1:1.1.19-1ubuntu1 amd64 Wayland EGL External Platform library – shared library
ii libnvidia-egl-xcb1:amd64 1.0.1-1ubuntu1 amd64 This is an EGL platform library for the NVIDIA driver to support
ii libnvidia-egl-xlib1:amd64 1.0.1-1ubuntu1 amd64 This is an EGL platform library for the NVIDIA driver to support
ii libnvidia-extra-575:amd64 575.57.08-0ubuntu1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-575:amd64 575.57.08-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gpucomp-575:amd64 575.57.08-0ubuntu1 amd64 NVIDIA binary GPU compiler library
ii linux-signatures-nvidia-6.11.0-28-generic 6.11.0-28.28~24.04.1 amd64 Linux kernel signatures for nvidia modules for version 6.11.0-28-generic
ii nsight-compute-2025.2.1 2025.2.1.3-1 amd64 NVIDIA Nsight Compute
ii screen-resolution-extra 0.18.3 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-575 575.57.08-0ubuntu1 amd64 NVIDIA binary Xorg driver
I would be glad to supply any other information. Any help is truly appreciated!