Facing Login Loop in Ubuntu 20.04 Focal Fossa

All of sudden started facing Login Loop. I tried upgrading packages via tty still no luck.

Tried startx via tty3 and it's success but too irresponsive.

Tried chown .xauthority file with username. Still no luck.

How to fix this login loop issue?

Operating System: Ubuntu 20.04 Focal Fossa


I had this problem and tried all the things you did. The culprit turned out to be a very long environment variable. My LS_COLORS env var was over 9000 characters long as is was generated from a dircolors database. As soon as I removed it I could log in again. In /var/log/syslog I was getting a segfault in libpcre.so.3.13.3. That env var must have been causing gdm to crash.