Join now - be part of our community!

Bluetooth bug does not allow the Z3 to deep sleep + battery drain

vittogn
Visitor

Bluetooth bug does not allow the Z3 to deep sleep + battery drain

I'm with a 5.0.2 D6603.

The issue I have is that the following Kernel wakelocks does not allow the phone to deep sleep.


msm_serial_hs_dma
BTLowPower


I've just performed a sw repair via pc companion, and several factory reset. I'm running the Z3 with no apps.

It happens both with an LG G Watch R (5.0.2) and a regular BT Plantronics (voice only) headset.

Using the same BT devices with a Nexus 4, Nexus 10 and an LG G2 does not have the same effect. As soon as there is no usage the phone goes to speep immediately.



If we take the second device, I do expect a Kernel wakelock while speaking or streaming music. The phone is active any way while performing this task.
What is strange is that even if there is no activity the wakelocks avoid deep sleep.
What is strange is that if I move away from the headset (and the BT icon goes the "non connected" status), the wakelocks are always there.

The effect is that my phone (both on 4.4.4 and 5.0.2) almost never ever sleeps, and sometimes get warm. It is evident that the battery life affected a lot.
If I switch BT off, everything goes back to normal.

I did a further test, in the below sequence:

- BT ON + connected to a Plantronics headset => wakelock + device always on
- BT ON + disconnected to a Plantronics headset => wakelock + device always on
- BT OFF + disconnected to a Plantronics headset => no wakelock + device sleep
- BT ON + disconnected to a Plantronics headset => wakelock + device always on

Any solution?

Is it possible that this is an hardware problem?

This thing is driving me crazy!!!!

Thanks in advance.

Vittore

32 REPLIES 32
vittogn
Visitor

I no longer have the Z3 for this issue I moved to another phone!

Fievel
Visitor

Just UNVELIVABLE!

I Have been suffering from BT wakelocks since the original Xperia Z, and here we are 3 years later with the same "Fricking" problem.

I really love Sony desing and waterproofness, but with great pain in my heart, this Z3 is going to be the last Sony smartphone I buy. (Anyway don't think is a big problem for Sony, since there are rumors that they are leaving this market.)

I had a Xperia Z that when paired with a bluetooth headset, the moment I touch a key in the headset, the phone would not enter deep sleep any more. Well, my mistake, I bought a Xperia Z3. Come on, I thought, this should have been fixed by now.

But here we are, with my really beautifull Z3 and I still can't use my hand's free carkit or headset  buttons to skip one music track, because from that moment on, the phone would not enter deep sleep any more untill rebooted. Hey! no problem, I will wait for the lolipop update, that is close (thas't what  I thought back in January)

And just now (really fast uh!) I receive a notification that I have one update available, and... since I'm starting to know how Sony releases updates, prior to do the upgrade, I search the forums, and find this thread.

So, I'll keep the update notification for ever in my screen, since, gess what? I have a Pebble watch and acording to this thread I'll be cursing all day long the minute I install the update.

I'll pin this thread into to my favorites, just in case the miracle happens, and Sony finally decides to fix it (By de way the "It's Google's fault" moto is kind of worn-out)

Rickard
Master

I'm very sorry for the long delay in this case.

With the latest version of our software, 23.4.A.0.546, this has been fixed and you should not see this issue.

JackosXDA
Visitor

I have exactly this same issue with the new firmware 23.4.A.1.232 on the Z2.

Wakelock: BTLowPower

Switching using Airplaine mode does temporarly fix this problem, but it comes back after some time...

vittogn
Visitor

The problem is still there also with the latest 23.4.A.1.232 lollipop version. I bought an other Z3 D6603 and old problems comes again! Quite bad actually.

Rickard
Master

I'm sorry to hear that.

Would it be possible for you to take logs from your phone and send them to me in a PM?

JackosXDA and i were in contact over PM trying to find the cause for this but turned out a master reset solved it before we got needed logs.

To take logs:
1. Settings > About phone > Build number, tap 7 times on the build number

2. Go back and select Developer options. Turn on "Enable Bluetooth HCI snoop logging" and turn on "USB debugging"

3. Turn Bluetooth OFF, turn Bluetooth ON (this is needed to enable the logging)

When there's been a battery drain for a while and before you restart the phone or connect a charger:

4. Settings > Developer options, select "Take bug report". When the report is ready you'll get a notification. Tap this and upload it to Google Drive.

5. With the File Commander app (or other File Manager) navigate to the file btsnoop_hci.log under internal storage and share this file to Google Drive.

6. Turn off the settings that was turned on in step 2. Turn Bluetooth OFF, turn Bluetooth ON

Please share the files on Google Drive and send me a link in a private message here on the forum.

vittogn
Visitor

Thanks for help.

I'm doing the test, I'll keep BT on for 5 minutes or so. In the folder I'll share you'll find two screenshot where you'll easily see that the two wakelocks (msm_serial_hs_dma - BTLowPower) will keep increasing whitout any BT devices connected.

Thanks.

vittogn
Visitor

I searched a bit for it.

It looks like that it is a missing binary in BT stack (sorry if it is not correct from a technical perspective).
The proposed fix is to add:

<bool name="config_bluetooth_adapter_quick_switch">false </bool>
to
overlay/frameworks/base/core/res/res/values/config.xml

Would you be so kind to do it? I have no idea about how to decompile and modify a system apk (or an apk in general!!).
It is likely that this issue is not affecting the most of users, or that some users did not discover it. I'm happy to test it, and if it works with no side effects, it could be helpful for everybody.

Thanks a million.


The process should be:
get /system/framework/framework-res.apk
decompile (using apktool?)
modify => add: <bool name="config_bluetooth_adapter_quick_switch">false </bool>
recompile
prepare update package zip
flash it using custom recovery

vittogn
Visitor

I did a bit of root causing and I found what is the possible cause.


Everything works fine till when my device with the BT on find a discoverable device (that is not paired with my phone). In my case a laptop.

When the phone sees it, the wakelocks start and don't stop till when I reboot.

After the reboot, if I'm in an area with no discoverable pc/devices the wakelocks go back to normal 15% - 20% (I'm connected with my watch).

Is there any way to stop BT for searching devices automatically and just stay paired with known devices?


Thanks again for support.

Rickard
Master

We have checked the logs you sent us (thanks!) and from what we can see, the cause for this is not your phone searching for devices. It's your laptop that knows the phones bluetooth address and keeps trying to connect to it (about every 10th second)

Try turning off your laptop or disable bluetooth in it and the wakelocks should go down even without restart of the phone.