This happened to me after a reboot following a kernel version bump. I was using gdm3 as my display manager. I fixed it by switching to a tty login, installing lightdm, configuring it as my display manager, rebooting, logging in, setting gdm3 as the DM and rebooting again.
Ctrl-Alt-F3 (login as normal)
- sudo apt install lightdm
sudo dpkg-reconfigure lightdm (choose lightdm in dialog)
- reboot
- login to GUI using
lightdm to ensure it works
sudo dpkg-reconfigure gdm3 (choose gdm3in dialog)
- reboot
- Success!
I do not know if installing lightdm was necessary or if just reconfiguring gdm3 would have done the trick, but at least it would have given me a usable system. After reconfiguring gdm3 logins started working again.
This fix doesn't rise to much more than mystic incantations as I have no idea what went wrong. Correlation isn't causation, but in addition to a broken display manager, something pretty comprehensively borked my Python3 installation at the same time, to the extent of having to nuke and reinstall.