GDM3 does not start in Ubuntu 18.04
I recently upgraded my laptop from Ubuntu 17.04 to 18.04. It worked perfectly well and I have been using it without any problem, but yesterday I issued sudo apt upgrade
and it upgraded some packages.
Then I restarted the PC and it didn't boot up again. After displaying the Ubuntu logo I get a screen like below and after flashing several times it freezes.
Note that the message on the bottom line is changing for each restart. I am able to start a tty
session there log into my account.
normal boot messages usually covered by splash screen
To my knowledge, the problem is gdm3
(GNOME display manager) fails to start, since when I issue sudo systemctl restart gdm3
the screen flashes several times and again stays in tty session.
Can anyone suggest a solution to this without complete reinstallation of the system?
Solution 1:
I had a similar problem updating from 16.04 to 18.04.
The solution in my particular case was to deactivate Wayland modifying /etc/gdm3/custom.conf
uncommenting or enabling WaylandEnable=false
so the GNOME display manager will always load the GNOME desktop environment from gnome-desktop and not Wayland. This is because Wayland usually has errors with some graphics drivers.
This can be done easily from an Ubuntu live USB or if possible start in Recovery mode from the grub menu.
Solution 2:
I was a victim of this issue for some time with Ubuntu 18.04 on a Dell Latitude 5580 which uses nvidia. I think gdm is not fully compatible with this spec.
After trying many solutions, including reinstalling Ubuntu several times, I decided to shift to LightDM and that fixed the issue.
In the booting screen press Alt+F2 and execute these commands:
sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm
This worked for me. Good luck :)
Solution 3:
I found a solution based on this and it worked for me.
First:
sudo apt install ubuntu-gnome-desktop
And then:
sudo apt install gnome-shell gnome
Next restart the system or simply sudo systemctl restart gdm3
.
Solution 4:
I've got a similar issue after trying to setup remote desktop to ubuntu 18.04. Following steps resolved my issue:
sudo apt purge gdm3
sudo reboot
sudo apt install gdm3
sudo service gdm start
Solution 5:
I had a similar issue. This error in syslog finally lead me to my solution:
(EE) systemd-logind: failed to get session: PID 10023 does not belong to any known session
As a result of that error, gdm-x-session fails further along in the gdm3 start up process and aborts:
/usr/lib/gdm3/gdm-x-session[2849]: dbus-daemon[3479]: [session uid=136 pid=3479] Activating service name='org.freedesktop.systemd1' requested by ':1.0' (uid=136 pid=2849 comm="/usr/lib/gdm3/gdm-x-session gnome-session --autost" label="unconfined")
/usr/lib/gdm3/gdm-x-session[2849]: dbus-daemon[3479]: [session uid=136 pid=3479] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
gdm-x-session: could not fetch environment: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
gdm3: GdmManager: trying to register new display
gdm3: GdmManager: Error while retrieving session id for sender: Error getting session id from systemd: No data available
gdm-x-session: Could not register display: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: No display available
The gdm3 service just keeps trying to start gdm-x-session over and over again, flooding syslog. I fixed it by adding this line to /etc/pam.d/gdm-launch-environment:
session optional pam_systemd.so
My theory on the real problem is that pam-auth-update is run during some package installs and it would have added pam_systemd to /etc/pam.d/common-session. However, I had done manual edits to at least one /etc/pam.d/common-* file, in which case pam-auth-update aborts if "--force" is not specified.