Unlocking the phone over fullscreen app is very slow

Bug #1396244 reported by Michał Sawicz
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
unity8 (Ubuntu)
Invalid
High
Gerry Boland
Vivid
Invalid
High
Gerry Boland

Bug Description

Steps to repro:
* have a pass{code,word}-protected phone
* start dialer
* lock the phone
* unlock the phone

Expected:
* nothing much, stuff unlocks fluently and all

Current:
* fade out of the lockscreen takes like 2-3s, dialer and panel seem to fight over fullscreen vs. maximized surface size

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: unity8 8.01+15.04.20141117-0ubuntu1
Uname: Linux 3.4.67 armv7l
ApportVersion: 2.14.7-0ubuntu10
Architecture: armhf
Date: Tue Nov 25 17:46:27 2014
InstallationDate: Installed on 2014-11-25 (0 days ago)
InstallationMedia: Ubuntu Vivid Vervet (development branch) - armhf (20141125-020205)
SourcePackage: unity8
UpgradeStatus: No upgrade log present (probably fresh install)

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

When locking phone with dialer in front, I see it tries to make itself fullscreen

qtmir.surfaces: MirSurfaceManager::onSurfaceAttributeChanged - surface= 0x1c36080 state=fullscreen
qtmir.sessions: Session::setFullscreen - session= qtmir::Session(0x1b2e608) fullscreen= true
qtmir.applications: ApplicationManager::onAppDataChanged: Received "fullscreen" update

and then on unlock of phone, it un-fullscreens itself

qtmir.sessions: Session::setFullscreen - session= qtmir::Session(0x1b2e608) fullscreen= false
qtmir.applications: ApplicationManager::onAppDataChanged: Received "fullscreen" update
qtmir.surfaces: MirSurfaceItem::updateMirSurfaceSize surface = qtmir::MirSurfaceItem (this = 0x20f9850 , name= "" , parent = 0x19c2078 , geometry = QRectF(0,0 768x1222) , z = 1 ) , old ( 768 , 1280 ) , new ( 768 , 1222 ) surface resized

Is dialer fullscreening itself on lock?

Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Gerry Boland (gerboland) wrote :

>> Is dialer fullscreening itself on lock?
<mterry> greyback_, yes
<mterry> greyback_, well the greeter enforces fullscreen / locked-down UI when you're in the emergency dialer (doesn't present launcher or indicators). So the dialer requests fullscreen because otherwise there'd be a blank bar at the top where the panel used to be
<greyback_> mterry: could it fullscreen itself only when it needs to appear?
<mterry> greyback_, well hm. I don't think we send it any signals that it could pick up on
<mterry> greyback_, unless it wasn't top app, then it would notice that it was being focused

The fullscreen/unfullscreen change appears to be a performance hit on shell while it's trying to animate lock screen. Resize isn't fast, hits CPU mostly. Not sure how, but might be optimisable.

Alternative is that Shell could refuse to honour fullscreen requests if device locked. But would be racey on unlock - what would happen first, the unfullscreen request from the client, or the shell's "oh I need to fullscreen you now"

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

This is rather visible because it happens at least every time you answered a call and unlock the phone afterwards, so we'll need to think about solving this soon.

Changed in unity8 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Michael Terry (mterry) wrote :

An easy but not necessarily pretty fix is to revert the commit that added greeter-fullscreen switching to the dialer [1]. It will leave us with a black bar where the panel is, but that's probably better than a jittering experience.

Of course a real fix would be better. Either make this change quicker (do we think it's actually a complicated operation or just poorly performant?), or only have it make the change when needed (i.e. we actually expose the greeter) instead of every time the greeter shows. Or both.

For the latter, we'd probably need some way to signal what's happening. Maybe an exposed DBus property much like "Active" but named something like "Shown" to indicate if the greeter itself is visible.

[1] http://bazaar.launchpad.net/~phablet-team/dialer-app/trunk/revision/321

Gerry Boland (gerboland)
summary: - Unlocking the phone over dialer is very slow
+ Unlocking the phone over fullscreen app is very slow
Revision history for this message
Gerry Boland (gerboland) wrote :

Problem is that the Lockscreen height is defined like this:

    Lockscreen {
        y: panel.panelHeight
        width: parent.width
        height: parent.height - panel.panelHeight
    }

and Lockscreen contains:

    Image {
        // Limit how much memory we'll reserve for this image
        sourceSize.height: height
        sourceSize.width: width
        fillMode: Image.PreserveAspectCrop
    }

panel.panelHeight is a property which is animated during unlock, if the application is fullscreen. Animating sourceSize is a bad thing, as it causes the CPU to rescaling the image each time.

Changed in unity8 (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Gerry Boland (gerboland)
kevin gunn (kgunn72)
tags: added: vivid-stab-candidate
kevin gunn (kgunn72)
tags: removed: vivid-stab-candidate
Michał Sawicz (saviq)
no longer affects: unity8 (Ubuntu RTM)
Revision history for this message
Gerry Boland (gerboland) wrote :

I can't repro this any more. Closing

Changed in unity8 (Ubuntu):
status: In Progress → Won't Fix
status: Won't Fix → Invalid
Changed in unity8 (Ubuntu Vivid):
status: In Progress → Invalid
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.