Allow apps to keep the screen on
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Canonical Click Reviewers tools |
High
|
Jamie Strandboge | |||
| Canonical System Image |
High
|
Pat McGowan | |||
| Ubuntu Developer Portal |
Undecided
|
David Callé | |||
| apparmor-easyprof-ubuntu (Ubuntu) |
High
|
Jamie Strandboge | |||
| qtsystems-opensource-src (Ubuntu) |
High
|
Timo Jyrinki | |||
| qtsystems-opensource-src (Ubuntu RTM) |
High
|
Timo Jyrinki | |||
| qtubuntu (Ubuntu) |
Undecided
|
Unassigned | |||
| ubuntu-system-settings (Ubuntu) |
Wishlist
|
Unassigned | |||
| ubuntu-ui-toolkit (Ubuntu) |
Undecided
|
Unassigned | |||
| unity-system-compositor (Ubuntu) |
High
|
Michael Zanetti | |||
| unity8 (Ubuntu) |
Wishlist
|
Unassigned | |||
Bug Description
Support an interface in QML and HTML to allow an app to keep the screen on while the app is active. This has come up in several scenarios, such as an ebook reader, a clock in night mode.
First step is to hook up QtSystemInfo screenSaverEnabled
One solution to inhibit the screen blanking:
Add a new dbus rule to the default template
Provide a mediator (unity8) to control this, so it can restore the screen blanking when the app is not active or has been closed
Prompt the user for confirmation the first time the app accesses it
use the trust store to avoid prompts each time
add to the System settings Other app access panel an entry for Screen or Display so the setting could be revoked
| Changed in unity8 (Ubuntu): | |
| importance: | Undecided → Wishlist |
| tags: | added: application-confinement |
| Launchpad Janitor (janitor) wrote : | #1 |
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| status: | New → Confirmed |
| Changed in ubuntu-system-settings (Ubuntu): | |
| status: | New → Confirmed |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | New → Confirmed |
| Changed in unity8 (Ubuntu): | |
| status: | New → Confirmed |
| Changed in ubuntu-system-settings (Ubuntu): | |
| importance: | Undecided → Wishlist |
| rds (r-schroll) wrote : | #5 |
As the author of an ebook reader, I wouldn't want to disable the screensaver completely. But I might want to increase the timeout when the reader has focus. Is that within the ambit of this bug, or should I open another one?
| Sebastien Bacher (seb128) wrote : | #6 |
do we really need a permission for that? is there any issue to let the focussed application control the screen?
I made GPS Navigation app. I need to config the idle screen for use this
app each time :(
I'd need to set the screen = ON always.
I'm receiving bad user reviews too in the Store because of this (for
example, review of Jun 6 or 4, 2015)
https:/
" The only minor flaw so far is that it lets the screen dim even if screen
lock is off - it would be nice to be able to disable that."
"screem auto dims even if I change Bq phone settings."
"has no option for always on screen wich goes dark after 1 min "
" the screen turns almost down even if I set the never sleep option up"
For a video apps it would be useful too.
Best regards!
On Mon, Jun 8, 2015 at 2:43 PM, Sebastien Bacher <email address hidden> wrote:
>
> do we really need a permission for that? is there any issue to let the
> focussed application control the screen?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Allow apps to keep the screen on
>
> To manage notifications about this bug go to:
>
https:/
| Jamie Strandboge (jdstrand) wrote : | #8 |
On 06/08/2015 12:17 PM, costales wrote:
> I made GPS Navigation app. I need to config the idle screen for use this
> app each time :(
> I'd need to set the screen = ON always.
>
FYI, the suggested implementation in the bug is to ask the user the first time
the app tries to inhibit the screen turning off if it is ok to do this-- after
that the answer will be remembered (and thereafter adjustable in system
settings). I don't know if this will be the actual implementation, but the idea
is to solve your issue when it is implemented.
...
> For a video apps it would be useful too.
>
Video apps should be using media-hub which already has the ability to inhibit
the screen turning off. Webapps needing this are waiting for work that is in
progress to make media-hub work with oxide, but that is coming.
--
Jamie Strandboge | http://
| costales (costales) wrote : | #9 |
THanks Jamie,
It's OK the user question :)
This is a QML container for a web, then should I to add the media-hub for
this kind of app? Is it just that?
Thanks in advance!
On Monday, June 8, 2015, Jamie Strandboge <email address hidden> wrote:
> On 06/08/2015 12:17 PM, costales wrote:
>> I made GPS Navigation app. I need to config the idle screen for use this
>> app each time :(
>> I'd need to set the screen = ON always.
>>
> FYI, the suggested implementation in the bug is to ask the user the first
time
> the app tries to inhibit the screen turning off if it is ok to do this--
after
> that the answer will be remembered (and thereafter adjustable in system
> settings). I don't know if this will be the actual implementation, but
the idea
> is to solve your issue when it is implemented.
>
> ...
>
>> For a video apps it would be useful too.
>>
> Video apps should be using media-hub which already has the ability to
inhibit
> the screen turning off. Webapps needing this are waiting for work that is
in
> progress to make media-hub work with oxide, but that is coming.
>
> --
> Jamie Strandboge | http://
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Allow apps to keep the screen on
>
> To manage notifications about this bug go to:
>
https:/
>
| Jamie Strandboge (jdstrand) wrote : | #10 |
On 06/08/2015 01:37 PM, costales wrote:
> THanks Jamie,
> It's OK the user question :)
>
> This is a QML container for a web, then should I to add the media-hub for
> this kind of app? Is it just that?
>
As a developer, I think it is all supposed to be transparent-- ie, you use
regular QML, an UbuntuWebview or Oxide Webview and under the hood media-hub is
used. Today, that should work fine for Audio{}/etc it is just that with the
UbuntuWebview and Oxide Webview that under the hood work is in progress.
> Thanks in advance!
>
>
> On Monday, June 8, 2015, Jamie Strandboge <email address hidden> wrote:
>> On 06/08/2015 12:17 PM, costales wrote:
>>> I made GPS Navigation app. I need to config the idle screen for use this
>>> app each time :(
>>> I'd need to set the screen = ON always.
>>>
>> FYI, the suggested implementation in the bug is to ask the user the first
> time
>> the app tries to inhibit the screen turning off if it is ok to do this--
> after
>> that the answer will be remembered (and thereafter adjustable in system
>> settings). I don't know if this will be the actual implementation, but
> the idea
>> is to solve your issue when it is implemented.
>>
>> ...
>>
>>> For a video apps it would be useful too.
>>>
>> Video apps should be using media-hub which already has the ability to
> inhibit
>> the screen turning off. Webapps needing this are waiting for work that is
> in
>> progress to make media-hub work with oxide, but that is coming.
>>
>> --
>> Jamie Strandboge | http://
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https:/
>>
>> Title:
>> Allow apps to keep the screen on
>>
>> To manage notifications about this bug go to:
>>
> https:/
>>
>
--
Jamie Strandboge | http://
| costales (costales) wrote : | #11 |
I was looking into the apparmor and I didn't find any 'media'...
I found a "media-hub" into the video module. Then I added that to the
project, but it didn't work.
I'm a bit lost, I didn't find documentation about media-hub. Please,
could you put me in the right way? :) Thanks in advance!
Costales
| Jamie Strandboge (jdstrand) wrote : | #12 |
On 06/08/2015 04:42 PM, costales wrote:
> I was looking into the apparmor and I didn't find any 'media'...
> I found a "media-hub" into the video module. Then I added that to the
> project, but it didn't work.
> I'm a bit lost, I didn't find documentation about media-hub. Please,
> could you put me in the right way? :) Thanks in advance!
> Costales
>
This doesn't really have anything to do with apparmor. If you were wondering
about which security policy groups to use, just use 'audio' or 'video' and
that's it. You just use normal QML like Audio{} and Video{} and you don't have
to worry about media-hub yourself.
--
Jamie Strandboge | http://
| costales (costales) wrote : | #13 |
The project is this: lp:~unav
I added 'video' & 'audio' into the policy_groups.
I added then this both tags
<http://
Audio {
}
Video
}
But the screen is setting OFF after 1' :(
| Pat McGowan (pat-mcgowan) wrote : | #14 |
The screen only stays on if playback is active
| costales (costales) wrote : | #15 |
Thanks Pat ;)
Then, I can't use it, because I have indicator voices and I'm not playing then all the time :(
Thanks anyway!
| Albert Astals Cid (aacid) wrote : | #16 |
FWIW the QtSystemInfo has a ScreenSaver item that has a screenSaverEnabled property that we could/should implement to do exactly this
https:/
| Launchpad Janitor (janitor) wrote : | #17 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in qtubuntu (Ubuntu): | |
| status: | New → Confirmed |
| Michael Zanetti (mzanetti) wrote : | #18 |
I agree with Albert, we really should make the existing API work instead of coming up with a new one and keep the existing one broken.
| FransSchreuder (fransschreuder1) wrote : | #19 |
Yes Michael, I second that. for unconfined apps it's now possible to use dbus in order to achieve this, but for some apps (I created OSMScout) we need this feature to be fixed for general store apps.
Having the ScreenSaver qml keyword implemented (and allowed) would perfectly do the job.
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Pat McGowan (pat-mcgowan) |
| importance: | Undecided → High |
| milestone: | none → ww28-2015 |
| status: | New → Confirmed |
| description: | updated |
| Lukáš Tinkl (lukas-kde) wrote : | #20 |
The ScreenSaver QML element uses XGetScreenSaver
Cf. http://
| Pat McGowan (pat-mcgowan) wrote : | #21 |
We have a patch for QScreenSaver. The way it will work is that apps can use this from QML:
import QtSystemInfo 5.0
ScreenSaver { screenSaverEnabled: false }
or its pendant from C++. Unity-System-
application. As soon as the application is closed, the request will be
dropped and the screensaver will be enabled again, even if the app
didn't explicitly release the resource before quitting.
We need apparmor to allow apps to call the methods:
* keepDisplayOn
* removeDisplayOn
on interface:
com.canonical.
and path:
/com/canonical/
on the *system* bus.
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| assignee: | nobody → Jamie Strandboge (jdstrand) |
| importance: | Undecided → High |
| Pat McGowan (pat-mcgowan) wrote : | #22 |
@tyler can you help with this
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| assignee: | Jamie Strandboge (jdstrand) → Tyler Hicks (tyhicks) |
| Changed in unity-system-compositor (Ubuntu): | |
| assignee: | nobody → Michael Zanetti (mzanetti) |
| importance: | Undecided → High |
| status: | New → Confirmed |
| Timo Jyrinki (timo-jyrinki) wrote : | #23 |
Back from holidays, integrating Michael's patch into qtsystems-
| Changed in qtsystems-opensource-src (Ubuntu): | |
| assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
| importance: | Undecided → High |
| status: | New → In Progress |
| Changed in qtsystems-opensource-src (Ubuntu RTM): | |
| importance: | Undecided → High |
| assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
| Jamie Strandboge (jdstrand) wrote : | #24 |
What templates should this be for? Seems at least ubuntu-sdk and ubuntu-webapp. Should scopes also have this ability?
| Jamie Strandboge (jdstrand) wrote : | #25 |
We discussed this on irc. This a) should not include scopes and b) should not require a trust prompt since it will be clear that the foreground app is inhibiting the screen. If this is extended to scopes in the futures, we should revisit the trust prompt discussion.
| Jamie Strandboge (jdstrand) wrote : | #26 |
Per Pat, this is for both wily and stable-
| Jamie Strandboge (jdstrand) wrote : | #27 |
This will be implemented by added a new policy group, 'keep-display-on' that apps can start using. As such, app policy will not have to be regenerated on OTA upgrade for this change (since no apps are using this new policy group). This requires updating the review tools due to comment #25 (trust prompt won't be implemented at this time, so limit the use of this policy group to only apps specifying the ubuntu-sdk or ubuntu-webapp templates). The addition of the policy group also requires a documentation change.
| Changed in click-reviewers-tools (Ubuntu): | |
| assignee: | nobody → Jamie Strandboge (jdstrand) |
| status: | New → Triaged |
| importance: | Undecided → High |
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| assignee: | Tyler Hicks (tyhicks) → Jamie Strandboge (jdstrand) |
| status: | Confirmed → Triaged |
| Jamie Strandboge (jdstrand) wrote : | #28 |
Adding lp:developer-ubuntu-com task to update https:/
| Timo Jyrinki (timo-jyrinki) wrote : | #29 |
(in QA signoff queue)
| Changed in qtsystems-opensource-src (Ubuntu RTM): | |
| status: | New → In Progress |
| Launchpad Janitor (janitor) wrote : | #30 |
This bug was fixed in the package qtsystems-
---------------
qtsystems-
[ Michael Zanetti ]
* debian/
- Allow apps to keep the screen on (LP: #1462489)
-- Timo Jyrinki <email address hidden> Mon, 06 Jul 2015 09:02:12 +0000
| Changed in qtsystems-opensource-src (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → Fix Committed |
| Łukasz Zemczak (sil2100) wrote : | #31 |
This bug was fixed in the package qtsystems-
---------------
qtsystems-
[ Michael Zanetti ]
* debian/
- Allow apps to keep the screen on (LP: #1462489)
-- Timo Jyrinki <email address hidden> Mon, 06 Jul 2015 09:03:16 +0000
| Changed in qtsystems-opensource-src (Ubuntu RTM): | |
| status: | In Progress → Fix Released |
| Jamie Strandboge (jdstrand) wrote : | #32 |
FYI, the apparmor-
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| status: | Triaged → In Progress |
| Jamie Strandboge (jdstrand) wrote : | #33 |
Thanks to mzanetti, here is a test snap
| Jamie Strandboge (jdstrand) wrote : | #34 |
To verify the snap work, tap the button multiple times. You should see no denials. Then tap the button until the text string says 'disabled'-- then leave the device alone and observe the screen dimming/locking is inhibited. (Requires latest rc-proposed and apparmor-
| Changed in click-reviewers-tools (Ubuntu): | |
| status: | Triaged → In Progress |
| no longer affects: | click-reviewers-tools (Ubuntu) |
| costales (costales) wrote : | #35 |
Thanks a lot!
@Jamie: For testing it, when will your install .click work in the stable
channel? With the next OTA5?
| Changed in click-reviewers-tools: | |
| assignee: | nobody → Jamie Strandboge (jdstrand) |
| importance: | Undecided → High |
| status: | New → Fix Released |
| Jamie Strandboge (jdstrand) wrote : | #36 |
That is the plan, yes. The QA team is testing it for OTA-5 as I type this.
| Launchpad Janitor (janitor) wrote : | #37 |
This bug was fixed in the package apparmor-
---------------
apparmor-
* add ubuntu/
- LP: #1462489
* adjust autopkgtests for keep-display-on
-- Jamie Strandboge <email address hidden> Wed, 08 Jul 2015 09:11:56 -0500
| Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
| status: | In Progress → Fix Released |
| Jamie Strandboge (jdstrand) wrote : | #38 |
Ok, apparmor-
For the developer documentation changes to https:/
1. add 'keep-display-on' to the 'Policy groups' section (ie, the output of 'aa-easyprof --policy-
2. under Usage/common, add:
keep-display-on: Can request keeping the screen on
QML: qtdeclarative5-
import QtSystemInfo <version>
| costales (costales) wrote : | #39 |
Hi! I implemented in GPS Navigation after update to OTA5 and all it's
working perfect.
Thanks a lot for your support!!
Costales
| costales (costales) wrote : | #40 |
I found one wrong behaviour.
If I disable the screensaver into the application, the screensaver will
be disable on the entire system when the app goes to the background.
| Michael Zanetti (mzanetti) wrote : | #41 |
Well, currently, as long as the application process is running, the request for keeping the display list is respected. When the app is closed (or killed by OOM) the request is deleted.
I agree the long term solution should be to drop it when the app is unfocused (although we should consider how that works with convergence and windowed mode before we make a decision).
On a side note, I would also argue that most applications should even keep the display list all the time. For example, BigMovingText should not request the display to be kept lit while being in the settings menu, but only when it actually is displaying the big moving text. In order to create good quality apps, be clever and set screensaverEnabled to something meaningful instead of just "false". For example:
screenSaverEnabled: !(Qt.applicatio
| costales (costales) wrote : | #42 |
Then is working perfect :) yes, if I kill it the screensaver will apply.
Thanks for the explanation!
| Laurie Bradshaw (lauriebradshaw) wrote : | #43 |
So how would I request the display stays lit without qt?
| Laurie Bradshaw (lauriebradshaw) wrote : | #44 |
Ah, nevermind, send dbus message, got it.
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Fix Released |
| costales (costales) wrote : | #45 |
Hi. One question please, was this released for the Nexus deviced too?
I'm asking because a few Nexus 5/7 users are rating the app as Not Working.
Thanks in advance.
| Pat McGowan (pat-mcgowan) wrote : | #46 |
It should be working on Nexus 4, 7 and 10
Not sure when Nexus 5 build was updated as thats community driven
| costales (costales) wrote : | #47 |
Thanks a lot for the answer :)
On Thursday, August 6, 2015, Pat McGowan <email address hidden> wrote:
> It should be working on Nexus 4, 7 and 10
> Not sure when Nexus 5 build was updated as thats community driven
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Allow apps to keep the screen on
>
> To manage notifications about this bug go to:
>
https:/
>
| Robert Schroll (rschroll) wrote : | #48 |
> It should be working on Nexus 4, 7 and 10
It's not working on my Nexus 7, but presumably that's because the flo devel channel hasn't seen an update since April. Has it been abandoned again?
| Changed in unity-system-compositor (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Albert Astals Cid (aacid) wrote : | #49 |
I'm going to set this as fix released for unity8 since it's already working for apps and i don't see what could be missing from unity8.
| Changed in unity8 (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Changed in developer-ubuntu-com: | |
| assignee: | nobody → David Callé (davidc3) |
| status: | New → Fix Released |
| tags: | added: unity8 |
| Changed in ubuntu-ui-toolkit (Ubuntu): | |
| status: | Confirmed → Invalid |


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