Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Kernelpatch][25.03.2011] Bluetooth battery drain fix

OP trilu

25th March 2011, 12:14 PM   |  #1  
OP Member
Flag munich
Thanks Meter: 110
 
68 posts
Join Date:Joined: Apr 2008
Donate to Me
Hi all,

i think i have fixed the ugly bluetooth battery drain bug.
It works for me since yesterday evening. Battery drain is between 2ma and 5ma with GSM and BT enabled. Also the headset in my car works very well.

Base for my work was tytungs kernel git - i think it was v8, but not sure...
In this post you will find a patch file, the compiled kernel and the source files i have modified. I'm a absolutly beginner with compiling linux, so i am not sure that the patch file will work, diff has a realy big manual

http://gitorious.org/~tytung/linux-o...x_on_wince_htc

Also i am not sure how this kernel will work with Sense roms, because Sense use btld which has the power saving features in the binary and not in the kernel.

Last but not least i will thank Charansingh for the work he has done on the BT problem and tytung for his kernel base.

If you like to test the kernel, please take also my modules, because i get with the precompiled files from tytung a version magic error.
Your feedback is highly appreciated.

Best regards
trilu


In this Post you will find the zip file for updating magldr
http://forum.xda-developers.com/show...73&postcount=7

Here you find the zip file for updating clk
http://forum.xda-developers.com/show...5&postcount=34



Just found another point to save 3 to 5ma more
I installed Typhoons CM7 Image and was wondering why me drain in standby was 7 to 10ma with BT enabled.
Yesterday with Charansingh's nightly it was arround 3 to 5ma.

The solution is to set the low power flag on brcm_patchram_plus in init.rc
service hciattach /system/bin/brcm_patchram_plus --enable_lpm --enable_hci \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0

Also seen that in a lot of images hciattach service is set in init.rc and init.htcleo.rc
In my experience the hciattach service should start only in init.rc, before bluetoothd service.
Attached Files
File Type: zip kernel.zip - [Click for QR Code] (2.50 MB, 733 views)
File Type: zip patch.zip - [Click for QR Code] (3.0 KB, 703 views)
File Type: zip source.zip - [Click for QR Code] (24.0 KB, 311 views)
Last edited by trilu; 26th March 2011 at 11:06 AM.
The Following 76 Users Say Thank You to trilu For This Useful Post: [ View ]
25th March 2011, 12:24 PM   |  #2  
Senior Member
Thanks Meter: 335
 
1,845 posts
Join Date:Joined: Nov 2005
More
Wow!
Thank God for this.
Finally and hopefully this matter is solved.
Which Rom have you tested this kernel with?
Can I use the latest Tween's Rom?
25th March 2011, 12:25 PM   |  #3  
Senior Member
Thanks Meter: 22
 
184 posts
Join Date:Joined: Feb 2010
More
ohohohohohoooooho!!!1
super man!! many many thanks
will try it now!
The Following User Says Thank You to silverbluem For This Useful Post: [ View ]
25th March 2011, 12:30 PM   |  #4  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,859
 
2,635 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by silverbluem

ohohohohohoooooho!!!1
super man!! many many thanks
will try it now!

pls report
25th March 2011, 12:37 PM   |  #5  
OP Member
Flag munich
Thanks Meter: 110
 
68 posts
Join Date:Joined: Apr 2008
Donate to Me
I've tested with Charansingh CM7 nightly - but it should work with every rom which uses tytungs kernel v8 and is Gingerbread.
As mentioned, feedback for Froyo and Sense is welcome...
The Following 4 Users Say Thank You to trilu For This Useful Post: [ View ]
25th March 2011, 12:45 PM   |  #6  
mponte's Avatar
Senior Member
Flag A Coruņa
Thanks Meter: 38
 
210 posts
Join Date:Joined: May 2008
More
can anybody build a boot.img to flash via cwm?
25th March 2011, 12:54 PM   |  #7  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,859
 
2,635 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by mponte

can anybody build a boot.img to flash via cwm?

here you are magldr version; for cLK use fastboot flash:raw command. (you'll need your own initrd.gz or the one delivered with build).
Attached Files
File Type: zip bt_kernel_patch.zip - [Click for QR Code] (2.81 MB, 1883 views)
The Following 10 Users Say Thank You to seadersn For This Useful Post: [ View ]
25th March 2011, 01:04 PM   |  #8  
mponte's Avatar
Senior Member
Flag A Coruņa
Thanks Meter: 38
 
210 posts
Join Date:Joined: May 2008
More
Quote:
Originally Posted by seadersn

here you are magldr version; for cLK use fastboot flash:raw command. (you'll need your own initrd.gz or the one delivered with build).

i got cLK in Typhoon 2.8.0.
kernel is on a boot.img file to flash. can i only flash this file with cwm as is?
as i see the updater-script only updates the zImage file and modules

P.S.
what's about this?
Code:
package_extract_dir("boot", "/boot");
there is no boot folder, only zImage file
Last edited by mponte; 25th March 2011 at 01:10 PM. Reason: add P.S.
25th March 2011, 01:09 PM   |  #9  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,859
 
2,635 posts
Join Date:Joined: Nov 2010
cLK version doesn't exist for now. i will make one, but this will take roundabout 4-6 hours, as i have to sleep a little bit now (only two hours the last 24h).
25th March 2011, 01:21 PM   |  #10  
Senior Member
Thanks Meter: 22
 
184 posts
Join Date:Joined: Feb 2010
More
Works like a charm!! On hyperdroid cm7
thanks!!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes