display-manager.service fails, boot hangs, no login screen

This is random, but appears to happen a little more often past few days. So far, the only solution I have used is Ctrl-Alt-Del to force shutdown/reboot and hope the next run-up succeeds.

Usually, this forced reboot is only required once, though sometimes it can take 2 or 3 tries, then all works as it should and the Login Greeter shows up.

Scanning through the boot logs, I find this output for the time it fails, when it does. These same lines are the only lines I do not see in a successfull boot:

Aug 29 16:54:34 MyHostName.MyDomain systemd[1]: display-manager.service: Main process exited, code=exited, status=1/FAILURE
Aug 29 16:54:34 *MyHostName.MyDomain* display-manager[1631]: ..done
Aug 29 16:54:34 *MyHostName.MyDomain* systemd[1]: display-manager.service: Unit entered failed state.
Aug 29 16:54:34 *MyHostName.MyDomain* systemd[1]: display-manager.service: Failed with result 'exit-code'.

My next step, the next time it happens, will be to switch to a console on one of the other ttys, login, and try:

su systemctl start display-manager

to see what happens. Or, alternately, log into the console as root and just try:

systemctl start display-manager

Today I tried logging into the console as root and issued:

startx

but that immediately logged me into the GUI desktop as root without further asking for the root password. NOT Good!

Quickly logged right back out, as we know the risks associated with logging into the GUI as root!

This just put me back to the console, where I logged out of root. No more time to play, then, so ran no further tests.

I would like to know if anyone else is experiencing this issue. As I said, it is a random act, and so far since installing 42.2 in May, I have only had it happen now and then.

Otherwise, almost everything else is running flawlessly.

For now, I want to gather a little more information, if I can, and confirmation from any other users, before filing a bug report.

Display Manager is lightdm

Desktop is Xfce

When the display-manager.service fails any useful error messages logged?

sudo journalctl -e -u lightdm

Or following a successful boot, examine the previous boot for lightdm messages perhaps…

sudo journalctl -b1 |grep lightdm

Sorry, for previous boot that should have been…

sudo journalctl -b -1 |grep lightdm

Thanks, deano.

However, I used

journalctl -S "2017-08-28 14:35" |grep lightdm

since I know the exact times of the failed and successfull boots.

As I mentioned in the first post, the output I showed above is the only output that differs between a successfull invocation of the greeter and no greeter showing up.

I could find no other differences in various journalctl options, so had I output the full boot output of the journal up the the point of success or failure, then manually scanned each line looking for clues – now, that is a tedious task, I tell ya :silly: – and could find nothing else in the failed boot that does not also appear in a successfull login.

There is an error, of sorts (does not come up with the ERROR option, btw), as you will see in the output below, but it shows up in the successfull bootup and login records, as well, so I doubt it is the answer.

However, since we should always show what the person offering to help asked (how is that for a subtle hint to others seeking help?;)), here is the output I get for lightdm, 5 boots, 3 of which were successfull, 2 which weren’t.

SUCCESSFULL BOOT:

Aug 30 13:10:29 MyHostName.MyDomain display-manager[1316]: Starting service lightdm..done
Aug 30 13:10:29 MyHostName.MyDomain display-manager[1316]: (lightdm:1521): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 30 13:10:30 MyHostName.MyDomain lightdm[1615]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Aug 30 13:10:30 MyHostName.MyDomain systemd[1]: Created slice User Slice of lightdm.
Aug 30 13:10:30 MyHostName.MyDomain systemd[1]: Started Session 1 of user lightdm.
Aug 30 13:10:30 MyHostName.MyDomain systemd-logind[813]: New session 1 of user lightdm.
Aug 30 13:10:30 MyHostName.MyDomain systemd[1626]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
Aug 30 13:10:36 MyHostName.MyDomain lightdm[1615]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 30 13:10:36 MyHostName.MyDomain lightdm[1640]: pam_unix(lightdm:session): session opened for user gerry by (uid=0)
Aug 30 13:10:36 MyHostName.MyDomain display-manager[1316]: (lightdm:1521): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 30 13:10:36 MyHostName.MyDomain systemd[1629]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 30 13:10:36 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

**SUCCESSFULL BOOT:
**

