Qtwayland race when showing up panels

Description

Investigate why on qtwayland from AGL we don't display the bottom panel/additional panels when using agl-shell protocol. 

 

Some context and explanation of the issue:

  • The compositor implements agl-shell, a protocol designed to allow the client shell to set-up roles to surfaces and arrange/orient them accordingly. 

  • The protocol works on top XDG shell. Latest version can be seen at https://gitlab.collabora.com/mvlad/native-app-qt/blob/master/native-app-qt/protocol/agl-shell.xml

  • Client shell (on client side in Qt) is done by using qApp (qplatformnativeinterface) and QQmlComponent(s) to bind to that
    agl-shell and create a QQmlComponent from QML files. Specifically a QML file is used to return a wl_surface for it,  which later on is passed to the agl-shell to set-up the role. Now, in the client shell application we use single-shot timer set-up, which should fire a ready request to signal back the compositor that all the surfaces are done loading and it is ready to display the content. On the server side it is the same mechanism used in XDG shell to delay presentation.

  • On qtwayland version from AGL, that single shot timer is never fired or it fires in some rather weird combination. This has the side effect that some of the panels are never displayed or the compositor will never show up the content (as the ready request from agl-shell protocol is never sent)

What I've already tried:

  • On the same version from AGL, using a C application I can display all the panels and the background

  • Locally, testing both the compositor and the client shell, but a newer qtbase/qtwayland 5.12 (or 5.13) I'm not seeing the issue.

  • Forcing a roundtrip or flushing events before and after agl-shell request seem to stop the timer from firing at all. I don't
    really have an explanation for it. Protocol debugging doesn't really help: on AGL 5.11 version it seems the event loop is stuck on processing
    events.

Code examples for this can be found at (simple client shell, which uses only a background, panels but with simple QMLs to avoid any other dependencies – this can also be built with yocto or local):

 * https://gitlab.collabora.com/mvlad/native-app-qt

For this example the single-shot is never fired (see the attached debug protocol log, in attachments) 

Or at (which is an adaptation of homescreen):

https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps%2Fhomescreen.git;a=shortlog;h=refs%2Fheads%2Fsandbox%2Fmvlad%2Fagl-compositor

For this example the ready request is sent but the bottom panel is never displayed (see the protocol dump)

 

Environment

None

Attachments

5

Activity

Marius Vlad 
March 6, 2020 at 12:39 PM

This should no longer be an issue with qtwayland 5.13 (latest master that is).

Marius Vlad 
February 14, 2020 at 11:22 AM

Tested with next branch and qtwayland 5.13 and this no longer happens. Will keep it up until next is merged into master.

 

Marius Vlad 
February 7, 2020 at 12:08 PM

I've published a work-around around this and should be sufficient for the time being.

Marius Vlad 
January 29, 2020 at 12:27 PM

Interestingly enough, locally with 5.12 I can see the configure events from qt.qpa for that logging rule. I've attached it as well. Yet on AGL I get no message at all. 

Marius Vlad 
January 29, 2020 at 10:50 AM
(edited)

added logging rules, but for "qt..*debug=true", as I get nothing when using "qt.qpa.=true". I've also added protocol debug as attachments. 

 

Jira comments messes up the message. qt.qpa on AGL yields no debug message. Had to use a more general rule.

Fixed

Details

Assignee

Reporter

Fix versions

Labels

Priority

Created January 27, 2020 at 6:42 PM
Updated April 7, 2020 at 9:39 PM
Resolved March 6, 2020 at 12:39 PM