Mir

screen does not turn on on maguro when pressing the power button

Bug #1255045 reported by Oliver Grawert
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
Undecided
Unassigned
unity-mir
Fix Released
High
Daniel van Vugt
unity-mir (Ubuntu)
Fix Released
High
Unassigned
unity-system-compositor (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

when putting the phone to sleep by pressing power it will not wake up the screen when pressing power again unless the screen gets touched.

this issue seems to be restricted to maguro ...

WORKAROUND (as per description):
1. press power button
2. touch the screen to get it displaying unity8

STEPS TO REPRODUCE:
Test 1
1. Boot the phone on an image older than 27
2. Leave the phone to one side let the screen blank
3. Once the screen has blanked wait 1 minute
4. Press the power button to wake it.

Test 2
1. With the Phone running press the power button to put it to sleep
2. Wait 1 minute
3. Press the power button to wake the phone

Test 3
1. Boot the phone on an image older than 27
2. Leave the phone to one side let the screen blank
3. Once the screen has blanked wait 10 minutes (deep sleep everything should of stopped running)
4. Press the power button to wake it.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unity8 7.83+14.04.20131106-0ubuntu1
Uname: Linux 3.0.0-3-maguro armv7l
ApportVersion: 2.12.7-0ubuntu1
Architecture: armhf
Date: Tue Nov 26 11:46:34 2013
InstallationDate: Installed on 2013-11-26 (0 days ago)
InstallationMedia: Ubuntu Trusty Tahr (development branch) - armhf (20131126)
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
SourcePackage: unity8
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Oliver Grawert (ogra) wrote :
tags: added: avengers regression
Changed in unity8 (Ubuntu):
importance: Undecided → High
Dave Morley (davmor2)
Changed in unity8 (Ubuntu):
status: New → Confirmed
description: updated
description: updated
Revision history for this message
Dave Morley (davmor2) wrote :

Image 26 seems to be clean:
1. Waiting for the phone to sleep press the power button it wakes. Pass
2. Pressing the the power button to make it sleep then pressing the power button again to wake it. Pass
3. Waiting for the phone to sleep leave the device for 10 minute+ then press the power button to wake it. Pass

Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
Oliver Grawert (ogra) wrote :

since the issue clearly starts with r27 one of the above packages must be at fault.

Revision history for this message
Dave Morley (davmor2) wrote :

Image 27 is where the breakage seems to begin:
1. Waiting for the phone to sleep press the power button it wakes. Fail
2. Pressing the the power button to make it sleep then pressing the power button again to wake it. Fail
3. Waiting for the phone to sleep leave the device for 10 minute+ then press the power button to wake it. Fail

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Image 27 is confirmed by Dave to have triggered the issue (and this one has the Mir new release only with click apparmor update. It can't be click apparmor related ;))

affects: unity8 (Ubuntu) → mir (Ubuntu)
Changed in mir:
status: New → Confirmed
importance: Undecided → High
Ursula Junque (ursinha)
tags: added: r26
tags: added: r27
removed: r26
Dave Morley (davmor2)
description: updated
Gerry Boland (gerboland)
Changed in mir:
importance: High → Critical
Changed in mir (Ubuntu):
importance: High → Critical
tags: added: galaxynexus
tags: added: pm
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This might help, but not sure: lp:~kdub/mir/fb-device-enablescreen

Changed in mir (Ubuntu):
assignee: nobody → Kevin DuBois (kdub)
Revision history for this message
Kevin DuBois (kdub) wrote :

I'm investigating from the mir side, this might be something in the power system too. The branch Daniel mentioned may help but the branch was only meant to address a TODO. I'm working to confirm that it helps or not

Revision history for this message
Kevin DuBois (kdub) wrote :

The maguro driver does not provide an enableScreen() function hook at all, so mir skips calling into the driver during a power request. The lp:~kdub/mir/fb-device-enablescreen will not fix the problem in this bug. The power button was working before, so I'm curious how... will keep digging

Revision history for this message
Kevin DuBois (kdub) wrote :

https://android.googlesource.com/platform/hardware/ti/omap4xxx/+/android-cts-4.4_r1/hwc/hwc.c
line 1961 might have a clue... seems both levers mir can push are just null hooks

Revision history for this message
Kevin DuBois (kdub) wrote :

Its strange that tapping the screen after the power button will turn it on, input logic is far away from mir's android display system. Perhaps a compositor update isn't being triggered, or the interplay between unity-mir and powerd has changed subtly.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Have people misinterpreted a black screen as the screen (backlight) being off? They're two very different things.

Maybe the screen is coming on immediately but needs to be told to flip a new frame?

Look very carefully, even from an angle, and you can tell when the backlight is on but the image is just black.

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

I've failed to notice any activity on the screen before touching it. It's very difficult on maguro to discern between off and black.

When pressing the button, syslog reports:
Nov 28 02:17:27 ubuntu-phablet kernel: [ 987.062652] request_suspend_state: wakeup (3->0) at 987055328372 (2013-11-28 02:17:27.551712642 UTC)
Nov 28 02:17:27 ubuntu-phablet powerd[718]: signalling activity via HAL
Nov 28 02:17:27 ubuntu-phablet kernel: [ 987.414428] DSSCOMP: dsscomp_late_resume
Nov 28 02:17:54 ubuntu-phablet kernel: [ 1013.965148] max17040 4-0036: online = 1 vcell = 4183750 soc = 100 status = 4 health = 1 temp = 360 charger status = 1

Touching the screen does not result in any syslog activity.

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

> I've failed to notice any activity on the screen before touching it. It's very difficult on maguro to discern between off and black.

Scratch that. Looking closely at the boundary between the bezel and the screen I can see it coming on, just displaying black. Man it's difficult to see... AMOLED FTW...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Cool. Sounds like a simple problem then, of Mir just failing to schedule a compositor frame on wakeup.

Normally frames are scheduled only when a surface changes. When no surface is changing, no frames are scheduled, resulting in better power management. So the touch is what triggers some surface to change, and then a frame gets scheduled.

Obviously we need to force a frame to be scheduled when the screen wakes up, as a special case. If we're not doing it already... (?)

Changed in mir:
importance: Critical → High
Changed in mir (Ubuntu):
importance: Critical → High
Changed in mir:
milestone: none → 0.1.3
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, it turns out Mir does correctly render a frame (or three!) immediately as soon as the compositor is restarted. The problem then is in unity-mir failing to stop/restart the compositor.

unity-mir assumes that turning the screen on is enough. Actually, it appears to not be enough. You have to stop/start the compositor _as_well_as_ turning screens on and off.

An example of how to do this is in Mir:
    examples/demo-shell/window_manager.cpp

And it appears the code that needs fixing is in unity-mir:
    src/unity-mir/dbusscreen.cpp
You need to remember to compositor->stop() and compositor-start(). And redraws will be scheduled immediately upon the call to start().

I think the reason why Mir doesn't do it automatically is because Mir has to consider and support multiple displays simultaneously. Just because you're turning one display off doesn't necessarily mean all compositing should stop in all use-cases. But for Unity8 on a touch device, it probably should.

affects: mir → unity-mir
Changed in unity-mir:
milestone: 0.1.3 → none
affects: mir (Ubuntu) → unity-mir (Ubuntu)
Changed in unity-mir (Ubuntu):
assignee: Kevin DuBois (kdub) → nobody
Changed in mir:
status: New → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although in the multi-monitor case, the current design does not force a redraw when you turn a single monitor back on. In that case you could see similar issues with screens remaining black (or out of date) even on desktop.

Changed in mir:
status: Invalid → Triaged
importance: Undecided → High
milestone: none → 0.1.3
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mir Team:
Do you think we *should* give graphics::Display knowledge of the compositor::Compositor and force a restart/frame-schedule every time an output is turned on? Or should the existing division of responsibility remain and let the shell control both separately?

Changed in mir:
status: Triaged → Incomplete
importance: High → Undecided
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In summary, please fix unity-mir now (per comment #16).

It's unclear as to whether this should be done automatically by Mir in future (comment #18).

Changed in unity-mir:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity-mir at revision 154, scheduled for release in unity-mir, milestone phone-v1-freeze

Changed in unity-mir:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-mir - 0.2+14.04.20131128.2-0ubuntu1

---------------
unity-mir (0.2+14.04.20131128.2-0ubuntu1) trusty; urgency=low

  [ Gerry Boland ]
  * Install ServerStatusListener to be notified of mir server start, pause
    and resume. Use start notification to send SIGSTOP signal to upstart,
    so it knows mir is ready for other clients.
  * Bump version number
  * InputArea: don't use lambda function as slot, can cause crash on
    shutdown Using lambda function as slot can introduce crash as the
    slot's object deletion is not registered unlike with traditional
    signal/slot connections. As a result, on signal emission, the lambda
    can be called on a deleted object. (LP: #1253685)
  * Misc fixes for Mir 0.1.2 support. (LP: #1254986)

  [ Alan Griffiths ]
  * ApplicationSession is a Mir implementation class that shouldn't be
    used by unity-mir, use shell::session instead.

  [ Kevin Gunn ]
  * mir server abi and api broke, updating dependency to deb 0.1.1.
  * update mir deb build dep to 0.1.2

  [ Victor Thompson ]
  * Fix mir to not suspend the music-app, or any other app granted a
    lifecycle exception, when switching between apps. (LP: #1241185,
    #1241045)

  [ Daniel van Vugt ]
  * Force the screen to redraw after turning the display back on (LP:
    #1255045). Also stop the compositor when the screen is off.
    Otherwise it will spin in the background, eating battery. (LP:
    #1255045)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 154
 -- Ubuntu daily release <email address hidden> Thu, 28 Nov 2013 16:19:49 +0000

Changed in unity-mir (Ubuntu):
status: Confirmed → Fix Released
Michał Sawicz (saviq)
Changed in unity-mir:
status: Fix Committed → Fix Released
Changed in mir:
status: Incomplete → Invalid
milestone: 0.1.3 → none
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-system-compositor - 0.0.2+14.04.20140116-0ubuntu1

---------------
unity-system-compositor (0.0.2+14.04.20140116-0ubuntu1) trusty; urgency=low

  [ Michael Terry ]
  * Force the screen to redraw after turning the display back on (LP:
    #1255045). Also stop the compositor when the screen is off.
    Otherwise it will spin in the background, eating battery. (LP:
    #1255045)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 110
 -- Ubuntu daily release <email address hidden> Thu, 16 Jan 2014 09:20:03 +0000

Changed in unity-system-compositor (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.