Aug 30 18:15:51 MyHostName.MyDomain display-manager[1083]: Starting service lightdm..done
Aug 30 18:15:52 MyHostName.MyDomain display-manager[1083]: (lightdm:1512): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 30 18:15:52 MyHostName.MyDomain lightdm[1616]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Aug 30 18:15:52 MyHostName.MyDomain systemd[1]: Created slice User Slice of lightdm.
Aug 30 18:15:52 MyHostName.MyDomain systemd[1]: Started Session 1 of user lightdm.
Aug 30 18:15:52 MyHostName.MyDomain systemd-logind[817]: New session 1 of user lightdm.
Aug 30 18:15:52 MyHostName.MyDomain systemd[1627]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
Aug 30 18:16:01 MyHostName.MyDomain lightdm[1616]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 30 18:16:01 MyHostName.MyDomain display-manager[1083]: (lightdm:1512): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 30 18:16:01 MyHostName.MyDomain lightdm[1642]: pam_unix(lightdm:session): session opened for user gerry by (uid=0)
Aug 30 18:16:01 MyHostName.MyDomain systemd[1630]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 30 18:16:01 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

FAILED BOOT:

Aug 28 14:35:56 MyHostName.MyDomain display-manager[983]: Starting service lightdm..done
Aug 28 14:35:57 MyHostName.MyDomain display-manager[983]: (lightdm:1467): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 28 14:35:57 MyHostName.MyDomain lightdm[1529]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Aug 28 14:35:57 MyHostName.MyDomain systemd[1]: Created slice User Slice of lightdm.
Aug 28 14:35:57 MyHostName.MyDomain systemd-logind[746]: New session 1 of user lightdm.
Aug 28 14:35:57 MyHostName.MyDomain systemd[1]: Started Session 1 of user lightdm.
Aug 28 14:35:57 MyHostName.MyDomain systemd[1587]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
Aug 28 14:35:57 MyHostName.MyDomain lightdm[1529]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 28 14:35:58 MyHostName.MyDomain systemd[1590]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 28 14:35:58 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

FAILED BOOT (2nd in a row):

Aug 28 14:37:50 MyHostName.MyDomain display-manager[1044]: Starting service lightdm..done
Aug 28 14:37:50 MyHostName.MyDomain display-manager[1044]: (lightdm:1482): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 28 14:37:51 MyHostName.MyDomain lightdm[1541]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Created slice User Slice of lightdm.
Aug 28 14:37:51 MyHostName.MyDomain systemd-logind[761]: New session 1 of user lightdm.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Started Session 1 of user lightdm.
Aug 28 14:37:51 MyHostName.MyDomain lightdm[1541]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 28 14:37:51 MyHostName.MyDomain systemd[1602]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

**SUCCESSFULL BOOT after LATTER FAILED BOOT:
**

Aug 28 14:40:16 MyHostName.MyDomain display-manager[1106]: Starting service lightdm..done
Aug 28 14:40:17 MyHostName.MyDomain display-manager[1106]: (lightdm:1446): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 28 14:40:17 MyHostName.MyDomain lightdm[1497]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Aug 28 14:40:17 MyHostName.MyDomain systemd[1]: Created slice User Slice of lightdm.
Aug 28 14:40:17 MyHostName.MyDomain systemd-logind[764]: New session 1 of user lightdm.
Aug 28 14:40:17 MyHostName.MyDomain systemd[1]: Started Session 1 of user lightdm.
Aug 28 14:40:17 MyHostName.MyDomain systemd[1558]: pam_unix(systemd-user:session): session opened for user lightdm by (uid=0)
Aug 28 14:40:25 MyHostName.MyDomain lightdm[1497]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 28 14:40:25 MyHostName.MyDomain systemd[1561]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 28 14:40:25 MyHostName.MyDomain display-manager[1106]: (lightdm:1446): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 28 14:40:25 MyHostName.MyDomain lightdm[1572]: pam_unix(lightdm:session): session opened for user gerry by (uid=0)
Aug 28 14:40:25 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

Once consistent observation: I note that when it succeeds a user session is opened eg

 pam_unix(lightdm:session): session opened for user gerry by (uid=0)

but when it fails there is no such session opened. It might be worth examining the pam_unix authentication output a bit more.

… well, yes. The User session is opened because I get a login screen, the greeter, so I can successfully log in. That just shows my successfull login.

This does not show when the greeter does not show, because I therefore cannot login to the GUI. Since I do not log in, the session does not attempt to open.

When it fails, I could get the same (rather, very similar) line by switching to another tty and log into the CLI.

So, no, that is not a clue. But, thanks.

BTW: That line is the one I use to determine where it fails or succeeds in the journal.

