I randomly found myself in a situation where I was able to boot up into Ubuntu but there was no way to log in. I could see my mouse. After doing some research, here is what I ended up doing to solve the problem.

  • Get to the terminal by pressing Ctrl+Alt+F3

  • Log in to the machine with your terminal

  • Install GNOME

sudo apt install gnome
  • Install the lightdm display manager
sudo apt install lightdm
  • Reboot the machine

No login in Ubuntu 24.04