Xserver does not start or freezes with systemd + lightdm

Bug #1434396 reported by LGB [Gábor Lénárt] on 2015-03-20
72
This bug affects 13 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Critical
Unassigned
Nominated for Vivid by Alberto Salvia Novella

Bug Description

After upgrading to (32bit) vivid I hadn't got any problem, but since a day (daily upgraded) booting results in a dialog saying low graphics mode and a dialog window about this. Choosing running in default mode causes to boot splash to be shown forever. if I choose exit to console, log in then service stop then start for lightdm, it works then though. Maybe is not Xserver bug, but the new init system (systemd) race condition of starting things, or such?

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: xserver-xorg 1:7.7+7ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic i686
.tmp.unity.support.test.0:

ApportVersion: 2.16.2-0ubuntu3
Architecture: i386
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Fri Mar 20 07:35:37 2015
DistUpgraded: 2014-10-24 18:45:04,038 DEBUG enabling apt cron job
DistroCodename: vivid
DistroVariant: ubuntu
DkmsStatus: virtualbox, 4.3.26, 3.19.0-9-generic, i686: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:21dd]
InstallationDate: Installed on 2012-03-03 (1111 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
MachineType: LENOVO 5016NW6
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-9-generic root=UUID=8df578aa-47e3-483f-b694-bf7effd24b7d ro i915.semaphores=0 quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: Upgraded to vivid on 2014-10-24 (146 days ago)
dmi.bios.date: 11/04/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 8GET38WW (1.15 )
dmi.board.name: 5016NW6
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8GET38WW(1.15):bd11/04/2011:svnLENOVO:pn5016NW6:pvrThinkPadL520:rvnLENOVO:rn5016NW6:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 5016NW6
dmi.product.version: ThinkPad L520
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.12.1+15.04.20150303-0ubuntu1
version.libdrm2: libdrm2 2.4.59-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.5.0-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.5.0-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.17.1-0ubuntu3
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.5.0-1ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917-1~exp1ubuntu2build1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2build1
xserver.bootTime: Fri Mar 20 07:25:51 2015
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 9196
 vendor AUO
xserver.version: 2:1.17.1-0ubuntu3

LGB [Gábor Lénárt] (lgb) wrote :
LGB [Gábor Lénárt] (lgb) wrote :

By the way I am not sure if it's related: on booting backlight of the LCD (of the notebook) is always set to minimal during the boot at one moment, barely visible (but surely I can use the keyboard Fn + corresponding key to increase to a readable level). It was also the situation with the previous ubuntu version ... Also I am using an external monitor through the VGA connector connected, till logging in, the login is presented on the notbook's own LCD (with that dimmed backlight ...) the external monitor has no signal at all till the login screen appears after that only an ubuntu logo is shown in front of my background picture. After logging in, the configured situation works, ie the internal LCD of the notebook goes off, and I can use the external monitor. In case of shutting the system down, the notebook's internal LCD turns on with that very dimmed backlight till the machine powers off completely. However this behaviour was more or less the same, now my current problem that X doesn't seem to start at all, which was not the case before.

summary: - Xserver does not start, on boot (low-graphics mode)
+ Xserver does not start on boot (low-graphics mode)

The dialog box saying low graphics mode allows me to exit to console, if I do that, I can see on console 7 (ALT+F7):

[FAILED] Failed to start Light Display Manager.
See "systemctl status lightdm.service" for details.
[DEPEND] Dependency failed for Graphical Interface.

Entering the suggested command:

 lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: failed (Result: resources) since Sun 2015-03-22 11:57:36 CET; 4min 44s ago
     Docs: man:lightdm(1)
  Process: 982 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
  Process: 978 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
 Main PID: 982 (code=exited, status=1/FAILURE)

Mar 22 11:57:35 antares systemd[1]: Unit lightdm.service entered failed state.
Mar 22 11:57:35 antares systemd[1]: lightdm.service failed.
Mar 22 11:57:36 antares systemd[1]: lightdm.service holdoff time over, scheduling restart.
Mar 22 11:57:36 antares systemd[1]: lightdm.service failed to schedule restart job: Transaction is destructive.
Mar 22 11:57:36 antares systemd[1]: Unit lightdm.service entered failed state.
Mar 22 11:57:36 antares systemd[1]: lightdm.service failed.

issuing command "service lightdm start" starts lightdm though, and I can login and work.

affects: xorg (Ubuntu) → lightdm (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
LGB [Gábor Lénárt] (lgb) wrote :

And it seems after I can login the crash report dialog brings me to bug 1340964 then. What is interesting for me: why is there a problem Xorg does not start, when it does if I try it then.

Changed in lightdm (Ubuntu):
importance: Undecided → Critical
Changed in lightdm:
status: New → Confirmed
Changed in lightdm (Ubuntu):
status: Confirmed → Triaged
LGB [Gábor Lénárt] (lgb) wrote :

Hmm, reading the duplicates, it seems it's a Lenovo notebook + systemd + lightdm combined problem, and does not occur too much if all of the three conditions do not meet? For me, it's true, all of them, and I have the problem at least ...

LGB [Gábor Lénárt] (lgb) wrote :

Now it turns out even more bizarre, I can no longer use my notebook with systemd. After having that low-graphics dialog, only exit to console helped (eg stopping/starting lightdm service by "hand") but now exit to console cause a freeze that the computer does not react to keyboard anymore (not even num lock led etc). Though sysreq "magic" key combos seem to work. The only option now is to choose upstart from grub. Then system boots without any problem (not even need to exit console etc) as it should be. Again apport wanted to report Xorg crash after a reboot with upstart, but again, bug 1340964 is referenced. It seems nothing bad happens with upstart, only systemd though.

asala (asala) wrote :

Well this happens to me (20% of times) on a 15.04 64 bit Vmware player virtual machine, with "Gallium 0.4 on SVGA3D" graphics driver. Powering off the VM (equivalent to pulling the plug in a physical one) and booting up again seems to solve the problem... until it repeats. [Not yet dist-upgraded to today's version]. So it is not a "Lenovo notebook" only issue.

asala (asala) wrote :
Download full text (6.9 KiB)

I'm an ignorant on this, but, well... maybe somebody gets some info from this:

Syslog things:

Mar 26 22:54:21 UbuntuPruebasVirtual kernel: [ 5.247495] audit: type=1400 audit(1427406860.403:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session" pid=595 comm="apparmor_parser"

Mar 26 22:54:22 UbuntuPruebasVirtual lightdm[952]: Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions?
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: lightdm.service: main process exited, code=exited, status=1/FAILURE
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Unit lightdm.service entered failed state.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: lightdm.service failed.
Mar 26 22:54:22 UbuntuPruebasVirtual colord[940]: (colord:940): Cd-WARNING **: failed to get session [pid 840]: Error desconocido -2
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: lightdm.service holdoff time over, scheduling restart.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Cgroup management proxy.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down....
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Starting Light Display Manager...
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Read required files in advance.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down..
Mar 26 22:54:22 UbuntuPruebasVirtual lightdm[1040]: Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions?
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: lightdm.service: main process exited, code=exited, status=1/FAILURE
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Failed to start Light Display Manager.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Dependency failed for Graphical Interface.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Job graphical.target/start failed with result 'dependency'.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Triggering OnFailure= dependencies of graphical.target.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Unit lightdm.service entered failed state.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: lightdm.service failed.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Stop ureadahead data collection 45s after completed startup.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Starting Terminate Plymouth Boot Screen...
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Cgroup management proxy.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down....
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down..
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Received SIGRTMIN+21 from PID 251 (plymouthd).
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Wait for Plymouth Boot Screen to Quit.
Mar 26 22:54:22 UbuntuPruebasVirtual systemd[1]: Started Terminate Plymout...

Read more...

professordes (d-a-johnston-hw) wrote :

I can confirm that it is now a "hard freeze" with systemd+lightdm when you exit to console after getting kicked into low graphics mode on startup with several Lenovo Thinkpads (X201, X300, X240).

Workarounds on affected machines:

- upstart + lightdm
- systemd + gdm

LGB [Gábor Lénárt] (lgb) wrote :

@asala But does using upstart (or systemd, but with gdm instead of lightdm) fixes it for you? Then it can be said, at least lightdm+systemd issue ... However reading duplicates, and comments here, at least it seems, Lenovo Thinkpads are highly affected for some reason, even if not "only" ...

professordes (d-a-johnston-hw) wrote :

Just to confirm, the following combinations still boot OK on Thinkpads affected by this bug (X201, X300, X240...)

systemd + gdm

upstart + lightdm

The following (default) is still NOT working as of today's updates:

systemd + lightdm

It boots to low graphics splash, but dropping to console login from this freezes system.

Oddly two other Thinkpads,, X230 and T440s, are still booting fine with the default systemd + lightdm

LGB [Gábor Lénárt] (lgb) wrote :

ThinkPad L520: exactly the same as professordes wrote: systemd + lightdm does not work, dropping to console login freezes (interestingly it "worked" some days ago when I managed to use service lightdm stop/start to "cure" the problem at least so systemd could be used with some extra work though, not the system is simply not usable with systemd).

TomaszS (tomek-8) wrote :

I have this problem on ThinkPad T440p too.

LGB [Gábor Lénárt] (lgb) wrote :

Today I tried again and now it seems system boots normally, I can log in, with lightdm+systemd. I guess some of the updates solved the problem, but it would be useful to hear that it's not only me ...

professordes (d-a-johnston-hw) wrote :

This (systemd+lightdm) is still broken for me on a Thinkpad X240 after the latest updates.

The laptop now boots to the lightdm login screen but it is "frozen" at this point - the cursor disappears and I have to power cycle it as ctrl-alt-whatever has no effect, I can't access a virtual console or initiate a reboot.

On the other hand:

upstart+lightdm
systemd+gdm

are still both working OK.

professordes (d-a-johnston-hw) wrote :

Same deal with a Thinkpad X201 - this also now boots to the lightdm login screen after the latest updates but it "freezes" at this point. The cursor disappears when it is moved and the only thing that resurrects the laptop after this is the power button.

Again:

upstart+lightdm
systemd+gdm

are both working OK on this laptop too.

LGB [Gábor Lénárt] (lgb) wrote :

Ok, I was too fast ... Tried again: now, X server starts and logic screen is shown (though with the default background not the one based on the last user logged in) but keyboard does not usable and no mouse cursor either. Still, choosing upstart seems to work!

professordes (d-a-johnston-hw) wrote :

With an update today (9 April) that included lightdm, starting up with systemd+lightdm is working again for me on an X240 Thinkpad (and presumably the other problematic Thinkpads, though I haven't had a chance yet to check).

LGB [Gábor Lénárt] (lgb) wrote :

For me, it's kinda odd. It seem to work (and worked even some day ago), then trying again (boot again) and it does not work again then ... Recently it seems to be quite unpredictable. But it can be a reason that sometimes I attach external monitor via the VGA D-SUB connector, but sometimes I don't. I'll check both cases out soon.

professordes (d-a-johnston-hw) wrote :

Interesting - another Thinkpad X240 _wasn't_ fixed by today's update, but when I checked the configuration it also had sddm installed (thought it wasn't using it as the default login display manager). Removing sddm, which still allows the kubuntu desktop package to remain, gives a functioning systemd+lightdm.

LGB [Gábor Lénárt] (lgb) wrote :

It seems though it can be guessed more or less what can cause problems (ie thinkpad + lightdm + systemd) the exact details are not the same, and some other conditions can/do count as well. Also the "not always" factor sometimes, kinda odd.

However, as bug 1340964 if often referenced for me, and it is about some kind of VT activation problem, can it be because some race condition on using VTs or such? Since systemd may do deeper parallelism on the boot process than upstart (I am not sure just guessing) or at least it did it not the very same way, it can explain why it works with upstart but not with systemd.

But really, I am just guessing, and trying to give hints, as release data for vivid is coming and this bug still exists rendering ubuntu totally unusable for normal users on some hardware like some thinkpad notebooks which are not so rare, I think.

LGB [Gábor Lénárt] (lgb) wrote :

This bug seems to be still valid, but its behaviour is somewhat different at least for me. When I first noticed this, X did not start at all, and it dropped to the screen to allow to choose for low graphics mode, exit to console, etc. Now, X starts however it freezes in a way that no keyboard can be used (ie to type my password to be able to log in). I use the system with upstart to work the problem around, but of course it would be better to forget those workarounds ...

summary: - Xserver does not start on boot (low-graphics mode)
+ Xserver does not start on freezes with systemd + lightdm
summary: - Xserver does not start on freezes with systemd + lightdm
+ Xserver does not start or freezes with systemd + lightdm
LGB [Gábor Lénárt] (lgb) wrote :

Meanwhile, I've upgraded to 15.10. Now the system _mostly_ works, but let's say about every 5th boot the system freezes with black screen if systemd is used. Upstart always work. Interestingly in most cases systemd works as well, but not always. I cannot find any reason about this always changing behaviour if I try to boot multiple times.

peter swain (swine) wrote :

I saw similar issue when adding a 2nd screen to my 15.10 systemd + lightdm system, which had been happy with single screen.
Also happy when systemd not used, even with 2 displays

Booted OK, but on resume from suspend (usually after going to lock screen) things were completely hung with per-second repeats of
Dec 1 01:13:00 grunt kernel: [ 591.465083] nouveau E[compiz[5704]] fail ttm_va
lidate
Dec 1 01:13:00 grunt kernel: [ 591.465092] nouveau E[compiz[5704]] validating bo list
Dec 1 01:13:00 grunt kernel: [ 591.465118] nouveau E[compiz[5704]] validate: -12
...

Nouveau is kernel driver, but the issue seemed to come from compiz paging.
Yet compiz behavior is directed by its clients.

When I noticed 'service lightdm status' had warnings about libpam_kwallet5, I looked at how that was used.
Found I had no pam-kwallet5, because I don't use kde/plasma.
I did have kwallet4, which gnome depends on.
So what was bitching about kwallet5???

Still not sure where the missing dpkg dependency on pam-kwallet5 should go,
but it's definately needed -- I added pam-kwallet5 over ssh session and the hung displays
immediately came back to life.

Lightdm's pam usage of kwallet5 is allegedly always optional, as in
/etc/pam.d/lightdm-greeter:132:auth optional pam_kwallet5.so
/etc/pam.d/lightdm-greeter:543:session optional pam_kwallet5.so auto_start
/etc/pam.d/lightdm:223:auth optional pam_kwallet5.so
/etc/pam.d/lightdm:675:session optional pam_kwallet5.so auto_start
But some defect makes it mandatory in a multi-display systemd setup.

Perhaps it's a sequential overspecification in restore logic revealed by multi-display and system event handling.
Don't yet understand, but adding the allegedly optional pam-kwallet5 fixed it

no longer affects: lightdm
affects: lightdm (Ubuntu) → xorg-server (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers