Im not familiar with dealing with secure boot problems, but the primary/secondary monitor problem you are describing is a common problem. You should plug in your primary monitor alone initially, then after booting, add your second monitor, and properly create display settings, that load when you reboot, (either through display settings or nvidia-settings) so your primary and secondary monitor are configured as such in your settings. I haven’t done it in awhile, but it is common to have issues with dual monitors, even after attempting to make proper settings for them.
oh I went to town on this problem recently so I thought I’d document my solution here. same manifestation:
sudo modprobe --verbose nvidia
insmod /lib/modules/6.14.0-24-generic/updates/dkms/nvidia.ko.zst NVreg_TemporaryFilePath=/var/tmp NVreg_EnableS0ixPowerManagement=1 NVreg_PreserveVideoMemoryAllocations=1
modprobe: ERROR: could not insert 'nvidia': Key was rejected by service
also manifested by this output:
sudo dkms status nvidia
nvidia/570.172.08, 6.11.0-29-generic, x86_64: installed
nvidia/570.172.08, 6.14.0-24-generic, x86_64: installed (Differences between built and installed modules)
which shows that the signing is incorrect for the latest kernel.
eventually tracked it down to:
my use of secure boot
recently switching to open driver/kernels due to 3090->5090 upgrade
the nvidia generated /var/lib/shim-signed/mok/MOK.der was never added to my secure boot key list
I guess the latter could be an installation issue on the nvidia-dkms-nnn-open package
this key can be added manually using the following incantation: