Screen doesn't blank - krillin #32

Bug #1368786 reported by Alan Pope 🍺🐧🐱 🦄
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Media Hub
Fix Released
Critical
Alberto Aguirre
Unity System Compositor
Critical
Alberto Aguirre
gallery-app
Invalid
Undecided
Unassigned
media-hub (Ubuntu)
Undecided
Unassigned
unity-system-compositor (Ubuntu)
Critical
Alberto Aguirre
unity8 (Ubuntu)
Critical
Unassigned

Bug Description

rumor has it this does _not_ occur on n4, only krillin & flo

I think this may have been a problem for a couple of images, not sure.
My phone is set to auto lock after one minute.
Sometimes my phone display doesn't lock at all.
If booted from cold it seems to fairly reliably lock. Not sure if something I do later is triggering the fault.

Related branches

kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
importance: Undecided → Critical
Changed in unity-system-compositor (Ubuntu):
importance: Undecided → Critical
tags: added: rtm14 touch-2014-09-25
description: updated
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I see this on r30
Screen does not dim either
I had recorded and played some videos

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-system-compositor (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

So if no videos are played...Does the screen dims normally then?

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

unity-system-compositor.log seems to have multiple requests that are not removed

Warning: ignoring unrecognised arguments: --vt 1
GL_VENDOR = ARM
GL_RENDERER = Mali-400 MP
GL_VERSION = OpenGL ES 2.0
dm_connection_start
WARNING: QApplication was not created in the main() thread.
initialized brightness parameters
set_active_session 'session-0'
Opening session eglspinner
Opening session session-0
Closing session eglspinner
keepDisplayOn request id:0 requested by ":1.217"
removeDisplayOnRequest id:0 requested by ":1.217"
remove_display_on_requestor ":1.217"
keepDisplayOn request id:1 requested by ":1.218"
removeDisplayOnRequest id:1 requested by ":1.218"
remove_display_on_requestor ":1.218"
keepDisplayOn request id:2 requested by ":1.218"
keepDisplayOn request id:3 requested by ":1.219"
removeDisplayOnRequest id:3 requested by ":1.219"
remove_display_on_requestor ":1.219"
keepDisplayOn request id:4 requested by ":1.221"
removeDisplayOnRequest id:4 requested by ":1.221"
remove_display_on_requestor ":1.221"
keepDisplayOn request id:5 requested by ":1.221"
keepDisplayOn request id:6 requested by ":1.222"
keepDisplayOn request id:7 requested by ":1.223"
removeDisplayOnRequest id:7 requested by ":1.223"
remove_display_on_requestor ":1.223"
keepDisplayOn request id:8 requested by ":1.223"
removeDisplayOnRequest id:8 requested by ":1.223"
remove_display_on_requestor ":1.223"

kevin gunn (kgunn72)
Changed in unity-system-compositor (Ubuntu):
assignee: nobody → Alberto Aguirre (albaguirre)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I reproduced this by doing the following:

Play a video in gallery
After it completes, push the pause/play button a few times
back out of the page

The kepDisplayOn request stays active

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Thanks for the test case. I'll try that...

Changed in unity-system-compositor (Ubuntu):
status: Confirmed → In Progress
Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

It looks like there is a legitimate issue with the gallery app (media-player seems to behave ok).

I did find a possible race in USC, that had to do with the handling for when a process dies (which removes all "display on" requests) and a queued up "display on" request, however that does not apply here as the media-hub process doesn't go away (unless it crashes); however this will not solve the issue described here.

Changed in gallery-app:
status: New → Confirmed
Changed in unity-system-compositor:
status: New → In Progress
assignee: nobody → Alberto Aguirre (albaguirre)
importance: Undecided → Critical
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

I could also reproduce the issue with media-player, except that in that case, media player process always exits after you focus away from it, so USC always releases any "display on" requests for that process.

It seems there are races in the media-hub display wakelock reference counting code which I'm looking into.

Changed in gallery-app:
status: Confirmed → Invalid
Changed in media-hub:
status: New → Confirmed
assignee: nobody → Alberto Aguirre (albaguirre)
Changed in unity-system-compositor:
assignee: Alberto Aguirre (albaguirre) → nobody
assignee: nobody → Alberto Aguirre (albaguirre)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

The main culprit is the media-hub state machine that handles media player state transitions which acquires or releases display locks.
See https://code.launchpad.net/~albaguirre/media-hub/fix-1368786 for details.

Changed in media-hub:
status: Confirmed → In Progress
Jim Hodapp (jhodapp)
Changed in media-hub:
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package media-hub - 2.0.0+14.10.20140917-0ubuntu1

---------------
media-hub (2.0.0+14.10.20140917-0ubuntu1) utopic; urgency=low

  [ Alberto Aguirre ]
  * Fix wake lock state machine and subtle race conditions on wake lock
    refcounts. (LP: #1368786)
 -- Ubuntu daily release <email address hidden> Wed, 17 Sep 2014 19:59:51 +0000

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

Other bug subscribers