large window flicker on ubuntu apps launching in window mode

Bug #1532974 reported by kevin gunn
32
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Canonical Pocket Desktop
Fix Released
Critical
Michał Sawicz
Canonical System Image
Fix Released
Critical
Michał Sawicz
The Avila project
Fix Released
Critical
Unassigned
qtmir (Ubuntu)
Fix Released
Critical
Daniel d'Andrada
unity8 (Ubuntu)
Fix Released
Critical
Daniel d'Andrada

Bug Description

I don't recall ever seeing this, and I believe i would have noticed, so I think this is a regression
This only seems to occur for ubuntu apps (not puritine/xmir apps)
This is probably best demonstrated with the Clock app because of the trusted prompt - which in the clock app case actually holds the large window on screen

steps to repro
1) connect bt mouse
2) connect slimport to device
3) launch clock app (or any other ubuntu app and keep your eyes on the screen for the flicker)

also, tested this on both n7 and n4, it occurs on both

Related branches

kevin gunn (kgunn72)
description: updated
Changed in canonical-pocket-desktop:
importance: Undecided → Critical
Changed in qtmir (Ubuntu):
importance: Undecided → Critical
Changed in canonical-devices-system-image:
importance: Undecided → Critical
assignee: nobody → Michał Sawicz (saviq)
milestone: none → ww04-2016
Changed in canonical-pocket-desktop:
assignee: nobody → kevin gunn (kgunn72)
Jason Yen (jasonyen)
Changed in avila:
importance: Undecided → Critical
milestone: none → ww04-2016
assignee: nobody → Michał Sawicz (saviq)
Revision history for this message
Michał Sawicz (saviq) wrote :

I think I was able to reproduce on desktop with settings app - the splash screen starts at a certain size, then as the first frame from the app comes, it goes much bigger, just to go back to the original size a split second after.

Changed in canonical-devices-system-image:
status: New → Triaged
Revision history for this message
Michał Sawicz (saviq) wrote :

unity8.log supports the above:
qtmir.applications: TaskController::isApplicationPid - appId= "ubuntu-system-settings" pid= 31176
ApplicationManager REJECTED connection from app with pid 31176 as it was not launched by upstart, and no desktop_file_hint is specified
qtmir.mir: MirWindowManagerImpl::add_surface(): size requested ( 400 , 720 ) and placed ( 1920 , 1080 )
qtmir.mir: SessionListener::surface_created - this= SessionListener(0x7f4b40155390) session= 0x7f4b2800b860 surface= 0x7f4b2800bdb0
qtmir.applications: ApplicationManager::onSessionCreatedSurface - sessionName= QtUbuntu
qtmir.surfaces: MirSurfaceManager::onSessionCreatedSurface - mirSession= 0x7f4b2800b860 surface= 0x7f4b2800bdb0 surface.name=
qtmir.sessions: Session::resgisterSurface - session= "QtUbuntu" surface= qtmir::MirSurface(0x2fec900)
qtmir.sessions: Session::appendSurface - session= "QtUbuntu" surface= qtmir::MirSurface(0x2fec900)
qtmir.surfaces: MirSurfaceItem::setSurface surface=qtmir::MirSurface(0x2fec900)
qtmir.surfaces: MirSurface[0x2fec900,"ubuntu-system-settings"]::registerView(50557120) after=1
qtmir.surfaces: MirSurface[0x2fec900,"ubuntu-system-settings"]::setFocus(false)
qtmir.surfaces: MirSurfaceItem::setSurface surface=qtmir::MirSurface(0x2fec900)
qtmir.surfaces: MirSurface[0x2fec900,"ubuntu-system-settings"]::registerView(47755280) after=2
qtmir.surfaces: MirSurface[0x2fec900,"ubuntu-system-settings"]::resize old (1920,1080), new (634,498)
qtmir.surfaces: MirSurface[0x2fec900,"ubuntu-system-settings"]::setFocus(true)

See how the window goes from requested 1920x1080 back to 634x498 after having requested 400x720.

Revision history for this message
Michał Sawicz (saviq) wrote :

FWIW external screen isn't a factor, same happened on my laptop with just the internal screen.

It's unity8 alone that holds information about previous window geometry, it must be that somehow it respects the resize request from (qt)mir ("placed ( 1920 , 1080 )") before applying the previous geometry ("resize old (1920,1080), new (634,498)").

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

