# NVIDIA drivers not working while Secure Boot is enabled after updating to Ubuntu 24.04

**URL:** <https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351>\
**Category:** Drivers - Linux, Windows, MacOS\
**Tags:** linux-driver, ubuntu, linux\
**Created:** [September 2, 2024, 4:36am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351 "2024-09-02T04:36:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramon.galindo.gerardo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ramon.galindo.gerardo](https://forums.developer.nvidia.com/u/ramon.galindo.gerardo)\
**Post date:** [September 2, 2024, 4:36am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/1 "2024-09-02T04:36:27Z")

</div>

I recently updated my laptop to Ubuntu 24.04, after which the second monitor I connect to using HDMI stopped working. I noticed that it does work when Secure Boot is disabled in BIOS before booting. I have tried to purge all nvidia drivers and reinstall both the recommended 560 driver or the 535 driver my computer was using before upgrading to Ubuntu 24.04, but that doesn’t seem to help.

It appears as if the installed drivers are not signed and thus not loaded when Secure Boot is enabled:

- The output of the ~$ nvidia-smi command is the following:

> NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

- The output of the ~$ inxi -G command doesn’t even list an installed driver for the GPU:

> Graphics:  
> Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel  
> **Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile] _driver: N/A_**  
> Device-3: Sunplus Innovation Integrated\_Webcam\_HD driver: uvcvideo  
> type: USB  
> Display: x11 server: [X.Org](http://X.Org) v: 21.1.11 with: Xwayland v: 23.2.6 driver: X:  
> loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915  
> resolution: 1920x1080~120Hz  
> API: EGL v: 1.5 drivers: iris,swrast platforms: x11,surfaceless,device  
> API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.0.9-0ubuntu0.1  
> renderer: Mesa Intel UHD Graphics (CML GT2)  
> API: Vulkan v: 1.3.275 drivers: N/A surfaces: xcb,xlib

- Also, the NVIDIA Settings app is installed but doesn’t seem to recognize any installed GPU drivers:  
 ![Screenshot_20240901_214800](https://global.discourse-cdn.com/nvidia/original/4X/d/8/a/d8ae439635357dacd4cb547e492e64ea236b1c1f.png)

I’m including the nvidia bug report file and information about my system. I may also add that I have Windows 10 running with dual boot in the same machine and that works perfectly fine.  
[nvidia-bug-report.log](https://forums.developer.nvidia.com/uploads/short-url/tvfhEt0QJKT48nT9U3MwpOqxBd8.log) (2.0 MB)

Operating System: Kubuntu 24.04  
KDE Plasma Version: 5.27.11  
KDE Frameworks Version: 5.115.0  
Qt Version: 5.15.13  
Kernel Version: 6.8.0-41-generic (64-bit)  
Graphics Platform: X11  
Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz  
Memory: 15.4 GiB of RAM  
Graphics Processor: Mesa Intel® UHD Graphics  
Manufacturer: Dell Inc.  
Product Name: G3 3500

¿Could someone please share any indications on how to sign the drivers or solve the issue in some other way? Thanks very much.

---

<div class="post-metadata">

**Author:** ![mohammad.vazirpanah1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mohammad.vazirpanah1](https://forums.developer.nvidia.com/u/mohammad.vazirpanah1)\
**Post date:** [October 21, 2024, 12:14pm UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/2 "2024-10-21T12:14:14Z")

</div>

Hello,  
I had the same problem, and finally, I resolved it.  
When Secure Boot is enabled, it only allows signed (trusted) drivers to load. NVIDIA drivers are not signed by default, which is why they fail to load. To fix this, you can sign the NVIDIA kernel modules yourself so that Secure Boot recognizes them.  
You can set Secure Boot to off, but disabling it could lead to keyboard and mouse issues, potentially caused by a kernel panic or driver conflict.  
So, the best way to Fix NVIDIA drivers is to enable a secure boot.  
Follow these steps:

- Step 1: Install Required Tools  
`sudo apt-get install mokutil openssl`

- Step 2: Generate Signing Keys  
`openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Your Name/"`

- Step 3: Enroll the Key in MOK  
`sudo mokutil --import MOK.der`  
You will be prompted to create a password. Use this password to enroll the key in the BIOS/UEFI system.

- Step 4: Reboot and Enroll Key in BIOS/UEFI  
Reboot the system, enter the MOK management screen when prompted, and use the password to complete the enrollment of the key.

- Step 5: Sign NVIDIA Kernel Modules  
`sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.priv MOK.der $(modinfo -n nvidia)`

- Step 6: Reboot Again and Verify  
`nvidia-smi`

After reboot, verify that the NVIDIA drivers are now properly loaded.  
hope it helps

---

<div class="post-metadata">

**Author:** ![MarkusHoHo](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/markushoho/32/233145_2.png) [@MarkusHoHo](https://forums.developer.nvidia.com/u/MarkusHoHo)\
**Post date:** [October 21, 2024, 12:54pm UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/3 "2024-10-21T12:54:52Z")

</div>

Hi @mohammad.vazirpanah1, welcome to the NVIDIA developer forums.

Thank you for the detailed write-up!

Two additions:

- NVIDIA drivers do include a check for secure boot during installation and prompt the user, if they want to sign the driver. This will initiate the MOK signing procedure, including generating the signing key and enrollment. Sadly though most users ignore or overlook this part.
- Signing keys can differ from Distribution to distribution, so users are advised to familiarize themselves with that process for their particular platform before doing this step manually.

Thanks!

---

<div class="post-metadata">

**Author:** ![jamesrburgess](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jamesrburgess](https://forums.developer.nvidia.com/u/jamesrburgess)\
**Post date:** [November 10, 2024, 5:40am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/4 "2024-11-10T05:40:29Z")

</div>

hi, where in the installation process described here for RHEL9 [1. Introduction — NVIDIA Driver Installation Guide r560 documentation](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/) did I overlook this?

I was definitely not prompted. Was there some precondition I did not meet? Is this not the install process you are referring to? I tried this on AlmaLinux 9. Did the rpm script see that and decide not to bother about signing because it wasn’t rhel or rocky? The driver (565.57) installed and works fine otherwise with those instructions

- James

ps  
there is a bug in nvidia-driver-assistant that crashes out with a python stack trace on any unsupported distribution because there is a typo where it refers to distro\_id rather than id in the unsupported distro error message code.

---

<div class="post-metadata">

**Author:** ![daniel.jeffree](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@daniel.jeffree](https://forums.developer.nvidia.com/u/daniel.jeffree)\
**Post date:** [March 18, 2025, 9:14am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/5 "2025-03-18T09:14:46Z")

</div>

> [@MarkusHoHo](#):
>
> NVIDIA drivers do include a check for secure boot during installation and prompt the user

Unfortunately they do not. At least 570.124.04 and the others I have tried do not.

---

<div class="post-metadata">

**Author:** ![furkanzdm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/furkanzdm/32/337612_2.png) [@furkanzdm](https://forums.developer.nvidia.com/u/furkanzdm)\
**Post date:** [March 26, 2025, 5:24pm UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/6 "2025-03-26T17:24:38Z")

</div>

While you install your drivers through APT on Ubuntu and its flavors, you’ll see something like below when its about to build modules;

> Sign command: /path/to/kmodsign  
> Signing key: /path/to/key/MOK.priv  
> Public certificate (MOK): /path/to/key/MOK.der

Just copy that public certificate path and paste after `sudo mkutil --import`  
Should look something like `sudo mkutil --import /path/to/key/MOK.der`

Nvidia drivers already created keys for you, you just need to enroll them.

After the command above, reboot and enroll the key in BIOS and reboot. Check drivers by `nvidia-smi`

If you still cannot see that your drivers are loaded, input below:

> sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ‘/path/to/key/MOK.priv’ ‘/path/to/key/MOK.der’ $(modinfo -n nvidia)

Now your drivers should be loaded in Secure Boot. Check by `nvidia-smi`

---

<div class="post-metadata">

**Author:** ![moksh.mridul](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@moksh.mridul](https://forums.developer.nvidia.com/u/moksh.mridul)\
**Post date:** [April 25, 2025, 6:18pm UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/9 "2025-04-25T18:18:56Z")

</div>

Is there a way to enable MOK signing procedure with Nvidia created keys / x509 when using -q and -s switches ?

---

<div class="post-metadata">

**Author:** ![nalivaikoron](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nalivaikoron](https://forums.developer.nvidia.com/u/nalivaikoron)\
**Post date:** [April 26, 2025, 9:08am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/10 "2025-04-26T09:08:14Z")

</div>

Hello, I am having similar issues, I tried installing the driver but I cannot get it to work, no matter what I do I have a laptop with a NVIDIA1050 GTX Mobile and an Intel CPU pls help  
[nvidia-bug-report.log](https://forums.developer.nvidia.com/uploads/short-url/n1gBbiUepMczvyC6LZJ0VZEVZqL.log) (666.8 KB)

---

<div class="post-metadata">

**Author:** ![rjrees](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/rjrees/32/414075_2.png) [@rjrees](https://forums.developer.nvidia.com/u/rjrees)\
**Post date:** [May 7, 2025, 2:44pm UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/11 "2025-05-07T14:44:34Z")

</div>

I am having the same issue, followed the steps but if I do a modprobe nvidia, i get this :-  
sudo modprobe nvidia  
modprobe: ERROR: could not insert ‘nvidia’: Invalid argument

Additionally I was not prompted about installing for secure boot, but I followed the install from the repository steps.

---

<div class="post-metadata">

**Author:** ![rjrees](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/rjrees/32/414075_2.png) [@rjrees](https://forums.developer.nvidia.com/u/rjrees)\
**Post date:** [May 8, 2025, 8:55am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/12 "2025-05-08T08:55:51Z")

</div>

Could it be, because the certificate is created with a password the kernel module has no way to enter or save the password ?

---

<div class="post-metadata">

**Author:** ![laurence.socalmedia](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@laurence.socalmedia](https://forums.developer.nvidia.com/u/laurence.socalmedia)\
**Post date:** [November 9, 2025, 2:20am UTC](https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351/13 "2025-11-09T02:20:38Z")

</div>

At main.c:290:

- SSL error:05800074:x509 certificate routines::key values mismatch: ../crypto/x509/x509\_cmp.c:408
- SSL error:17000088:CMS routines::private key does not match certificate: ../crypto/cms/cms\_sd.c:316  
kmodsign: CMS\_add1\_signer: No such file or directory  
At main.c:290:
- SSL error:05800074:x509 certificate routines::key values mismatch: ../crypto/x509/x509\_cmp.c:408
- SSL error:17000088:CMS routines::private key does not match certificate: ../crypto/cms/cms\_sd.c:316  
kmodsign: CMS\_add1\_signer: No such file or directory  
At main.c:290:
- SSL error:05800074:x509 certificate routines::key values mismatch: ../crypto/x509/x509\_cmp.c:408
- SSL error:17000088:CMS routines::private key does not match certificate: ../crypto/cms/cms\_sd.c:316  
kmodsign: CMS\_add1\_signer: No such file or directory  
At main.c:290:
- SSL error:05800074:x509 certificate routines::key values mismatch: ../crypto/x509/x509\_cmp.c:408
- SSL error:17000088:CMS routines::private key does not match certificate: ../crypto/cms/cms\_sd.c:316  
kmodsign: CMS\_add1\_signer: No such file or directory  
At main.c:290:
- SSL error:05800074:x509 certificate routines::key values mismatch: ../crypto/x509/x509\_cmp.c:408
- SSL error:17000088:CMS routines::private key does not match certificate: ../crypto/cms/cms\_sd.c:316  
kmodsign: CMS\_add1\_signer: No such file or directory

kmodsign does not exist… so why should it be able to sign when that code doesnt exist?

Is that just an update error or is that intended?
