Linux Freezes at Login: Causes and Fixes
Switch the session type at the login screen first — often the whole fix. If not, a virtual console restarts the display manager without touching any files, and the deeper graphics-driver angle for when it keeps happening.
You turn on the computer, Linux boots normally, it reaches the screen where you type your username and password... and right after you confirm, the screen freezes, with or without a black background. First things first: this is different from the computer not booting at all — if you never even reach the login screen, the problem is something else. This is specifically about freezing right after logging in.
Try this first: no command needed
On the same screen where you type your password, look for a small icon (usually a gear ⚙) near the login button or next to your username. Clicking it shows a list of "session types" — usually something like "Cinnamon", "Cinnamon (software)", or similar depending on your desktop.
Tip: choose the option that says "(software)" or "Xorg" instead of the one marked by default, and log in again. The most common cause of a session freezing right at login is a problem with the graphics card and how it draws to the screen — the "software" option skips that conflicting step, at the cost of being a bit less smooth. If this gets you in without trouble, you have confirmed the source: it is graphics-related, not something serious in the system.
If this fixes the problem, you can keep using that session option normally while you calmly investigate the underlying graphics issue, or simply stay with it if it works fine for you.
If switching the session fixes nothing
We need to get in without going through the graphical screen that freezes. That is what virtual consoles are for: independent text screens that always work, even if everything graphical is failing.
Enter a virtual console
Press Ctrl + Alt + F3 (or F2, F4 — varies by distro).
Log in with your username and password
This does work here, even though you see no desktop.
Restart the graphical session manager
A single command, without losing your files.
Return to the graphical screen
Ctrl + Alt + F1 (or F2) and try logging in again.
Note: a virtual console is a text screen independent of your normal desktop — it is nothing advanced or dangerous, it is a feature Linux has always included precisely for cases like this. You will not "break" anything by using it.
Once inside the text console (step 2), the command to restart the graphical session varies by distribution:
sudo systemctl restart gdm3
# or, if your distro uses lightdm instead of gdm:
sudo systemctl restart lightdm
Warning: this command closes any graphical session that was open — if you had unsaved work in a program that had frozen, it will be lost. There is no way to avoid this at this point, because the session was already locked up anyway.
If the problem persists after this
It usually points to a damaged or badly updated graphics driver. Before considering a reinstall, check whether the problem started right after a system update — if so, updating again (a fix is sometimes already available) is usually enough, rather than manually undoing anything.
Important: in the vast majority of cases, your personal files are not affected by this problem at all — it lives in the graphical part of the system, not in your documents. Reaching "I'm going to reinstall Linux from scratch" should be the last resort, not the first.
Frequently asked questions
Will I have to reinstall Linux from scratch?
In the vast majority of cases, no. This problem is usually related to the graphical part of the system (the graphics card driver or the session manager), not the whole installation. Reinstalling is the last resort, not the first.
Is this the same thing that sometimes happens to Windows when it freezes?
It is a different problem, even if it feels similar. Linux has virtual consoles, a text-based way in that keeps working even if the entire graphical part is locked up — Windows does not have such a direct equivalent, which is why the fixes do not resemble each other.
Can I get in another way without losing my files?
Yes. Both switching the session type from the login screen and using a virtual console are ways to get in without touching or losing any personal file — the problem is in the graphical part, not in your data.
Why does the 'software' session option fix the problem?
Because it avoids having the system use the graphics card to draw the desktop (the processor does it instead), which is precisely where this kind of freeze usually originates. It runs a bit less smoothly, but it confirms whether the source of the problem is graphics-related.