Unity 8 doesn't allow multiple Mir connections from an application instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Canonical System Image |
Critical
|
Michał Sawicz | ||
| qtmir (Ubuntu) |
Critical
|
Daniel d'Andrada | ||
| unity8 (Ubuntu) |
High
|
Daniel d'Andrada |
Bug Description
Some clients like to probe to see if a mir connection is available such as SDL2 and SDL1.2.
This is an issue in U8 as it doesnt seem to allow multiple connections in one process.
Example:
http://
Output on U8:
http://
==== Proposed solution ====
Related to bug #1589637
We need to accept multiple connections from the same application instance, relying on ubuntu-app-launch to tell us about instances and their lifecycle.
Related branches
- Michał Sawicz: Approve on 2017-04-05
- Gerry Boland (community): Approve on 2017-04-05
- Unity8 CI Bot (community): Approve (continuous-integration) on 2017-03-31
-
Diff: 1193 lines (+292/-239)9 files modifiedsrc/modules/Unity/Application/application.cpp (+146/-90)
src/modules/Unity/Application/application.h (+12/-13)
src/modules/Unity/Application/application_manager.cpp (+29/-58)
src/modules/Unity/Application/application_manager.h (+3/-7)
src/modules/Unity/Application/dbusfocusinfo.cpp (+28/-25)
src/modules/Unity/Application/session.cpp (+1/-1)
src/modules/Unity/Application/session_interface.h (+6/-5)
tests/modules/Application/application_test.cpp (+15/-15)
tests/modules/ApplicationManager/application_manager_test.cpp (+52/-25)
Michał Sawicz (saviq) wrote : Re: Unity 8 doesnt allow multiple mir connections from an application instance | #1 |
summary: |
- Unity 8 doesnt allow multiple mir connections in a single client + Unity 8 doesnt allow multiple mir connections from an application + instance |
Changed in unity8 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Michał Sawicz (saviq) |
milestone: | none → u8c-2 |
Changed in qtmir (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
tags: | added: unity8-desktop |
Stephen M. Webb (bregma) wrote : | #2 |
Turns out this is the cause of launch failures of any GTK+, Qt, or SDL application that is trying to use Mir instead of X11.
Changed in canonical-devices-system-image: | |
importance: | High → Critical |
Changed in qtmir (Ubuntu): | |
importance: | High → Critical |
Changed in qtmir (Ubuntu): | |
assignee: | nobody → Daniel d'Andrada (dandrader) |
Changed in unity8 (Ubuntu): | |
assignee: | nobody → Daniel d'Andrada (dandrader) |
Changed in qtmir (Ubuntu): | |
status: | Triaged → In Progress |
Changed in canonical-devices-system-image: | |
status: | Triaged → In Progress |
Changed in unity8 (Ubuntu): | |
status: | Triaged → In Progress |
Changed in canonical-devices-system-image: | |
milestone: | u8c-2 → u8c-z |
Changed in unity8 (Ubuntu): | |
status: | In Progress → Invalid |
Daniel d'Andrada (dandrader) wrote : | #3 |
Have a fix for it. Just gotta update qtmir tests now before I can propose it for merging.
summary: |
- Unity 8 doesnt allow multiple mir connections from an application + Unity 8 doesn't allow multiple Mir connections from an application instance |
Gerry Boland (gerboland) wrote : | #4 |
Relevant info to reproduce:
<bregma> Saviq, the first way to test the multiple-connection situation would probably be to create a custom .desktop file that removes GDK_BACKEND from the app's environment, which will force it to autoprobe and use Mir instead
Launchpad Janitor (janitor) wrote : | #5 |
This bug was fixed in the package qtmir - 0.5.1+17.
---------------
qtmir (0.5.1+
[ Albert Astals Cid ]
* Remove m_tools member
* EventInfo::store: Store an empty cookie for mir events without
cookie
[ Daniel d'Andrada ]
* Support multiple sessions per Application (LP: #1675448)
-- Lukáš Tinkl <email address hidden> Tue, 04 Apr 2017 00:47:22 +0000
Changed in qtmir (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Released |
Not a duplicate after all:
<Saviq> bschaefer, about bug #1675448 you say that SDL likes to probe the display server, how would that affect launching an app? it drops the probing connection and reconnects from scratch after deciding it's fine?
<bschaefer> yeah, just need to politely mention we dont want to support that and dont want to support anything mir related long term until we have 1.0
<bschaefer> Saviq, soo with SDL2 (recently upstreamed and not released) and SDL1.2
<bschaefer> it probes if mir is around by simply attempting to connect to the mir server
checks if its valid, releases the connection
then runs with the video driver which will re-connect to the display server
in the same process
<bschaefer> Saviq, theres not a good way to cache this connection as well (only way would be a global variable MirConnection* which i would like to avoid 100%)
<Saviq> dandrader, you might want to have that in mind ↑ when looking at multi-instance apps, bug #1675448 might not really be a duplicate after all
<dandrader> Saviq, ack
<Saviq> I'm actually not sure how to solve that wrt. splash screens right now
'cause the first connection would be hooked up to the Application object that's "waiting" for a connection, then that connection gets dropped and we get a new one
so how do we differentiate that from a new instance altogether? I suppose through UAL instances maybe?
<bschaefer> hmm
<Saviq> so we maintain a 1:1 mapping between UAL's instance and our Application, and we collect multiple connections for the same instance under the same Application object
<dandrader> Saviq, agreed it looks like a separate issue
<dandrader> (that "duplicate "bug)
<bschaefer> yeah i wasnt sure if it was
but if a connection releases it before a new one comes it *its closed* right?
<bschaefer> and any connections after the release would be void
<Saviq> bschaefer, I suppose we can rely on UAL telling us when an application instance is really gone
<bschaefer> Saviq, that should be a way to do it (though not sure if its *easy* to do)
<bschaefer> does U8 only know about an application on the first mir_connection?