Black screen after install of nvidia driver ubuntu but monitor still visible in settings menu

I am trying to install nvidia-driver-510 but once i do and reboot, my monitor that is connected to the nvidia gpu stays black (it displays grub and other loading information but as soon as it gets to the actual session it goes black). This only happened yesterday after a normal restart (maybe it updated to the latest driver and it has an issue?)

I have 1 monitor plugged in to the motherboard so that it uses the intel iGPU (cpu is i9-12900k)
I also have 1 monitor plugged in directly to my nvidia gpu (GEforce RTX 3080 Ti)

the monitor works fine with nouveau driver so it definitely is a driver issue. On the monitor plugged into the igpu I can open settings and see that the other monitor is still there so it is recognised, but it stays black.

Full specs:
1 monitor plugged into MB (with HDMI cable)
1 monitor plugged into GPU (with HDMI cable)
Geforce RTX 3080 ti
ASUS z690 MB

Here is some more info about the system:
$ uname -a
Linux nanyo-pc 5.17.1-051701-generic #202203280950 SMP PREEMPT Mon Mar 28 09:59:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy

The full Xorg config obtained using the command:
find /etc/X11 /etc/X11/xorg.conf.d /usr/share/X11/xorg.conf.d -name “*.conf” -print -exec cat ‘{}’ ; >allconfig.txt
allconfig.txt (7.1 KB)

The command
$sudo journalctl -b0 |grep “gdm-x-session” >gdm.log
returns a gdm.log file of 0 bytes

Finally running the script as root return:
nvidia-bug-report.log (2.9 MB)

I ran into a similar issue with my system after upgrading to 5.17. It had to do with simplefb being enable while having nvidia-drm.modeset=1 in my boot loader. I removed the nvidia-drm.modeset from the boot loader and got to the desktop like normal. HTH