These are the last lines before success or failure:

Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Startup finished in 27ms.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Started User Manager for UID 479.
Aug 28 14:37:51 MyHostName.MyDomain lightdm[1541]: pam_unix(lightdm-greeter:session): session closed for user lightdm
Aug 28 14:37:51 MyHostName.MyDomain systemd-logind[761]: Removed session 1.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Stopping User Manager for UID 479...
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Stopped target Default.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Stopped target Basic System.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Stopped target Paths.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Stopped target Timers.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Stopped target Sockets.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Reached target Shutdown.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Starting Exit the Session...
Aug 28 14:37:51 MyHostName.MyDomain systemd[1599]: Received SIGRTMIN+24 from PID 1609 (kill).
Aug 28 14:37:51 MyHostName.MyDomain systemd[1602]: pam_unix(systemd-user:session): session closed for user lightdm
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Stopped User Manager for UID 479.
Aug 28 14:37:51 MyHostName.MyDomain systemd[1]: Removed slice User Slice of lightdm.

When it fails (ie: no greeter comes up and the system just sits waiting), the next four lines will be:

Aug 28 14:37:52 MyHostName.MyDomain systemd[1]: display-manager.service: Main process exited, code=exited, status=1/FAILURE
Aug 28 14:37:52 MyHostName.MyDomain display-manager[1616]: ..done
Aug 28 14:37:52 MyHostName.MyDomain systemd[1]: display-manager.service: Unit entered failed state.
Aug 28 14:37:52 MyHostName.MyDomain systemd[1]: display-manager.service: Failed with result 'exit-code'.

When it succeeds, the greeter comes up, and I enter my login credentials, the next lines will instead be:

Aug 30 18:16:01 MyHostName.MyDomain systemd[1627]: Reached target Shutdown.
Aug 30 18:16:01 MyHostName.MyDomain display-manager[1083]: (lightdm:1512): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Aug 30 18:16:01 MyHostName.MyDomain lightdm[1642]: pam_unix(lightdm:session): session opened for user gerry by (uid=0)

… and AFAICS these are the only differences.

PS: Note that CRITICAL message is not always in the same position, and the movement of it does not appear to be related to whether there is a Greeter or No Greeter and Sit with empty black screen (with just a couple of the last boot output lines showing, no errors).

FWIW, similar intermittent behaviour discussed in this Ubuntu bug report. Race condition of some sort?

BTW: For additional clarity, I can easily switch terminals with the F keys, all other terminals are sitting at a CLI login prompt. Logging in just gets me into the CLI. startx fails as user (of course), and as root goes directly into the GUI…

Also, the reason the fail logs are 08/28 is because it has not happened during boots the last couple days. As I said, it is quite random.

Hmmm. Thanks for the link, will look into it.

Yep, got that :wink:

Happened again today.

As I suspected

systemctl start display-manager

brought the login greeter up instantly and I was good to go.

To do that, when the system stalled, Alt-F1 (or F2, duh, forgot to pay attention to details! So, cannot say which, but whichever … ) took me to a CLI login prompt. I logged in as my user, then

su -

to root, where I issued the command:

systemctl start display-manager

and the greeter popped up instantly. I then used the Ctrl-Alt-Fn key combo to get back to the CLI where I logged out root, then logged my user out of the CLI.

I then used Ctrl-Alt-F7 to flip back to the GUI greeter and logged in with no further problems.

This is not a big problem to me, and in fact is really not even high on my criteria for “minor problems”.

My main reason for this thread is to find out if others are experiencing it, which then would qualify it as a bug that I should then pursue.

As for myself, 42.2 boots in blazing speed (by my criteria, anyway) on this 10-yr-old Asus laptop, and so a simple Ctrl-Alt-Del is good enough for me. The problem rarely happens twice in a row, and it only happens once every few days or so, so unless it provides help to the openSUSE community, I really am not motivated to spend time exploring it further.

Not until some others report the same issue.

I will be looking deeper into this, as it is happening on two different machines, one with 42.2 and the other with 42.3, so even though I see no mention of it in the Forums, yet, I am somewhat confident it must be affecting someone else.

Still not a problem for me, but since it might exist outside of my own systems, I must try to analyze it for other users.

In the meantime, I am testing it as a display manager issue. I have switched both systems – running Xfce as a desktop – from LightDM to KDM as display manager.

So far, the problem seems to have disappeared, along with a couple other minor related symptoms (to be mentioned in a later post).

But, it is too soon to tell, for certain, will wait a few days and a few boot-ups to see if the problem is gone or not. Such is the pain of an intermittent, random symptom …

When I get that far, I will report back, then start digging.