(i945 only) Ubuntu Desktop Next fails to start; just black screen and mouse pointer (unity8.log: std::exception::what: Failed to create shared EGL context)

Bug #1408910 reported by Daniel van Vugt
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
High
Unassigned
mesa (Ubuntu)
Fix Released
High
Unassigned
mir (Ubuntu)
Invalid
High
Unassigned
qtmir (Ubuntu)
Invalid
High
Unassigned

Bug Description

Ubuntu Desktop Next fails to start. I just get a black screen and mouse pointer. So unity-system-compositor is working fine. Only the nested unity8 can't run:

unity8.log:
~~~
()
[1420794321.348507] (II) SharedLibrary: Loading libmirplatform5driver.so
qtmir.mir: MirServer created
[1420794321.423199] (II) Server: Starting
libEGL warning: unsupported platform (null)
ERROR: /build/buildd/mir-0.10.0+15.04.20150107.2/src/server/graphics/nested/nested_display.cpp(85): Throw in function void mir::graphics::nested::detail::EGLDisplayHandle::initialize(MirPixelFormat)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEEE
std::exception::what: Failed to create shared EGL context

ERROR: QMirServer - Mir failed to start
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
  what(): Cannot use configuration before apply_settings() call
~~~

I've also verified mir_proving_server with mir_demo_client_* runs fine in another VT.

Tags: nested
Changed in mir:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Daniel van Vugt (vanvugt)
milestone: none → 0.11.0
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, actually this has only been reported on i945 systems so far (me and another person in:
https://bugs.launchpad.net/mir/+bug/1275398/comments/20

My Haswell desktop works fine with the same image. Maybe we're missing something in our relatively recent mesa patches to support i945?...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Tested with mir-demos on the affected machine. Nesting works just fine with the mir-demos.

This bug then is just Unity8/QtMir choosing EGL config modifications that i945 systems can't support. Looking at the QtMir code, I would hazard a guess that the request for 8 bit stencilling is unreasonable:

class MirGLConfig : public mir::graphics::GLConfig
{
public:
    int depth_buffer_bits() const override { return 24; }
    int stencil_buffer_bits() const override { return 8; }
};

Changed in mir:
status: Triaged → Invalid
milestone: 0.11.0 → none
Changed in qtmir:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, you shouldn't need a depth buffer for a desktop either. Throwing away that whole MirGLConfig, or at least loosening the restrictions should solve the problem.

Changed in qtmir (Ubuntu):
importance: Undecided → Critical
status: New → Triaged
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The problem could also be the incorrect selection of a MirPixelFormat.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Reproduced on a third machine, where I could get a copy of the log file off.

description: updated
Changed in mir:
status: Invalid → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not quite sure what QtMir is doing to trigger this. I've tried hacks to Mir directly to try and emulate what it might be doing, but my hacks result in nested servers starting and running perfectly still.

Something about QtMir I'm failing to emulate...

Changed in mir:
status: Incomplete → Confirmed
Changed in qtmir:
status: Triaged → Confirmed
Changed in qtmir (Ubuntu):
status: Triaged → Confirmed
Changed in unity8 (Ubuntu):
status: Triaged → Confirmed
Changed in mir:
milestone: none → 0.11.0
assignee: Daniel van Vugt (vanvugt) → nobody
tags: added: nested
Revision history for this message
Alexander Dobetsberger (masternoob) wrote :

i can also reproduce this issue with the daily images on my eeepc (with i945 graphics)

Changed in mir:
milestone: 0.11.0 → 0.12.0
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Possible duplicate: bug 1418456 . It has some interesting backtraces and valgrind logs.

Kevin DuBois (kdub)
Changed in mir:
milestone: 0.12.0 → 0.13.0
kevin gunn (kgunn72)
summary: - Ubuntu Desktop Next fails to start; just black screen and mouse pointer
- (unity8.log: std::exception::what: Failed to create shared EGL context)
+ (i945 only) Ubuntu Desktop Next fails to start; just black screen and
+ mouse pointer (unity8.log: std::exception::what: Failed to create shared
+ EGL context)
no longer affects: unity8 (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Dropped from Critical to High. Because only affecting a small subset of older GPUs is not a release blocker for us.

Changed in mir:
importance: Critical → High
Changed in qtmir:
importance: Critical → High
Changed in qtmir (Ubuntu):
importance: Critical → High
Changed in mir (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

The last time I tested those systems the main blocker I saw was our mesa package reporting a too low OpenGL version (the ES support would be fine enough for QtQuick btw). After some digging it seemed that the GL version is limited to 1.X, to avoid usage of certain full screen effects in unity7.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mir doesn't bother to interpret the OpenGL version string. It goes looking for the features it needs, properly. And the Mir demos almost all work properly on i945 (except for bug 1275684)

Although if QtMir was trying to interpret the version string, I'm not yet sure how that could cause this bug.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified fixed on two i945 systems. Probably the Mesa 10.5 upgrade in vivid fixed this.

Unity8 on these older systems is a bit slow and I can't get through the welcome wizard fully. But it's not crashing any more so bug fixed!

Changed in mesa (Ubuntu):
status: New → Fix Released
importance: Undecided → High
Changed in mir:
status: Confirmed → Invalid
Changed in qtmir:
status: Confirmed → Invalid
Changed in mir (Ubuntu):
status: Confirmed → Invalid
Changed in qtmir (Ubuntu):
status: Confirmed → Invalid
Changed in mir:
milestone: 0.13.0 → none
Michał Sawicz (saviq)
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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