HowTo fix w/ CLI: LM18.3 login loop problem.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mdcongas

HowTo fix w/ CLI: LM18.3 login loop problem.

Post by mdcongas »

Hi there! I'm a fairly new user of Linux OS. I got a login loop problem with my LM18.3. :? I suppose the SSD is full but I'm not sure I know how to fix it from CLI. :?: Is there a command to uninstall some unnecessary apps or the extra files that it leads to the login loop? Thanks to y'all in advance!.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: HowTo fix w/ CLI: LM18.3 login loop problem.

Post by thx-1138 »

...Ctrl+Alt+F1 will get you to a tty. From there, log-in (text mode).
df -h will show you how much space is occupied & where.
apt clean will remove the previously downloaded packages from the cache, effectively making some room.
Then, run:
rm ~/.Xauthority && rm ~/.ICEauthority
Be extra careful with how you type any rm (or -delete) commands.

You could then Ctrl+Alt+F7 to get back in the graphical log-in screen.
Or probably more simple, just systemctl reboot, and hopefully it's fixed.

Occasionally, the logs might be growing huge as well due to some bug, occupying lots of space themselves.
sudo find /var/log/ -type f \( -name "*.gz" -o -name "*.[0-9]*" -o -name "*.old" \) -delete
This will further clear older logs - however this specific step is optional,
as it might be totally unnecessary in your case:
you can verify with df -h if some extra room was made after apt clean
mdcongas

Re: HowTo fix w/ CLI: LM18.3 login loop problem.

Post by mdcongas »

After rm ~/.Xauthority && rm ~/.ICEauthority
I get this: rm: cannot remove '/home/mdcongas/.Xauthority': No such file or directory
Thanks!
mdcongas

Re: HowTo fix w/ CLI: LM18.3 login loop problem.

Post by mdcongas »

I did it. :) Everything works fine! Thanks a lot! :D
mdcongas

Re: HowTo fix w/ CLI: LM18.3 login loop problem.

Post by mdcongas »

The laptop worked just fine until the next day I tried to log in.
I went thru the steps 1 & 2. Step 3 showed this:
After rm ~/.Xauthority && rm ~/.ICEauthority
I get this: rm: cannot remove '/home/mdcongas/.Xauthority': No such file or directory
Occasionally, the logs might be growing huge as well due to some bug, occupying lots of space themselves.
sudo find /var/log/ -type f \( -name "*.gz" -o -name "*.[0-9]*" -o -name "*.old" \) -delete
This will further clear older logs - however, this specific step is optional,...
This must be the general command...
-Here's what I get after typing the command above:

Code: Select all

find: paths must precede expression: (-name
Usage: find [-H] [-L] [-P] [0level] [-D help|tree|search||stat|rates|opt|exec|time] [path...] [expression]
I'm not familiar w/ all these commands. Sorry for the inconvenience. Thanks again for your help!
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: HowTo fix w/ CLI: LM18.3 login loop problem.

Post by thx-1138 »

...you need to always keep your partitions filled at around 90% or less - especially the root / partition.
I've actually seen the login loop happen at even less than that on some cases.

So that brings the question: after apt clean & being able to log-in graphically yesterday,
did you tried to make some further room for such? df -h or inxi -P will tell you such, eg:

Code: Select all

inxi -P
Partition: ID-1: / size: 908.54 GiB used: 157.62 GiB (17.3%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 7.86 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Now, if you indeed made some extra room by cleaning / backing up files elsewhere but the partition kept being filled up,
then the explanation is that something is misbehaving in the first place & filling up the logs themselves.
The command supplied above will happily clean them for someone to be able to troubleshoot further,
but it won't solve the actual reason that keeps them growing up.

ls -lah /var/log/ will list the log files & their filesize: they should normally be merely a few megabytes.
Eg. at this moment here, the summary reports: total 3,5M
If they are in the gigabyte size though, then something's fishy & needs to be further investigated.

dmesg | tail -100 will show the last 100 lines from the logs:
you can increase / decrease the numeric value according to your needs.
Usually, if logs grow huge, then someone looks for 'patterns' of repeated error / warning messages.
If you can log-in graphically, you can also use the gui-based Log File Viewer
(actual name might differ slightly depending on the desktop used,
but should be listed somewhere in the applications' menu)...
Locked

Return to “Installation & Boot”