1

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

Raffa
  • 32,237
  • python3 is essential, the system can't work without it. removing it is fatal to the system. Please try sudo dpkg --configure -a && sudo apt update --fix-missing -y && sudo apt install -f -y && sudo apt full-upgrade -y and see if it restores it. – Raffa Apr 10 '20 at 18:53
  • I tryed, still nothing... – browser-bug Apr 10 '20 at 19:03
  • Did it fix and update or you got errors? Were you connected to Internet? Please describe the output – Raffa Apr 10 '20 at 19:05
  • It correctly upgraded everything with no errors but rebooting still gets me in console mode. – browser-bug Apr 10 '20 at 19:05
  • Please run sudo apt purge nvidia-* then run sudo ubuntu-drivers autoinstall then reboot – Raffa Apr 10 '20 at 19:08
  • As I said I've already tryed that. Tryed again but with no success. Running 'prime-select query' displays that nvidia card is being used. – browser-bug Apr 10 '20 at 19:17
  • what is the output of sudo systemctl status gdm – Raffa Apr 10 '20 at 19:21
  • Unit gdm.service could not be found. I'll also add that console is telling me after booting that "/usr/share/..../virtualenvwrapper_lazy.sh" no such file or directory. – browser-bug Apr 10 '20 at 19:23
  • 1
    try sudo apt install ubuntu-desktop – Raffa Apr 10 '20 at 19:28
  • This worked!!!! I wonder now what actually went wrong :\ – browser-bug Apr 10 '20 at 19:41
  • 1
    Well done : ) Please [edit] your question and add the output of grep -E "remove|purge" /var/log/dpkg.log to investigate what went wrong. – Raffa Apr 10 '20 at 19:58
  • Will do ASAP. Thanks anyway! How can I add your comment as an answer? – browser-bug Apr 10 '20 at 20:22
  • Answer added. Please update your question to list the output of sudo systemctl status gdm so that it helps people diagnose the problem. I will also update my answer later when you add the output of grep -E "remove|purge" /var/log/dpkg.log to indicate the cause. – Raffa Apr 10 '20 at 20:34
  • Sorry I'm late. I added a paste link with the full output. Thanks again. – browser-bug Apr 10 '20 at 23:19

1 Answers1

0

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.

Raffa
  • 32,237