Ubuntu 18.04 stuck at boot with nvidia driver 510

After installing nvidia driver 510, ubuntu boot gets stuck on a black screen with just the cursor. Despite that, i can hear the ubuntu boot sound. I am currently using lightdm and is able to access the terminals tty1 -tty6.

Stuff i have tried:

  • gdm3 and lightdm as display manager
  • nouveau.modeset=0 and nomodeset in grub
  • tried with nvidia driver 470
  • prime-select intel / uninstalling nvidia works

I believe that ubuntu is actually booting but the display manager is not working for some reason. Any help would be greatly appreciated!