Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having problems with my Xserver sometimes failing to start. It doesn't happen consistently, but when it happens, instead of showing the login screen I get some vague one-line error message about some service failing to start (can't remember exactly what it says now, and it's not copy-pasteable...) the following error message:

** (plymouthd:313): WARNING **: Command line `dbus-launch --autolaunch=56a6ab7418a994dcd756ff100000002 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

For those of you too lazy to scroll: the line ends with Autolaunch error: X11 initialization failed.

The only way to get anything done is to Ctrl+Alt+Fx to one of they TTY terminals, which after login proceeds to tell me (once or more twice) that I Failed to connect to X Server, and refer to /var/log/Xorg.0.log for details.

When this happened just now, grep /var/log/Xorg.0.log -e EE gave me this:

    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     3.936] Initializing built-in extension MIT-SCREEN-SAVER
[     3.998] (EE) intel(0): [drm] Failed to open DRM device for pci:0000:00:02.0: No such file or directory
[     3.998] (EE) intel(0): Failed to become DRM master.
[     3.998] (EE) Screen(s) found, but none have a usable configuration.
[     3.998] (EE) 
[     3.998] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     3.998] (EE)

I login, and reboot. Usually one reboot is enough to get it working, but sometimes it takes two or three.

I beleive this is caused by some service not terminating properly when Ubuntu quits on system shut down, and - since I have had other problems with it as well - I wouldn't be surprised if it's related to my graphics cards (I have a laptop with an NVidia G550M and an Intel integrated card), but I have no idea where to go from here.

How do I figure out exactly what caused the problem? Is it likely to be a bug somewhere, or is it due to an error of mine?

As suggested in the linked-to bug report I tried restarting lightdm from the TTY terminal, and that got me a login working login screen. The bug report talks about this behavior being caused by a race condition at startup, so that not all required devices are available when lightdm starts (see e.g. comments #23 and #48). Most of them involve changing /etc/init/lightdm.conf in some way as to either prevent the race condition by stalling (e.g. sleep 2), or respawn if the first attempt crashes (and hope the second attempt is delayed enough to succeed). Is a workaround like that "update safe", or will it be overwritten when lightdm is updated? Is there a better way to work around (or even fix) this?

share|improve this question

This seems to be a problem with lightdm that starts before video device show up.

Please see for workaround.

One of the workarounds, which works best for me, is to put



stop on runlevel [016]

This will force lightdm to restart until it works correctly.

Workarounds described in this bug report modifies /etc/init/lightdm.conf, so I would suggest to override this file during update of lightdm package just to be sure that it works with rest of lightdm correctly. If the bug is still not fixed in updated version, you should reapply the fix.

Debian's/Ubuntu's dpkg tools should keep original and modified versions of configuration files during update.

share|improve this answer
Thanks for the link! Interesting read. Please see my updated question for some follow-up. – Tomas Lycken Apr 22 '13 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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