Mir

[nested server] plug in monitor, display config change fires, but no DisplayBuffer ready for that new display

Bug #1491816 reported by Gerry Boland on 2015-09-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
Undecided
Alexandros Frantzis

Bug Description

In exercising https://code.launchpad.net/~gerboland/qtmir/multimonitor I stumbled across this issue.

I have a host mir server running - mir_proving_server.
On top of that I run a QtMir server, which is multimonitor aware. [instructions later]

I start with a single monitor setup, then plug in external monitor. I get a crash in a makeCurrent call. Investigating I saw that when QtMir was reacting to the DisplayConfigurationChange event, it was unable to find a DisplayBuffer for the new display. As far as I can tell, Mir allocated no new DisplayBuffer for that display!

If I start with multi-monitor setup, it works ok.

I've also noted my TiledDisplayConfigurationPolicy is not consulted as a nested server, except at startup.

Steps to repro
1. Grab https://code.launchpad.net/~gerboland/qtmir/multimonitor, build and install
2. Run Mir as host server: mir_proving_shell --display-config=sidebyside
3. export MIR_SOCKET to suit, fixing permissions as needed
4. in the QtMir code, go to demos/qml-demo-shell and do
    QT_QPA_PLATFORM=mirserver qmlscene qml-demo-shell.qml
5. Then start plugging/unplugging!

Note the simple qml shell looks identical on each screen, but they are independent (tapping the Unity logo makes it spin)

Changed in mir:
assignee: nobody → Alexandros Frantzis (afrantzis)
Gerry Boland (gerboland) wrote :

Oh, this occurs on Android & Mesa

description: updated
Gerry Boland (gerboland) wrote :

Problem was due to me registering my own callback for mg::Display::register_configuration_change_handler which I'm told should not be used! Instead I just rely on compositor start/stop messages, which seems to do the trick

Changed in mir:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers