NVIDIA driver 340.017 gives black screen after login on Ubuntu 19.10

I have also opened a ticket here: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1854954

I installed Ubuntu from USB with “install third party graphics” enabled and auto login turned off. When the computer restarted, I get the Gnome login screen but after login its just a black screen. Once I get the black screen, the computer is unusable (cannot even open another TTY) and I have to hard reboot the system. However when I get to the login screen I can open TTY2 and then if I sudo apt remove nvidia* then I can restart and use Nouveau drivers.

I have tried disabling Wayland but if I reinstall the drivers at any point using sudo ubuntu-drivers autoinstall then I have the same issue again

The output of sudo lspci | grep "VGA" is:

01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 310] (rev a2)

I am running vanilla GNOME on Xorg. I have also attached the result of nvidia-bug-report.sh to this post.
nvidia-bug-report.log (1 MB)

It’s just freezing with

Dec 06 09:00:46 pc kernel: NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context

Rather unspecific, might even be a faulty gpu. Please check if you can work around it by using lightdm instead of gdm.

WOW! thank you so much, I installed lightdm and it works. I have spent so many hours trying to solve this problem and found nothing on the internet. :)

I was about to buy an entire new GPU just to solve the problem and I reinstalled Ubuntu over 5 times