Ubuntu – Ubuntu 18.04 booting in console mode even after reinstalling drivers

command linedriversdual-bootgdmnvidia

So basically I just did one thing (or one mistake I would say): apt-removing python2 and python3 since I wanted to reinstall it for other reasons.

During the process I think it may removed something "extra" and after rebooting I'm stuck with the Ubuntu console mode.

I've already tried (more than once) to completely uninstall nvidia-drivers and reinstall them with no success.

I see that they are there but I'm still in console mode. I've also checked grub options during booting and I don't see anything relevant apart from quit splash that should be harmless(to my knowledge).

Thank you in advance for your help.

UPDATE, here's the grep -E "remove|purge" /var/log/dpkg.log output:

PasteBin log

Best Answer

The output of sudo systemctl status gdm:

Unit gdm.service could not be found.

Suggests that gdm3 the graphical login manager is missing ( probably removed by mistake ).

Installing ubuntu-desktop like so:

sudo apt install ubuntu-desktop

or if it the above tells you ubuntu-desktop is already installed, try reinstalling it like so:

sudo apt install --reinstall ubuntu-desktop

Should solve this problem.


As to what caused this, the answer is in your grep -E "remove|purge" /var/log/dpkg.log output:

2020-04-10 19:24:11 remove ubuntu-desktop:amd64 1.417.4
2020-04-10 19:24:27 remove gdm3:amd64 3.28.3-0ubuntu18.04.4

ubuntu-desktop the Ubuntu desktop environment and gdm3 the graphical login manager which is part of ubuntu-desktop were removed along with many other packages.

The reason they were removed although you might have not removed them in particular is one of two reasons:

  • You tried to remove or install a package while you have not ran sudo apt update in a long time and you did not pay attention to APT prompting you to accept the removal of packages and you just typed yes and pressed Enter. Yes you don't only need update to install, but you also need it to correctly remove packages.

  • They were removed as a parts of another package you tried to remove and again you did not pay attention to APT prompting you to accept the removal of packages and you just typed yes and pressed Enter

Best of luck.