General Not entering deep sleep when Bluetooth connected to Alpine stereo - Google Pixel 6 Pro

Hi everyone,
I recently got my Pixel 6 Pro and am loving it.
Setup:
Pixel 6 Pro 128GB
Android 13 Sept update
Rooted with Magisk
Kirisakura kernel
Issue:
I discovered an issue when looking through Accubattery. I noticed I had a very low "deep sleep" percentage, aka when the CPU goes to sleep. After a lot of testing I discovered that the phone is not entering deep sleep when Bluetooth is on and connected to a particular Bluetooth device: my Alpine UTE-73BT stereo. Of course, this is without playing anything, as you would expect that to keep it awake. If I simply disconnect from this device, sleeping returns to normal. I can connect to Samsung Galaxy Buds+ and it also sleeps correctly with those.
What I've tried:
Turn off UWB.
Forget/Pair the BT device.
Turn off/on HD Audio for the BT device.
Turn off/on contact sharing for the BT device.
Change BT AVRCP version to 1.6 (default 1.5) in developer options.
Change BT MAP version to 1.4 (default 1.2) in developer options.
Update firmware on the Alpine UTE-73BT to v1.5.
Checked screen-off wakelocks with:
./adb shell dumpsys battery unplug (to simulate it being unplugged)
./adb shell dumpsys power | grep
Didn't see anything keeping it awake, and the same wakelocks with Bluetooth on or off:
DOZE_WAKE_LOCK 'DreamManagerService' ACQ=-8s287ms (uid=1000 pid=1785)
What could I do to get more info on what might be causing this? ​
When I first started investigating, I found another wakelock issue that others have had with the Pixel 6 Pro where the phone would not sleep until restarted with airplane mode on. I believe that's been fixed? I don't think this is related since I tried restarting in airplane mode and it had no effect.

Related

[SOLVED] Sleeping phone won't connect wifi when enabled by Tasker

Hi guys,
I have no data plan, and I use wifi at home. I have a Tasker script that turns wifi on when at home, but turns it off overnight to save battery and avoid cooking my delicate brains. At 6.30am, Tasker switches on wifi and normally the phone would then fetch email etc. whilst sitting on my bedside table, so when I wake up later and check the phone, everything is there waiting.
Recently, this has stopped working. Tasker is switching on wifi as normal, but wifi will not connect whilst the phone is asleep. If I wake the phone, wifi still won't connect however many times I wake it until I unlock the phone. Wifi then connects immediately. I have no problems holding a wifi connection at any other time of the day whilst the phone is asleep, and my wifi sleep policy is set to "never". It is only first thing in the morning I have this issue, so I assume it is related to Tasker switching wifi on whilst the phone is sleeping.
Anyone have any idea what could cause this? I changed from CM7.0.3 to CM7.1.0 recently, but I can't be sure if that coincided with my problems starting.
Thanks.
UPDATE:
I solved my own mystery in the end. I forgot to mention that in Tasker, as well as checking the time I am also doing a "cell near" check. When I remove that check everything work correctly. Tasker help mentions that cell location updates sometimes don't work reliably when the phone is sleeping, and that this is a bug in Android. I can only assume that updating from CM7.0.3 to CM7.1.0 introduced that bug for me.

[Q] device don't go in to deep sleep after using bluetooth

I have read allot about problems relating to deep sleep, but failed to find a solution.
my device wont go to deep sleep after I am using my Bluetooth headset, for example, in the morning while i'm at home everything is ok and then I turn my headset on, drive to work, and turn the headset off. the device fails to deep sleep from the moment I turn the headset on and it keep even after I turn the headset off.
i see in betterbetterystats that the "suspend_backoff" is keeping the device on.
I don't have allot of knowledge about kernels and wakelock so I need help finding the solution.
if needed I can provide log files from betterbetterystats and wakelock doctor.
current ROM: KitKatComet / Halley (v1.0)
kernel: the one provided with ROM
the problem is on all ROMs since 4.3 and up...
THANK YOU
Known issue on JB and above ROMs, no fix has been found so far.

[Q] Need help - Bluetooth, MM 6.0 stock/fullmics and battery drain

Hi, got problem with battery drain with bt turned on.
I'm using miband 1s, baterry drains really fast when bt is turned on.
miband does not use bt all the time (battery works almost 30days) but it happens only on MM (checked stock 2 times, all resets done few times, after that checked fullmics 3.5 and 3.7).
here are screens.
Any ideas and questions are welcome
drive.google. com/file/d/0B4rBUUVDHHYQdUt2S2MtR0hoSHEzcHlVRUhpR0pieVNMajRr/view?usp=sharing
drive.google. com/file/d/0B4rBUUVDHHYQTEc2RW1xdHJ1STh2MVVPQmpXQmJpVFduS2VB/view?usp=sharing
drive.google. com/file/d/0B4rBUUVDHHYQdXdhT2dSTDRtWGpzWFpFemNJbzI0dEthRkFn/view?usp=sharing
At those screens battery info reports Bluettoth settings, but usually it's just Android OS around 20-30% when bt is on.
Ofcourse doze does not work when bt is on, when turned off - works great.
Is there any app that checks wakelocks in MM?

Wifi stops working after phone is idle for some time

Whenever my phone is idle for a certain amount of time, I don't get any notifications. So I turn my phone on, turn my wifi off then on again and everything returns to normal. Any idea what could be causing this?
Some things that might help:
Latest PureNexus
Latest EX kernel
I have amplify and greenify installed, and I followed limitations by this guide.
It is caused by Android bug where WiFi that goes into deep sleep doesn't enable again when you turn your screen on.
To workaround, you can leave wifi on during sleep or install app to control wifi on/off.
sfhub said:
It is caused by Android bug where WiFi that goes into deep sleep doesn't enable again when you turn your screen on.
To workaround, you can leave wifi on during sleep or install app to control wifi on/off.
Click to expand...
Click to collapse
What...? The workaround is to leave it on? IT IS already on...
Bei60 said:
What...? The workaround is to leave it on? IT IS already on...
Click to expand...
Click to collapse
You have
Settings->Wi-Fi->...->Advanced
Keep Wi-Fi on during sleep
set to "Always"?
The bug is even if you keep your WiFi on all the time, if you allow it to go into "deep sleep", when you turn on the device in the morning (or whenever) then even though WiFi will say it is on, it won't work.
It didn't do that on the original MDA89E release but it does on the latest. I don't know when the change happened. On MDA89E, it had a different bug, even if you set Keep Wi-Fi on during sleep to "Never" it still wouldn't go to deep sleep. This probably masked the problem of resuming from deep sleep that started showing up in the latest releases, when they actually started honoring the "Never" option.
The other problem you could be having if WiFi is working and it is just notifications not showing up, Google Play services keeps a connection open to the mothership for notifications. There is a heartbeat it uses to keep the connection alive. If you router is killing the TCP connection before the heartbeat can send packets, then that connection might be broken and the quickest way to get notification is to toggle the interface. For cell data, they don't usually terminate the long connections that quickly so the heartbeat usually works fine. Alternatively if you determine this is the problem, you can usually adjust how often your router allows TCP connections with no activity to live.
I thought Google had "fixed" this problem though because they were supposed to dynamically adjust the heartbeat timer based on your connection specifics. I think default is 15 minute heartbeat on WiFi and 28 minute on Cell.

WiFi prevent phone from sleeping

Hi,
(I'm on Ressurrection Remix 5.8.5 / Nougat 7.1.2 final, rooted; installed O+3 OB24 firmware)
Recently (around mid-Feb) I started having problems with battery life on my device. I haven't changed anything (significant, not that I remember) but it was annoying me so on the road to figuring out which app/part of the system could cause the battery drain I ended up with pure Resurrection Remix rom without any Gapps (or any other apps for that matter) and... battery was still draining like crazy (which only annoyed me more). And with helpers like WakeLockDetector it say that my device was in deep sleep less then 50% of the time (and it was mostly laying on the table!)
The other day I noticed that if I disable WiFi all of the sudden device got decent sleep time (about 10-25% of awake time, which was consistent with my use case). I check the settings of wifi and had "keep wifi on during sleep" set to 'always' (however from performance and battery drain perspective having wifi on and even having idle TCP connection open shouldn't drain battery that much). I switched it to 'keep on only while charging' (no effect) and then to 'never' (also no effect).
Then I turned to old friend - 'llama' aplication and configured it to disable wifi the moment I turn off the screen and then when I turn on the screen activate wifi. With that setup I went from having 20-25% by the end of the day (unplug the phone around 6-7am, check around 6-7pm, i.e. after 12h) to still having 70% left with the same usage/timeframe. Generally this could be it, but! This is still kinda semi-automatic and I would loose notification if I don't explicitly wake device.
I was under the impression that this should be handled by doze - i.e. if the phone is lying on the table it would force device into deep sleep and then periodically wake it up to allow apps to refresh it states. In my case it looks like something is preventing doze from working correctly and placing phone into deeps sleep. I wan't as low-level as my (current) knowledge let me and I'm kinda stuck and don't know what to check next or how to fix it.
After using llama to disable wifi while screen is of the wakelock by 'PowerManagerService.WakeLocks' went down significantly as well as awake time.
Battery details: https://www.dropbox.com/s/bvf47nzx7ob5wc8/battery-details.png?dl=0 (wifi always on)
Wifi config: https://www.dropbox.com/s/2v65dugidp57rrd/wifi-config.png?dl=0 (nunca/never)
I would be very thankful for all suggestions.
.wojtek said:
Hi,
(I'm on Ressurrection Remix 5.8.5 / Nougat 7.1.2 final, rooted; installed O+3 OB24 firmware)
Recently (around mid-Feb) I started having problems with battery life on my device. I haven't changed anything (significant, not that I remember) but it was annoying me so on the road to figuring out which app/part of the system could cause the battery drain I ended up with pure Resurrection Remix rom without any Gapps (or any other apps for that matter) and... battery was still draining like crazy (which only annoyed me more). And with helpers like WakeLockDetector it say that my device was in deep sleep less then 50% of the time (and it was mostly laying on the table!)
The other day I noticed that if I disable WiFi all of the sudden device got decent sleep time (about 10-25% of awake time, which was consistent with my use case). I check the settings of wifi and had "keep wifi on during sleep" set to 'always' (however from performance and battery drain perspective having wifi on and even having idle TCP connection open shouldn't drain battery that much). I switched it to 'keep on only while charging' (no effect) and then to 'never' (also no effect).
Then I turned to old friend - 'llama' aplication and configured it to disable wifi the moment I turn off the screen and then when I turn on the screen activate wifi. With that setup I went from having 20-25% by the end of the day (unplug the phone around 6-7am, check around 6-7pm, i.e. after 12h) to still having 70% left with the same usage/timeframe. Generally this could be it, but! This is still kinda semi-automatic and I would loose notification if I don't explicitly wake device.
I was under the impression that this should be handled by doze - i.e. if the phone is lying on the table it would force device into deep sleep and then periodically wake it up to allow apps to refresh it states. In my case it looks like something is preventing doze from working correctly and placing phone into deeps sleep. I wan't as low-level as my (current) knowledge let me and I'm kinda stuck and don't know what to check next or how to fix it.
After using llama to disable wifi while screen is of the wakelock by 'PowerManagerService.WakeLocks' went down significantly as well as awake time.
Battery details: https://www.dropbox.com/s/bvf47nzx7ob5wc8/battery-details.png?dl=0 (wifi always on)
Wifi config: https://www.dropbox.com/s/2v65dugidp57rrd/wifi-config.png?dl=0 (nunca/never)
I would be very thankful for all suggestions.
Click to expand...
Click to collapse
Is wifi/BT scanning on in Location? If so switch it off.
Also check whether the firmware you use is correct or requires updation.
tnsmani said:
Is wifi/BT scanning on in Location? If so switch it off.
Also check whether the firmware you use is correct or requires updation.
Click to expand...
Click to collapse
I have BT off (haven't used it in my life…)
As for wifi scanning - you mean notification about available networks? yes, its' off.
What do you mean about firmware? Could that affect radios? in that case - which firmware should I install with RR 5.8.5? I'm not sure if "the latest" is alwasy the best idea (problems with compatibility)
.wojtek said:
I have BT off (haven't used it in my life…)
As for wifi scanning - you mean notification about available networks? yes, its' off.
What do you mean about firmware? Could that affect radios? in that case - which firmware should I install with RR 5.8.5? I'm not sure if "the latest" is alwasy the best idea (problems with compatibility)
Click to expand...
Click to collapse
Go to Settings>Location then click the three dot menu at top right, then click Scanning and disable wifi and BT scanning.
If that doesn't work, check on the ROM thread which firmware is recommended for your version of the ROM and flash it.
That one is also off.
As for firmware - I have (it seems) latest recommended one.

Categories

Resources