Unexpected display on

Bug #1552371 reported by Pat McGowan
78
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Incomplete
Critical
Stephen M. Webb
Mir
Invalid
Undecided
Andreas Pokorny
Unity System Compositor
New
Undecided
Alexandros Frantzis
bluez (Ubuntu)
Won't Fix
Undecided
Unassigned
mir (Ubuntu)
Invalid
Undecided
Andreas Pokorny
unity-system-compositor (Ubuntu)
Confirmed
Undecided
Alexandros Frantzis

Bug Description

NOTE: kgunn suggests this bug be about 1) not 2) here

1)
I have been noticing my phone and tablet occasionally turning on without interaction. Several times with my phone in my pocket I found it in the emergency call UI
I also see the tablet display turn on while lying idle on the desk. Freiza & Arale

2)
I have reproduced one case such that turning on a BT device (headset) causes the phone to light up and display the volume slider. Similarly turning on the BT keyboard while the tablet screen is off caused the display to turn on.These may be as intended.

I suspect other BT events can similarly resume the device and/or turn on the display if it happens to be awake due to the 5 min polling timer.
The proximity sensor is also not honored when this happens, if its covered the screen still comes on.

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

Syslog when the headset was activated and display turned on

description: updated
description: updated
Changed in canonical-devices-system-image:
assignee: nobody → Pat McGowan (pat-mcgowan)
importance: Undecided → Critical
milestone: none → ww08-2016
status: New → Confirmed
Revision history for this message
Simon Fels (morphis) wrote :

For a mouse and a keyboard this for sure intended. Both act as input device like the power key and therefore can activate the device. For example when I have the tablet or the phone working as a converged device I as a user want the device to go to sleep when I wake up but be back when I active either one of those input devices (power-button, mouse or keyboard).

That the device wakes up from a deep-sleep is something we can't prevent and really shouldn't. If I turn on my paired headset I expect it to be usable no matter what state the other device is in. So connection establishment is fine here.

What we should fix is the use of the proximity sensor or other sensors to find out if the device is in a state where a turned on display is intended (like it being in your pocket or somewhere else).

Michał Sawicz (saviq)
affects: unity8 (Ubuntu) → unity-system-compositor (Ubuntu)
Revision history for this message
kevin gunn (kgunn72) wrote :

It seems like there is 1 bug and then 1 potential bug/feature depending based on the original description

1) actual bug - display turning on by itself (btw, i know this happens with Flo/N7 as well)

2) feature - bt devices are input, and we do want the screen to wake up on keypress or mouse move.

I would propose we keep this bug to be about #1)
If we feel something else needs to happen with #2) please spawn another bug - i worry a little with the suggestion to use the proximity sensor, eats battery and creates yet another complicated wrinkle in the display blanking policy. Also, we've kicked off a powerd rewrite to help consolidate policy - i would propose if we do want to address #2) let's do it as part of the powerd rewrite.

description: updated
summary: - Bluetooth connection turns on the device
+ Unexpected display on
Revision history for this message
kevin gunn (kgunn72) wrote :

@pat - also does the screen dim/blank at after expected expiry in the case of #1) ?
and second, same question in the case of #2) ?

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

For case 1 I always back out of emergency calls or wherever it got to and manually turn it off.
For case 2 yes it dims and turns off.

My hypothesis was that case 1 is caused by some variant of case 2 since it seems to be a relatively new phenomenon and I can't think of anything else that can cause a known wakeup event. However I have no proof of that other than I had debug logging on and saw a lot of BT and pulse activity when the MX4 woke up yesterday. I had moved out of range of my connected headset.

Fix 1: I think the policy for screen management is simple, never turn the display on if proximity is detected, it should not be specific to SMS or calls.
Fix 2: We are waking up on a headset connection not a HID. Connecting this IMO should never turn on the display. Only HID profile devices should turn on the display.
Fix 3: I suspect other BT events are also taking the phone out of suspend and may need to be filtered

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

When a keyboard connects, it doesn't turn on the display, the user needs to type on a key
The headset may be turning on the display because the connection triggers the volume slider OSD

Revision history for this message
kevin gunn (kgunn72) wrote :

>Fix 1: I think the policy for screen management is simple,
> never turn the display on if proximity is detected, it should
> not be specific to SMS or calls.

