As described in this question, I am facing the login loop after installing nvidia-364 driver. Note that UEFI secure boot has been disabled before I tried any of this, so it's not a secure boot issue. I also tried setting the default display manager to
gdm3 instead of
lightdm, but then if I reboot, I get only a black screen and I cannot get the GUI login screen to appear at all unless I do ctrl-alt-F1, then reconfigure
lightdm to be the default, then reboot again.
I've repeatedly done the process of
sudo apt-get purge nvidia-*, then re-installing (and also tried installing nvidia-current, which also doesn't work) and rebooting, from a command prompt login, and it doesn't help. The GUI login still stays in the loop.
I also checked that I have correct permissions for .Xauthority, and even moved .Xauthority to a backup copy, and neither thing worked.
I'm close to my wit's end on this one. Any other idea for how to get the nvidia drivers working and avoid the login loop issue?
If I merely do
sudo apt-get purge nvidia-* and then reboot, the system goes back to normal and I can login (but, obviously, can't use my external display).