Mir/unity-system-compositor crashed with std::exception::what: Couldn't clear output ... (drmModeSetCrtc = -13)

Bug #1539811 reported by Adam Colligan
50
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Canonical System Image
New
Undecided
Unassigned
Mir
Confirmed
High
Unassigned
Unity System Compositor
Confirmed
High
Unassigned
mir (Ubuntu)
Confirmed
High
Unassigned
unity-system-compositor (Ubuntu)
Confirmed
High
Unassigned

Bug Description

This is a live USB environment (16.04, 2016-01-29 image). HP Envy x360 hybrid notebook. Package installed: 1.0.12+15.10.20150609-0ubuntu1 .

After installing the mir desktop session package and choosing "logout", the greeter correctly shows Unity8 as a login option. After entering "ubuntu" and a blank password, the screen goes to black (with backight), the fan runs for a few seconds of high activity, and no graphical session ever actually starts. The other tty screens remain available, and lightdm is eventually able to restart (though only after some time, and it is unclear if the commands to restart it are actually helping).

Some selected error messages from the time of session login:

*From lightdm.log*:
[+158.12s] DEBUG: Session pid=6899: Greeter requests session unity8-mir
[+158.12s] CRITICAL: g_dbus_connection_call_sync_internal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed

*From unity-system-compositor.log*:
dm_connection_start
ERROR: Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >
std::exception::what: write: Broken pipe
...
Closing session GDK-Mir
ERROR: /build/mir-UeyFew/mir-0.19.0+16.04.20160128/src/common/fatal/fatal.cpp(55): Throw in function void mir::fatal_error_except(const char*, ...)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Couldn't clear output eDP-1 (drmModeSetCrtc = -13)

*From syslog*:
Jan 29 22:40:41 ubuntu org.freedesktop.Notifications[7323]: Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Jan 29 22:40:41 ubuntu org.freedesktop.Notifications[7323]: Unable to init server: Could not connect: Connection refused
Jan 29 22:40:41 ubuntu org.freedesktop.Notifications[7323]: (notify-osd:7672): Gtk-WARNING **: cannot open display:
Jan 29 22:40:42 ubuntu dbus[1325]: [system] Activating service name='com.canonical.SystemImage' (using servicehelper)
Jan 29 22:40:42 ubuntu com.canonical.SystemImage[1325]: usage: system-image-dbus [-h] [--version] [-C DIRECTORY] [-v]
Jan 29 22:40:42 ubuntu com.canonical.SystemImage[1325]: system-image-dbus: error:
Jan 29 22:40:42 ubuntu com.canonical.SystemImage[1325]: Configuration directory not found: .load() requires a directory: /etc/system-image/config.d
Jan 29 22:40:42 ubuntu dbus[1325]: [system] Activated service 'com.canonical.SystemImage' failed: Launcher could not run (out of memory)

The Unity8.log and Unity8-dash.log files are just repetitions of:
QXcbConnection: Could not connect to display .

Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
Revision history for this message
Adam Colligan (adam-p) wrote :
tags: added: xenial
Revision history for this message
Adam Colligan (adam-p) wrote :
Adam Colligan (adam-p)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity8-desktop-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

I also used live image and after install of unity8-desktop-session-mir and login to Unity 8 ended up with black screen.

Then I switched to TTY1 and restarted lightdm and when it restarted I was on Unity 8 greeter. The session started but it was totally unusable. The Scopes displayed only webbrowser-app , system settings, checkbox and app store.

When I tried to start system settings it only displayed a small window for a very, very short time and disappeard. The same with webbrowser. Also the fonts display was terrible. Mouse cursor was very slow.

Changed in unity8-desktop-session (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Christopher Townsend (townsend) wrote :

Hmm, for one, I'm not how well supported just installing unity8-desktop-session-mir works on a LiveCD. I seem to remember there were special hacks in place when the Desktop guys were creating a Unity8 based LiveCD ISO (which sadly has been deprecated).

Also, looks like Mir may be having some issue with the display based on this:

ERROR: /build/mir-UeyFew/mir-0.19.0+16.04.20160128/src/common/fatal/fatal.cpp(55): Throw in function void mir::fatal_error_except(const char*, ...)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Couldn't clear output eDP-1 (drmModeSetCrtc = -13)

As a stab in the dark, I'll add the Mir project to this bug to see if they can weigh on on this error.

summary: Unity8-mir session fails to load on login; lightdm restart required
- (live USB)
+ (live USB) [std::exception::what: Couldn't clear output eDP-1
+ (drmModeSetCrtc = -13)]
Changed in mir:
status: New → Confirmed
importance: Undecided → High
summary: - Unity8-mir session fails to load on login; lightdm restart required
- (live USB) [std::exception::what: Couldn't clear output eDP-1
- (drmModeSetCrtc = -13)]
+ Mir crashed with std::exception::what: Couldn't clear output eDP-1
+ (drmModeSetCrtc = -13)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Mir crashed with std::exception::what: Couldn't clear output eDP-1 (drmModeSetCrtc = -13)

Error 13 is "Permission denied". That could mean unity-system-compositor is being shut down from a VT other than the one it is running on. So we might expect to see that error.

I'm tempted to say if this only happens on shutdown then we just need to make it a non-fatal error. However there's only one location where I can see the offending function getting called:

mgm::Display::clear_connected_unused_outputs()

and even then it's only called when:

        if (conf_output.connected &&
            (!conf_output.used || (conf_output.power_mode != mir_power_mode_on)))

So how is your eDP-1 (laptop screen) considered connected and unused? Is something turning the screen off prior to shutdown?!

Changed in unity-system-compositor:
status: New → Invalid
status: Invalid → New
affects: unity8-desktop-session (Ubuntu) → unity-system-compositor (Ubuntu)
Changed in unity-system-compositor:
status: New → Confirmed
Changed in mir (Ubuntu):
status: New → Confirmed
Revision history for this message
Adam Colligan (adam-p) wrote :

@Daniel, let me know if there's something I can test for you (or a different log I can scrape) to check if something is turning the screen off when I try to enter the Mir session.

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

I tried reproducing this yesterday with the Mir demos, but no luck yet. I suspect we'll have to modify some code to more easily reproduce the problem. I don't think you need to do anything more right now, thanks.

Changed in mir (Ubuntu):
importance: Undecided → High
Changed in unity-system-compositor:
importance: Undecided → High
Changed in unity-system-compositor (Ubuntu):
importance: Medium → High
Revision history for this message
Adam Colligan (adam-p) wrote :

I tried this yesterday with the latest daily 16.04 image and just wanted to note that the user-facing behavior is the same. I didn't check the logs to see if the same messages were appearing but could do more if it would help.

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

Another report of the same crash came in today.

Perhaps we need a fix like that of bug 1579630.

summary: - Mir crashed with std::exception::what: Couldn't clear output eDP-1
- (drmModeSetCrtc = -13)
+ Mir/unity-system-compositor crashed with std::exception::what: Couldn't
+ clear output eDP-1 (drmModeSetCrtc = -13)
tags: added: unity8-desktop
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Lucky me. My yakkety desktop experienced this crash today.

summary: Mir/unity-system-compositor crashed with std::exception::what: Couldn't
- clear output eDP-1 (drmModeSetCrtc = -13)
+ clear output ... (drmModeSetCrtc = -13)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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