So you are saying we should have the proximity sensor on all the time ?
I disagree, first that's a power drain. Second, people will complain about the screen blanking off just interacting with the device.
The right answer is to get the policy correct in the first place and filter the events properly into those that you want to turn on the display and those you don't.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> So you are saying we should have the proximity sensor on all the time ?
> I disagree, first that's a power drain. Second, people will complain about the screen blanking off just interacting with the device.

There is a third, ideal way which would be to check the proximity value just before making the transition from off to on. This is currently difficult due to the overall power management architecture and the fact that the proximity API given to us doesn't provide a query function (we get change events, but can't get the current state). In the current system we have worked around this for SMS, calls etc with some funky hacks in USC and powerd which would be difficult to extend to other use cases. In the new architecture I expect that we will be able to manage proximity (and this case in particular) much more elegantly.

> The right answer is to get the policy correct in the first place and filter the events properly into those that you want to turn on the display and those you don't.

This is correct. Currently USC wakes up the screen when any key other than power and volume (which are handled specially) or a pointer events arrive. Perhaps there is a bug in our input subsystem and we send stray key events, or perhaps the events are valid (some kind of special key event not corresponding to user input?) and we should filter more strictly. In any case, we need to find out more about these unexpected events to make an informed decision.

kevin gunn (kgunn72)
description: updated
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@kevin I agree with your comment in 7 that the policies should be correct then we dont have the issue

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

If 1) happens without keyboard or mouse attached that definitely counts as a bug

As for proximity - the main issue is there's no API to query the current state of the sensor (as Alexandros mentioned).
However done properly the power drain should be minimal as it should only be turned on during an off to on transition (at least to handle the cases described here).

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

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

Changed in bluez (Ubuntu):
status: New → Confirmed
Changed in unity-system-compositor (Ubuntu):
status: New → Confirmed
Changed in canonical-devices-system-image:
milestone: ww08-2016 → 11
tags: added: display-control
Changed in canonical-devices-system-image:
assignee: Pat McGowan (pat-mcgowan) → Michał Sawicz (saviq)
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
assignee: Michał Sawicz (saviq) → Stephen M. Webb (bregma)
Changed in mir:
milestone: none → 0.23.0
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in canonical-devices-system-image:
milestone: 11 → 12
Changed in unity-system-compositor (Ubuntu):
assignee: nobody → Alexandros Frantzis (afrantzis)
Changed in unity-system-compositor:
assignee: nobody → Alexandros Frantzis (afrantzis)
Changed in mir (Ubuntu):
status: New → Confirmed
Revision history for this message
Randall Ross (randall) wrote :

I can confirm that my Nexus 7 also awakens on its own for no apparent reason.

Environment information
Ubuntu 15.04 (r425)
Nexus 7 (2013) flo
rc-proposed channel

Kevin DuBois (kdub)
Changed in mir:
milestone: 0.23.0 → 0.24.0
Revision history for this message
Rick Timmis (rick-timmis) wrote :

Aquaris M10, running first update after purchase. Screen comes on to lock prompt, stays on and even pressing power button it goes off for 1 second then back on again.

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

It could be useful to have these logs when it occurs
/var/log/syslog
/var/log/upstart/powerd.log

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

On the MX4 specifically there is also the issue with the "home" button staying active for about 30sec when the display was turned off, when shoving the phone into your pocket it is easy to create a button press event if you do not wait long enough.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

The "home" button accidentally turning the screen on is confirmed in this thread: https://plus.google.com/u/0/108188125572924200710/posts/aBuWYcnSyQt?cfem=1

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

Case 1 has been resolved with recent sensor control fixes as far as I can tell.
Will mark incomplete to see if there are any lingering issues with update 12.

Changed in canonical-devices-system-image:
milestone: 12 → backlog
status: Confirmed → Incomplete
Kevin DuBois (kdub)
Changed in mir:
milestone: 0.24.0 → 0.25.0
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just remembered that Mir actually doesn't control the backlight at all. That's USC/repowerd communicating with the kernel.

Changed in mir:
milestone: 0.25.0 → none
status: New → Invalid
Changed in mir (Ubuntu):
status: Confirmed → Invalid
tags: added: bluez-touch
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ubuntu Touch is no longer supported.

Changed in bluez (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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