24.04 desktop GUI stopped working

I have Ubuntu 24.04.2 LTS and disk encryption.
When the machine is started, first the disk encryption password has to be entered.
After that a black screen is shown.
With CTRL+ALT+F3 a (debian?) terminal comes up where I need to login on ubuntu (same as when the desktop interface was still working).
Finally I enter startx so the desktop interface comes up.

sudo apt install --reinstall ubuntu-desktop^ caused some 1232 get’s and installed the ‘ubuntu desktop’ (gnome).

Restarting the machine did not solve the issue.
Still the black screen appears, login in terminal and startx to get the desktop interface.

Some applications take long to startup or don’t start at all.

Hello @username-not-too-lon, and welcome to Ubuntu Discourse!

Unfortunately, you did what’s called “Topic Hijacking” and “Necrobumping” where you posted on a two-month-old topic for a similar problem. We don’t do that here.

Instead, what needed to happen was starting a brand-new topic after going through the necessary reading to get the permission to do so (you should have received a PM with those instructions).

With that in mind, I moved your post to an entirely new topic.

Again, Welcome! :slight_smile:

1 Like

I did just that, apologies
and thanx for moving post to new topic :+1:

I’ll offer something you have not said you tried:

sudo apt purge gdm3

sudo apt install gdm3

Thanx, but that did not solve the issue.

gdm3* ubuntu-desktop* ubuntu-desktop-minimal*
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    ...
    Removing ubuntu-desktop (1.539.2) ...
    Removing ubuntu-desktop-minimal (1.539.2) ...
    Removing gdm3 (46.2-1ubuntu1~24.04.1) ...
    Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
    Processing triggers for man-db (2.12.0-4build2) ...
    ...
    Purging configuration files for gdm3 (46.2-1ubuntu1~24.04.1) ...
    info: Removing crontab ...
    info: Removing user `gdm' ...
    userdel: user gdm is currently used by process 2209
    fatal: `/usr/sbin/userdel gdm' returned error code 8. Exiting.
    Could not remove gdm user.
    info: Removing group `gdm' ...
    groupdel: cannot remove the primary group of user 'gdm'
    fatal: `/sbin/groupdel gdm' returned error code 8. Exiting.
    Could not remove gdm group.

and

sudo apt install gdm3
    ...
    Suggested packages:
     libpam-pkcs11
    The following NEW packages will be installed:
      gdm3
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gdm3 amd64 46.2-1ubuntu1~24.04.1 [335 kB]
    Selecting previously unselected package gdm3.
    ...
    Setting up gdm3 (46.2-1ubuntu1~24.04.1) ...
    Creating config file /etc/gdm3/greeter.dconf-defaults with new version
    update-alternatives: using /etc/pam.d/gdm-smartcard-sssd-exclusive to provide /etc/pam.d/gdm-smartcard (gdm-smartcard) in auto mode
    gdm.service is not active, cannot reload.
    invoke-rc.d: initscript gdm3, action "reload" failed.
    Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
    Processing triggers for man-db (2.12.0-4build2) ...

After the first restart, CTRL+ALT+F3 did not seem to work, no terminal came up.
With ALT+SysRq+R,E,I,S,U,B the machine was restarted. Again CTRL+ALT+F3 did not work. But after pressing SysRq the terminal came up and so with startx the desktop was started.

I’ll try this (once more) now:

sudo apt install gnome-shell

Is this a Clean install or a upgrade to 24.04?

Ubuntu is 24.04.2 LTS
And I just ran the command

sudo apt install gdm3