How to Fix Ubuntu Freezing After Login Due to Graphics Driver Issues

Mar 1, 2025 by Zacharia Mansouri | 555 views

Ubuntu Linux

https://cylab.be/blog/398/how-to-fix-ubuntu-freezing-after-login-due-to-graphics-driver-issues

If your Ubuntu system freezes right after login, the problem is often related to missing or misconfigured graphics drivers. This issue can arise after installing or removing software that modifies system dependencies, including display-related packages. In this post, we’ll go over common causes and a step-by-step method to resolve the issue.

dot-glitched-ubuntu.png

Symptoms

Two main symptoms should warn you:

  • system booting to the login screen but freezing after entering credentials;
  • unability to access the graphical user interface (GUI), but the terminal (TTY) works (Ctrl + Alt + F2 to switch to a terminal session).

Possible Causes

Multiple causes might be responsible for the issue:

  • accidental removal of xserver-xorg: this is the core X server package responsible for rendering the graphical interface;
  • misconfigured or missing graphics drivers: some applications may remove or replace essential graphics drivers;
  • conflicts between open-source and proprietary drivers: this usually happens with NVIDIA cards, but can also affect Intel/AMD setups.

Step-by-Step Fix

If you can access a terminal (TTY mode, using CTRL+ALT+F2 after entering Ubuntu login screen), follow these steps to restore your system:

1. Update Your System

sudo apt update && sudo apt upgrade -y

2. Reinstall xserver-xorg (if missing)

sudo apt install xserver-xorg

3. Reinstall Graphics Drivers

For Intel graphics:

sudo apt install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core

For NVIDIA users (if applicable):

sudo apt purge nvidia-*
sudo ubuntu-drivers autoinstall

4. Reconfigure X Server

sudo dpkg-reconfigure xserver-xorg

5. Reboot Your System

sudo reboot

Preventing This Issue in the Future

Be cautious when removing software, especially if it prompts the removal of critical system packages. For example, use apt autoremove carefully and verify what will be removed. If using proprietary drivers, ensure they are properly configured using Ubuntu’s built-in ubuntu-drivers utility.

Conclusion

By following these steps, you should be able to restore your Ubuntu graphical interface and prevent similar issues in the future. If problems persist, checking system logs (journalctl -xe) can provide more insights.

This blog post is licensed under CC BY-SA 4.0