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

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 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

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 (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.