This is a very old issue.
On surface creation a mir callback is called where qtmir can modify the parameters of a surface about to be created, such as its size. Gerry tried in the past to connect this callback to unity8 so the latter could set the size properly, but it led to some horrible threading-related crashes and thus pulled out.

If I'm not mistaken nowadays that callback (MirWindowManagerImpl::add_surface I tink) simply defaults to the screen size, which is a fine default for phone but evidently not for desktop.

And this old issue was made more evident now that we no longer stretch windows in shell, so on desktop you see a fullscreen window for a splitsecond before the app responds to the resize.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Testing this in a unity8 session on laptop, I see this behavior only in the System Settings app, other apps like Dialer or Browser work fine.

Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: New → In Progress
assignee: nobody → Lukáš Tinkl (lukas-kde)
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
assignee: Lukáš Tinkl (lukas-kde) → Daniel d'Andrada (dandrader)
Changed in qtmir (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
status: New → In Progress
Changed in unity8 (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

And this is the original bug: https://bugs.launchpad.net/qtmir/+bug/1352845

Michał Sawicz (saviq)
Changed in avila:
status: New → In Progress
Changed in canonical-devices-system-image:
status: Triaged → In Progress
Changed in canonical-pocket-desktop:
status: New → In Progress
assignee: kevin gunn (kgunn72) → Michał Sawicz (saviq)
Revision history for this message
John McAleely (john.mcaleely) wrote :

This one is reported to be in silo 51, one of the last ota 9.5 landings

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.11+16.04.20160212-0ubuntu1

---------------
unity8 (8.11+16.04.20160212-0ubuntu1) xenial; urgency=medium

  [ Albert Astals Cid ]
  * Do not use components in card creator generated code
  * Forward the makesurevisible signal from the inner preview widget
  * Make fallback also be fallback when the image is empty and not only
    on error (LP: #1531913)
  * Make the artShapeSize assignment be updated when using dynamic grid
    units
  * Visual improvements to the dash audio play cards
  * We don't use the unity-scope-scopes anymore (LP: #1439172)

  [ Andrea Cimitan ]
  * only request a bigger image if zoomable widget data property is
    true, otherwise just leave the screen size (LP: #1536814)

  [ CI Train Bot ]
  * Update translation template

  [ Daniel d'Andrada ]
  * Set initial surface size (LP: #1532974)

  [ Daniel d'Andrada, Michał Sawicz ]
  * Window Size Hints

  [ Florian Boucault ]
  * Splash screen: delay showing the ActivityIndicator by 2 seconds.

  [ Lukáš Tinkl ]
  * Replace the word "phone" with a more generic term "device" in the
    welcome wizard (LP: #1294732, #1543527)

  [ Michael Terry ]
  * Have the tablet greeter set appropriate OSK hints if the user has a
    passcode instead of a passphrase. (LP: #1544173)

  [ Michael Zanetti ]
  * Don't eat mouse events in the edgebarrer

  [ Michał Sawicz ]
  * Bump unity-api dependencies

  [ Nick Dedekind ]
  * Added support for secondary indicator actions (LP: #1398888)
  * Remove zombie if they're not animated. (LP: #1534541)
  * Removed unused panel resources

  [ Ted Gould ]
  * Start the indicators after Unity8 starts instead of before

 -- Michał Sawicz <email address hidden> Fri, 12 Feb 2016 00:12:41 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Changed in avila:
status: In Progress → Fix Committed
assignee: Michał Sawicz (saviq) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.7+16.04.20160212-0ubuntu1

---------------
qtmir (0.4.7+16.04.20160212-0ubuntu1) xenial; urgency=medium

  [ Albert Astals Cid ]
  * Provide branch prediction information to the if in compressTimestamp
  * Reset start time if the timestamp travels to the past (LP: #1524488)

  [ Daniel d'Andrada ]
  * Let shell decide the initial surface size (LP: #1532974)
  * Remove the useless TaskController
  * Surface Size Hints
  * Update mir version requirement

  [ Michał Sawicz ]
  * Bump unity-api dependencies
  * Use QStandardPaths to determine QML cache location

  [ Nick Dedekind ]
  * Moved test framework into a static library for quicker
    recompilation.

 -- Michał Sawicz <email address hidden> Fri, 12 Feb 2016 00:07:26 +0000

Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
Changed in canonical-pocket-desktop:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-pocket-desktop:
status: Fix Committed → Fix Released
Changed in avila:
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
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.