Score:0

Infinite login loop (having tried dozens of solutions)

mx flag
Tom

Running Ubuntu 20.04; 2x Geforce GTX 1080 Ti installed. This is the second time I ever encounter the infinite login loop problem; can't remember how I solved it last time, as it was years ago. I installed TensorFlow (pip install tensorflow), then following a power outage I couldn't login. I'm guessing the tensorflow installation messed up my nvidia drivers (last version installed: libnvidia-cfg1-460) or something else. What I've tried so far from tty3: $ sudo nano /etc/default/grub change line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" or GRUB_CMDLINE_LINUX_DEFAULT="quiet" or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off" or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pnpacpi=off"

Followed by sudo update-grub

Obviously none of these worked. Then, I've tried purging all CUDA and Nvidia drivers, and attempted to reinstall Nvidia: sudo apt-get remove --purge '^nvidia-.*' sudo apt-get --purge remove cuda* sudo apt --fix-broken install

Then tried to reinstall from here: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local but got: failed: Network is unreachable (though ping to google works fine)

Of course, still doesn't work. Then, I tried in tty3: chown username:username .Xauthority but no such file or directory!! Uninstalled lightdm, then installed gdm3: sudo apt-get install gdm3 sudo dpkg-reconfigure gdm3 still, no luck. Tried again to find .Xauthority from: https://docs.citrix.com/en-us/linux-virtual-delivery-agent/7-15-ltsr/configuration/configure-xauthority.html ps aux | grep -i xorg got the output: 1323 0.1 0.1 279612 67544 tty1 Sl+ 08:32 0:00 /usr/lib/xorg/Xorg vt1 -displayfd -auth /run/user/121/gdm3/Xauthority
(*unforutnately, my screen doesn't show all the output when I'm in tty3, so I'm not absolutely sure about the part between gdm3/ and hority, where the line breaks and I miss several letters on the screen) so, I try to access /run/user/121/gdm3/ to get .Xauthority: cd /run/user :No such file or directory

Try step by step: cd /run

That works. Now:

Edited steps inserted here:

cd user sudo su was needed to enter 121: cd 121 dir

tells me there's only Xauthority, not .Xauthority. So I tried: chown user:user Xauthority

Still not working. This looks to me like a lost cause, but of course, all and any input would be greatly appreciated.

Terrance avatar
id flag
Is `cd /user` a typo? If you are already in `/run` the next part would just be `cd user` without the `/` as that would mean that the `user` folder would be right off the root `/` and not in `/run`.
mx flag
Tom
Good catch! I managed to enter /run/user, but am then unable to access 121: cd: 121: permission denied so I tried sudo cd 121 cd: command not found
mook765 avatar
cn flag
`cd` is a shell-builtin and not a command, `sudo` only works with commands. Do `sudo su` and then `cd 121`.
mx flag
Tom
Thank you, was now able to enter folder and run chown user:user Xauthority (not .Xauthority, which doesn't exist). Will report whether this works.
cc flag
Try a search of this site for login loop. The .Xauithority with the wrong permissions is usually in your home directory. I don't know what you are trying to do with the gdm's copy of Xauthority either. You should have your own copy under /run/user/1000... Did you try moving all the "dot" files (like .local, .cache, .config, ...) into a directory for temporary storage? If that fixes the login, move them back out one at a time to identify the one that's bad (or just leave them if everything run OK, they'll regenerate).
mx flag
Tom
I don't have any other Xauthority files on my computer, as seen from the ps aux | grep -i xorg (if I understand it correctly), and definitely not under /run/user/1000
Organic Marble avatar
us flag
After you did the edits to `/etc/default/grub` did you run `sudo update-grub`?
mx flag
Tom
Organic Marble: Yes, I forgot to mention and will now edit to add that. ubfan1: I have no files beginning with a dot under /run/user/1000. All that's there is dbus-1 dconf gnupg gvfs inaccessible pk-debconf-socket pulse snapd-session-agent.socket systemd
mx flag
Tom
I'm giving up. What's the common practice in this community? Should I delete the question, or leave it for posterity to witness?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.