17

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 enter image description here 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?

  • I've the same problem after the last update. for now, until a new patch, I just stop the gdm service and launch X by hand : sudo service gdm stop; startx; – RapazP Jun 29 '18 at 11:35
  • @RapazP how you launch X by hand?? – Vajira Prabuddhaka Jun 29 '18 at 16:53
  • with the command "startx" – RapazP Jul 3 '18 at 16:56
25

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.

  • If you're trying to do this in TTY, sudo tee /etc/gdm3/custom.conf and then type [daemon] hit enter and WaylandEnable=false and hit enter again but backup the file first as it will remove all other text. – Shayan Jun 11 at 16:54
  • Thanks! That fixed the same issue for me. But, what is "Wayland", and how did it get activated? – MikeB Jun 15 at 13:34
  • Why would you use tee rather than using nano? – Miral Jun 25 at 1:44
6

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 :)

  • Same for me with Dell Precision 5510 – pauljohn32 Nov 19 '18 at 16:22
  • 1
    Same for me on a latitude as well. I have found that gdm hasnt actually frozen, but rather thinks that another screen is attached. When I started up after this happened with secondary screen actually attached, I got my graphics back. After some troubleshooting, I did switch to LightDM and that sorted everything out – matv1 Apr 14 at 16:05
1

I found a solution based on this and it worked for me.

First:

sudo apt install ubuntu-gnome-desktop

And then:

sudo gnome-shell gnome

Next restart the system or simply sudo systemctl restart gdm3.

  • 3
    I tried this but does not solved the problem. I reinstalled ubuntu... – cwhisperer Jul 6 '18 at 8:51
  • Finally, an answer that actually worked. I tried so many different things, restarting, reinstalling lightdm, gdm3, wayland etc. but to no avail. Thank you! – Shayan Jun 11 at 21:52
1

I had the same issues with gdm3, it simply would not start after installing ubuntu-desktop.

Kandy's solution above worked for me, with a couple of small adjustments:

Alt+F2 to get to a prompt as the boot cycle is ending (it looks like your desktop display is about to start)

sudo apt update
sudo apt upgrade
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
sudo apt install lightdm

At the end of the lightdm install it popped up a screen to give me the choice of using either lightdm or gdm3, I picked lightdm. Some places I saw mentioned that you needed to run sudo dpkg-reconfigure lightdm, but this only took me back to the popup screen to let me choose which display manager to use.

When I rebooted I got a message that no display manager was selected (which I ignored) and everything seems to be OK now, the "normal" desktop display appeared and everything seems to work fine. I haven't rebooted again yet, I am curious to see if I continue to get the message about no display manager selected. I will just continue to ignore tho until I have some spare time to research.

1

My HP laptop uses Intel graphics, no nVidia drivers installed, but I had identical problems described above by others. Disabling Wayland, or installing and switching to LightDM didn't work.

But -- SLiM display manager finally allowed me to bootup normally (after rebooting maybe 50+ times!!!) This is the most troublesome bug I've encountered since Feisty Fa

1

Same issue here. I just have removed gdm (which was installed near gdm3 after updated my system from 16.04 to 18.04)

sudo apt purge gdm 

Remember that you can login without X environment on Linux system : Just press Ctrl+Alt+F2 (or any other Fn except F1 or F7) to access a login console.

0

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.

  • I checked what "pam-auth-update --force" did (it backs up the old versions), and ended up accepting all its changes so that I will hopefully never have this problem going forward. Because it added pam_systemd to common-session I have now removed the line I added to gdm-launch-environment and gdm3 still works (even with Wayland). – Integrator Feb 23 at 19:21

protected by Community Sep 2 at 15:27

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.