View Single Post
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#489
Could anyone please test this kernel and the bt on off 'scripts'? I don't have any BT devices here at the moment.

I enabled the BT sleep in the kernel, but it doesn't work correctly at the moment, the wakelocks are still there.

So, as a quick and also dirty hack, please create

bt-on.sh which should contain the follwing line:
Code:
echo 0 > /proc/bluetooth/sleep/lpm && dbus-send --system --print-reply --dest=net.connman /net/connman/technology/bluetooth net.connman.Technology.SetProperty string:"Powered" variant:boolean:true
and bt-off.sh with follwing line in it:
Code:
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/bluetooth net.connman.Technology.SetProperty string:"Powered" variant:boolean:false && echo 1 > /proc/bluetooth/sleep/lpm
Don't forget to chmod +x both files.

To use these scripts as user add
Code:
 chmod 666 /proc/bluetooth/sleep/lpm
to /init.hammerhead.rc in the bluetooth lpm section or execute the command after boot with devel-su.

The bt-off command should disable bluetooth and the wakelocks allowing the Nexus to enter suspend state.

bt-on starts bluetooth(and the wakelocks).

So bt-off should be executed after boot or put it in your rc.local or any script which gets executed after boot.

Would be nice if someone could report back if this works.

Suspend time can be checked with 'mcetool --get-suspend-stats' or SystemDataScope.

Kernel can be downloaded here.

Another method that works without flashing a kernel:

If you don't need bluetooth you could also disable bt completely with following command:
Code:
devel-su systemctl stop hciattach
This also stops the wakelock but bluetooth can not be enabled again until you reboot.

Last edited by mautz; 2017-01-27 at 21:21.
 

The Following 3 Users Say Thank You to mautz For This Useful Post: