0

There's a strange situation on my new phone where as soon as the screen turns off due to inactivity, it wakes up again by itself after a couple of seconds. (However, if I turn it off manually, it stays off.)

I noticed that this stops when I disable "Wake screen for notifications". However, there are no notifications coming in when this happens or even an active notification that can be dismissed but hasn't; the display just wakes up at a very regular, short interval after it goes to sleep.

Other similar problems I found mentioned on the Web don't seem relevant; e.g.,

  • it happens even if the device is not moving (but "Lift to check phone" is off just in case).
  • "Screen attention" is off

Question: I would like to stop this from happening but still have the display wake up when an actual notification comes in. Any ideas / previous experience? If not, is there a way to find out exactly what's causing it to wake up?

Device details:

  • Pixel 6 Pro
  • Lineage 20-20230331-NIGHTLY-raven (Android 13)

UPDATE

I found what seem like the most relevant entries from logcat at the time of waking up: https://pastebin.com/yUCqFegF

Specifically, some of the entries have reason=WAKE_REASON_GESTURE, which seems to suggest (I couldn't find an explicit description/definition online) that a "gesture" is responsible for waking up the display.

However, the device is not moving and I'm not touching it or even near it when this happens. Also, it sounds to me that this is not really consistent with the fact that this behaviour stops when I disable "Wake screen for notifications".

From the UID (10204), it appears that com.android.systemui is the offending package:

$ adb shell pm list packages --uid 10204
package:com.android.systemui uid:10204

Here's a screenshot of the Gestures settings for reference:

enter image description here

Ratler
  • 147
  • 10
  • 1
    Observe logcat output when screen wakes up after timeout. – Firelord Jun 01 '23 at 07:49
  • @Firelod, what should I be looking for? I found some entries for DisplayPowerController, but not sure if they contain what I'm looking for (the cause). – Ratler Jun 02 '23 at 00:27
  • 1
    Do you see a log entry from PowerManagerService such as PowerManagerService: waking up from Asleep? – Firelord Jun 02 '23 at 07:48
  • @Firelord, yes, and it seems to suggest that it wakes up from a "gesture" detection, but not sure why (added details in revision 3 of the question). – Ratler Jun 05 '23 at 22:01
  • 1
    The logcat mentioned the uid, perhaps How can I find app name by UID? could help? Otherwise, you might want to check the notification history just to be sure. Perhaps there's one app that is showing a notification very briefly, thus it wakes the device, but the notification is already gone by the time you notice it. – Andrew T. Jun 06 '23 at 01:02
  • @AndrewT.: the package with that UID is com.android.systemui. I've enabled notification history, so I'll check again. – Ratler Jun 06 '23 at 04:10
  • @Ratler it is likely that you are dealing with a bug in your ROM (it is a nightly release). It might be worthwhile to take this issue with your ROM maintainer so that they can look at your findings and possibly help you out. – Firelord Jun 06 '23 at 04:47

1 Answers1

1

I believe, and it's what happened to me also, that you will still receive some system or possibly Play Services (in my case) notifications, even if mute/DnD or lock screen is enabled if the "Show as popup" isn't toggled to on in the App > Notification Settings and if not marked to "Hide in screen lock", which will wake the device. Not a gesture per se, just from my user experience. Worth a try.

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Cindyg627
  • 21
  • 5