39

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?

3
  • 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, 2018 at 11:35
  • @RapazP how you launch X by hand?? Jun 29, 2018 at 16:53
  • with the command "startx"
    – RapazP
    Jul 3, 2018 at 16:56

9 Answers 9

40

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.

6
  • 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, 2019 at 16:54
  • Thanks! That fixed the same issue for me. But, what is "Wayland", and how did it get activated?
    – MikeB
    Jun 15, 2019 at 13:34
  • 2
    Why would you use tee rather than using nano?
    – Miral
    Jun 25, 2019 at 1:44
  • also in /etc/gdm3/custom.conf, could uncomment Enable=true to turn on debugging with more verbose logs, and... Additionally lets the X server dump core if it crashes
    – noobninja
    Jan 3, 2020 at 5:29
  • I had to do the opposite and set "WaylandEnable=true" and select "Ubuntu on Wayland" to make it work. Jun 3, 2020 at 20:29
28

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

4
  • 1
    Same for me with Dell Precision 5510
    – pauljohn32
    Nov 19, 2018 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, 2019 at 16:05
  • still the same in 20.04. though lightdm works, it can now no more use the lock screen feature...I would prefer to use gdm3, as it seems better integrated with default ubuntu/gnome...?
    – benzkji
    Apr 27, 2020 at 9:10
  • 1
    Helped me - originally faced this on Sager NP6852. I can confirm this solution still works on Ubuntu 20.04 LTS.
    – Alex
    May 18, 2021 at 21:41
19

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.

7
  • 6
    I tried this but does not solved the problem. I reinstalled ubuntu...
    – cwhisperer
    Jul 6, 2018 at 8:51
  • 1
    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, 2019 at 21:52
  • 1
    The first command is now sudo apt install gnome Jan 30, 2020 at 0:00
  • 1
    This saved me too. 30s instead of a total reinstall.
    – Neil G
    Feb 3, 2020 at 6:18
  • I accidentally removed GTK+3.0 .. simply removed Gnome packages!! :) , I had to reinstall by sudo apt install ubuntu-gnome-desktop Feb 3, 2021 at 19:42
18

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
2
  • 1
    tried it on my Ubntu1804 virtual box instance and woked...
    – mati kepa
    Feb 3, 2020 at 14:54
  • 2
    Worked for me on Zorin 15.2. I was having issues with gdm3 before, but apparently they were due to a wrecked installation.
    – Ramon Melo
    Aug 23, 2020 at 18:36
2

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
  • so how to use SliM display manager ?
    – Siwei
    Mar 13, 2022 at 2:21
2

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.

1
  • 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, 2019 at 19:21
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

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 have the same issue on 18.04.

  • Either keep moving the mouse around to bring it out of sleep mode
  • or killall -9 -u gdm

Forcing gdm to restart is a quick solution

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .