No HDMI output on Ubuntu 22.10 and NVidia HDMI

Using an HP Notebook and the latest nvidia driver (515) I have no output over HDMI, because the driver is not loaded.

lspci -v says that there is an unknown header type

01:00.0 VGA compatible controller: NVIDIA Corporation GA107GLM [RTX A2000 Mobile] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Hewlett-Packard Company GA107GLM [RTX A2000 Mobile]
	!!! Unknown header type 7f
	Memory at 6d000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 6000000000 (64-bit, prefetchable) [size=4G]
	Memory at 6100000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 3000 [size=128]
	Expansion ROM at 6e080000 [disabled] [size=512K]
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation Device 2291 (rev a1)
	Subsystem: Hewlett-Packard Company Device 886d
	!!! Unknown header type 7f
	Memory at 6e000000 (32-bit, non-prefetchable) [size=16K]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

nvidia-bug-report.log.gz (92.0 KB)

For anyone with the same problem I figured it out. Problem was that after an upgrade from 22.04 to Ubuntu 22.10 the nvidia drivers were not signed anymore (because secure boot was enabled). I didn’t want to remove secure boot but what helped was

sudo apt remove --purge *nvidia*
sudo ubuntu-drivers autoinstall
sudo apt install nvidia-dkms-515
sudo dpkg-reconfigure nvidia-dkms-515

that seems to have done the trick