← Back to team overview

touch-packages team mailing list archive

[Bug 1502145] Re: Apps can keep screen lit permanently

 

I have instrumented oxide, and I’m seeing the following:

Start playback of video, two instances of PowerSaveBlocker (one for
video, one for audio) are created and request a lock:

[1015/201111:INFO:oxide_power_save_blocker.cc(260)] PowerSaveBlocker::PowerSaveBlocker() 0xb8d11938 : Playing video
[1015/201111:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8d11938 : -1
[1015/201111:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8d11938 : -1
[1015/201111:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8d11938 : 3

[1015/201111:INFO:oxide_power_save_blocker.cc(260)] PowerSaveBlocker::PowerSaveBlocker() 0xb8a15ad0 : Playing audio
[1015/201111:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8a15ad0 : -1
[1015/201111:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8a15ad0 : -1
[1015/201111:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8a15ad0 : 4


Press power button, the two PowerSaveBlocker instances correctly release
their locks, as expected:

[1015/201117:INFO:oxide_power_save_blocker.cc(99)] PowerSaveBlocker::CleanUp() 0xb8d11938 : 3
[1015/201117:INFO:oxide_power_save_blocker.cc(99)] PowerSaveBlocker::CleanUp() 0xb8a15ad0 : 4
[1015/201117:INFO:oxide_power_save_blocker.cc(119)] PowerSaveBlocker::RemoveBlock() 0xb8d11938 : 3
[1015/201117:INFO:oxide_power_save_blocker.cc(119)] PowerSaveBlocker::RemoveBlock() 0xb8a15ad0 : 4


Press power button again to wake screen, unlock screen, playback resumes
but Init() appears to be called twice on each instance:

[1015/201130:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8d11938 : -1
[1015/201130:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8a15ad0 : -1
[1015/201130:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8d11938 : -1
[1015/201130:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8d11938 : -1
[1015/201130:INFO:oxide_power_save_blocker.cc(88)] PowerSaveBlocker::Init() 0xb8a15ad0 : -1
[1015/201130:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8d11938 : 5
[1015/201130:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8a15ad0 : -1
[1015/201131:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8a15ad0 : 6
[1015/201131:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8d11938 : 5
[1015/201131:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8d11938 : 7
[1015/201131:INFO:oxide_power_save_blocker.cc(107)] PowerSaveBlocker::ApplyBlock() 0xb8a15ad0 : 6
[1015/201131:INFO:oxide_power_save_blocker.cc(157)] PowerSaveBlocker::ApplyBlockUnityScreenService() 0xb8a15ad0 : 8


I’m suspecting that Init() is called once by chromium itself when it resumes the paused playback, and a second time in the meantime by the code that handles application state changes, when oxide detects that the application got focused.

This is a bug in oxide: a call to Init() should bail out if another
Init() has already been requested, to avoid two concurrent lock
requests.

** Also affects: oxide
   Importance: Undecided
       Status: New

** Changed in: oxide
     Assignee: (unassigned) => Olivier Tilloy (osomon)

** Changed in: oxide
   Importance: Undecided => Critical

** Changed in: oxide
       Status: New => Confirmed

** Changed in: webbrowser-app (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-system-compositor in
Ubuntu.
https://bugs.launchpad.net/bugs/1502145

Title:
  Apps can keep screen lit permanently

Status in Canonical System Image:
  Confirmed
Status in Oxide:
  Confirmed
Status in qtmir package in Ubuntu:
  New
Status in unity-system-compositor package in Ubuntu:
  Confirmed
Status in unity8 package in Ubuntu:
  New
Status in webbrowser-app package in Ubuntu:
  Invalid

Bug description:
  rc-proposed, r140, krillin

  There are times when it seems the display blanking policy stops
  working and the display stays on until I press the power button.

  Steps to reproduce:
  * install and start Siete
  * put it in background

  Expected outcome:
  * the display is switched off after a predetermined amount of time

  Actual outcome:
  * the display stays on forever

  ======

  Now that apps can request the screen to stay on, they can do so
  regardless of whether they're focused/visible or not.

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1502145/+subscriptions


References