X server sometimes fails to start on MacBook Air 5,2: no screens found

Bug #1161371 reported by Adam Dingle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Invalid
Undecided
Unassigned
xserver-xorg-video-intel (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm running Ubuntu 13.04 (Raring) on a MacBook Air 5,2. The machine has an Intel HD Graphics 4000 (Ivybridge Mobile) graphics chip. I have xserver-xorg-core version 2:1.13.3-0ubuntu4.

On approximately every other boot, the X server fails to start and I'm left in an unusuable low-graphics mode. When this happens, the X log contains these error lines:

(EE) No devices detected.
...
Fatal server error:
... no screens found
---
ApportVersion: 2.9.2-0ubuntu5
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
DistUpgraded: Fresh install
DistroCodename: raring
DistroRelease: Ubuntu 13.04
DistroVariant: ubuntu
DkmsStatus: virtualbox, 4.2.8, 3.8.0-15-generic, x86_64: installed
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Apple Inc. Device [106b:00fe]
InstallationDate: Installed on 2013-03-22 (9 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64+mac (20130321)
MachineType: Apple Inc. MacBookAir5,2
MarkForUpload: True
Package: xserver-xorg-video-intel 2:2.21.5-0ubuntu1
PackageArchitecture: amd64
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-15-generic root=UUID=a4137b11-1807-4361-ad69-eaccead7f5e7 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.8.0-15.25-generic 3.8.4
Tags: raring ubuntu
Uname: Linux 3.8.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 11/27/2012
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBA51.88Z.00EF.B02.1211271028
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-2E6FAB96566FE58C
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookAir5,2
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-2E6FAB96566FE58C
dmi.modalias: dmi:bvnAppleInc.:bvrMBA51.88Z.00EF.B02.1211271028:bd11/27/2012:svnAppleInc.:pnMacBookAir5,2:pvr1.0:rvnAppleInc.:rnMac-2E6FAB96566FE58C:rvrMacBookAir5,2:cvnAppleInc.:ct10:cvrMac-2E6FAB96566FE58C:
dmi.product.name: MacBookAir5,2
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
version.compiz: compiz 1:0.9.9~daily13.03.29-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.43-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.0.3-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.0.3-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.13.3-0ubuntu4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu2b2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.1.0-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.21.5-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.7-0ubuntu1
xserver.bootTime: Sun Mar 31 18:47:38 2013
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.13.3-0ubuntu4
xserver.video_driver: intel

Adam Dingle (adam-yorba)
affects: xorg (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Joeri Eilander (fazioliamboina-deactivatedaccount) wrote :

why in hell did you bought an macbook...... :(

well, appl doesnt love other OS'ses so didnt support making drivers for it, youd better go with an chromebook.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

By the way, this is a regression from Quantal, where Ubuntu booted every time without a problem.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Incomplete
Revision history for this message
Adam Dingle (adam-yorba) wrote :

Why is this bug incomplete? Is there more information you'd like from me?

bugbot (bugbot)
tags: added: no-screens
Revision history for this message
Chris Wilson (ickle) wrote :

The complete Xorg.0.log and dmesg would be a start.

Revision history for this message
Adam Dingle (adam-yorba) wrote :
Revision history for this message
Adam Dingle (adam-yorba) wrote :
Revision history for this message
Adam Dingle (adam-yorba) wrote :

Here they are. If there's anything else I can provide, don't hesitate to ask.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

By the way, I have xserver-xorg-video-intel version 2:2.21.5-0ubuntu1.

Revision history for this message
Chris Wilson (ickle) wrote :

The problem is that Xorg hasn't registered the igfx as the boot-vga device and so is looking for a primary display and fails (it loads the -intel as a secondary GPU only screen).

What is the value in '/sys/devices/pci0000:00/0000:00:02.0/boot_vga' ?

You can manually specify:
Section "Device"
  Identifier "Device0"
  Driver "intel"
EndSection
in /etc/X11/xorg.conf.d/intel.conf to workaround the issue.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → New
Revision history for this message
Adam Dingle (adam-yorba) wrote :

Thanks for looking into this. /sys/devices/pci0000:00/0000:00:02.0/boot_vga is 1.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

could you try modifying /etc/init/lightdm.conf to match:

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and (stopped plymouth or started plymouth-splash)
           ...

that is, add 'and (stopped plymouth or started plymouth-splash)' there and see if it changes anything.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Timo,

I made that change, then booted 11 times. 4 of the 11 boots were successful. The other 7 times I was left looking at a blank screen or the Ubuntu logo. In those cases I was able to switch to virtual terminal 1 and log in in text mode. I never once ended up in low-graphics mode with the "no screens found" error in the X log, though I'm not entirely sure whether that was due to your change - this behavior is nondeterministic so it's hard to tell. By the way, I've sometimes seen boots end up with a blank screen like this even before your change.

I'll attach the X server log file as it appeared after one of these bad boots into a blank screen.

Revision history for this message
Adam Dingle (adam-yorba) wrote :
Revision history for this message
Chris Wilson (ickle) wrote :

Looks like unity failed to start in that case, but I think Maarten is right in that the original bug is a repeat of the plymouth race. Can you reproduce the blank screen, then run 'apport-collect 1161371' from the vt?

Revision history for this message
Adam Dingle (adam-yorba) wrote : BootDmesg.txt

apport information

tags: added: apport-collected raring ubuntu
description: updated
Revision history for this message
Adam Dingle (adam-yorba) wrote : BootLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Dependencies.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : DpkgLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : GconfCompiz.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Lspci.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : Lsusb.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : ProcModules.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : UdevDb.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : UdevLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : XorgLog.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : XorgLogOld.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : xserver.devices.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote : xserver.outputs.txt

apport information

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Done. In the blank screen state I also noticed that both X and plymouthd had crashed as evidenced by files in /var/crash. I'll attach those crash files too.

Revision history for this message
Adam Dingle (adam-yorba) wrote :
Revision history for this message
Chris Wilson (ickle) wrote :

Drat. I was hoping apport would grab the unity logs as well. In that set, unity exits abnormally at the 27s mark (noted by the server regen in Xorg.0.log and the dmesg.txt) but since X is still intact but with nothing to display, it ends up black.

So far all bugs are pointing away from -intel....

Revision history for this message
Adam Dingle (adam-yorba) wrote :

I'm happy to repro this again and grab the unity log if you like - just let me know.

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

[ 7.012094] init: gdm main process (1254) killed by TERM signal

Same bug as the lightdm race, but with gdm instead?

Looking at upstart files, it looks like plymouth-stop is running in parallel with gdm, causing the race you see above..

The dependencies in plymouth-stop:

start on (starting gdm
          or starting kdm
          or starting xdm
          or starting lxdm
          or starting lightdm
          or starting uxlaunch
          or starting ubiquity
          or starting oem-config
          or stopped rc RUNLEVEL=[2345]
          or starting rcS
          or starting mountall-shell)

makes me suspect that all those *dm are possibly affected.

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

/etc/init/gdm.conf would also need to have the 'started plymouth-splash' line..

Revision history for this message
Adam Dingle (adam-yorba) wrote :

I wasn't even aware that I had gdm installed on my system! Ah, I see - it's a dependency of gnome-shell, which I installed experimentally.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

I just added the 'started plymouth-splash' line to /etc/init/gdm.conf, then tried rebooting. Unfortunately it still took me three tries to get a successful boot. On the first attempt I was left looking at a screen with boot text including

Starting LightDM Display Manager
Starting Recovery options if display manager fails to start
...
Stopping Recovery options if display manager fails to start

On the second attempt virtual terminal 7 showed a garbaged display with an X cursor. The third attempt was successful. After the successful boot, I saw that /var/crash contained a new X server crash log, and /var/log contained a recent X server log including the no devices found/no screens found error.

To be clear, I currently have patched versions of /etc/init/lightdm.conf and /etc/init/gdm.conf which include the 'started plymouth-splash' line. Those are the only files I've changed. I have not created a workaround entry in xorg.conf.d as Chris suggested in comment #9.

Revision history for this message
Chris Wilson (ickle) wrote :

I think it is clear that there is a kernel error beyond that of the "plymouth" race. Can you please try testing with the latest drm-intel-nightly kernel from ppa:mainline?

Revision history for this message
Adam Dingle (adam-yorba) wrote :

OK - I installed linux-image-3.9.0-994-generic_3.9.0-994.201304060409_amd64 and rebooted. On my first boot I saw a blank screen on VT7, and when I switched to VT1 and logged in I saw that X and plymouthd had just crashed as evidenced by files in /var/crash. The X log, however, included no error (EE) lines such as 'no devices found' or 'no screens found'. The second boot was OK. Let me know if you'd me to repeat this state and collect any information in particular (e.g. apport-collect, /var/crash files, Unity logs).

Revision history for this message
Chris Wilson (ickle) wrote :

Yes, a crash is even more unexpected.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

I reinstalled Raring from a daily build in the hope that might fix things. It didn't: booting still usually, but not always, fails. To recap what I've said above, when I boot one of three things typically happens:

1. I'm left looking at a black screen with a mouse cursor on virtual terminal 7. No process has crashed.
2. The X server crashes, and the log file shows "no devices found"/"no screens found" errors.
3. The boot succeeds.

I compared the X server log in case 1 with the log after a successful boot and saw an interesting difference. In case 1, the log contains this:

[ 7.479] (II) intel(0): SNA initialized with no backend
[ 7.479] (==) intel(0): Backing store disabled
[ 7.479] (==) intel(0): Silken mouse enabled
[ 7.479] (II) intel(0): HW Cursor enabled
[ 7.479] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 7.479] (==) intel(0): DPMS enabled
[ 7.480] (WW) intel(0): Textured video not supported on this hardware

For a successful boot, the corresponding lines look like this:

[ 7.404] (II) intel(0): SNA initialized with IvyBridge backend
[ 7.404] (==) intel(0): Backing store disabled
[ 7.405] (==) intel(0): Silken mouse enabled
[ 7.405] (II) intel(0): HW Cursor enabled
[ 7.405] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 7.405] (==) intel(0): DPMS enabled

Revision history for this message
Chris Wilson (ickle) wrote :

Unknown hw! Can you please attach the full Xorg.0.log for the failing case 1?

Revision history for this message
Adam Dingle (adam-yorba) wrote :
Revision history for this message
Adam Dingle (adam-yorba) wrote :

There you go.

Revision history for this message
Chris Wilson (ickle) wrote :

Looks like state initialisation failed, but it still would have been able to use the BLT for everything... So I guess unity setup (libGL) also failed. I think another variation on the race as it too is transient.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Unfortunately I'm still seeing this with the latest Raring updates. I have Linux 3.8.0-19-generic with xserver-xorg-video-intel 2:2.21.6-0ubuntu3. Chris, can you elaborate on the race condition here? This is a race between which two entities - the X server and plymouthd? And they're both racing to do what? Is there any other Launchpad bug related to this one, or has nobody else seen similar symptoms? Do we have any hypothesis about why this might be occurring on a MacBook Air but not on other hardware?

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Aha - I just stumbled upon bug #982889 (X trying to start before plymouth has finished using the drm driver). It certainly looks like this bug could be related.

It would have been nice if you guys had pointed me to that bug before now - oh well.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

I just received a fix for bug #982889 via software updates. After that I tried rebooting 6 times and every boot was successful! So I think this was a duplicate of that bug all along.

Revision history for this message
Christopher Townsend (townsend) wrote :

Marking the Unity bug invalid and duping this bug to bug #982889 since the bug reporter is pretty confident the lightdm/plymouth updates fix this.

Changed in unity:
status: New → Invalid
Revision history for this message
Christopher Townsend (townsend) wrote :

Well, I would mark this as a duplicate to bug #982889, but the "Save duplicate" function of the "Mark as duplicate" feature has been broken all day:/

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Yes - I wanted to mark it as a duplicate of the same bug this morning, but was blocked by the same problem!

Revision history for this message
Christopher Townsend (townsend) wrote :

So apparently the reason why it can't be duplicated to bug #982889 is because of a performance issue in Launchpad (see https://answers.launchpad.net/launchpad/+question/227581 for more info). I don't really feel comfortable changing the bug status in that bug in order to duplicate this bug, so I guess we have to live with it:/

Chris Wilson (ickle)
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.