Ubuntu freezes with 2 RTX 3090 gpus

I have freshly installed Ubuntu on my machine. As soon as I switch to Nvidia graphics, ubuntu does not boot up. I have tried multiple versions of ubuntu and graphics drivers.
Motherboard: ASUS Rog Maximus XIII HERO
GPU: 2x RTX 3090 Founders Edition with SLI bridge