FORUMS

Analysis & Opinion

Top Forum Discussions

[Kernelpatch][25.03.2011] Bluetooth battery drain fix

68 posts
Thanks Meter: 110
 
By trilu, Member on 25th March 2011, 11:14 AM
Post Reply Subscribe to Thread Email Thread
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, 741 views)
File Type: zip patch.zip - [Click for QR Code] (3.0 KB, 707 views)
File Type: zip source.zip - [Click for QR Code] (24.0 KB, 311 views)
Last edited by trilu; 26th March 2011 at 10:06 AM.
The Following 76 Users Say Thank You to trilu For This Useful Post: [ View ]
 
 
25th March 2011, 11:24 AM |#2  
Senior Member
Thanks Meter: 421
 
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, 11:25 AM |#3  
Senior Member
Thanks Meter: 22
 
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, 11:30 AM |#4  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,889
 
More
Quote:
Originally Posted by silverbluem

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

pls report
25th March 2011, 11:37 AM |#5  
OP Member
Flag munich
Thanks Meter: 110
 
Donate to Me
More
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, 11:45 AM |#6  
mponte's Avatar
Senior Member
Flag A Coruņa
Thanks Meter: 38
 
More
can anybody build a boot.img to flash via cwm?
25th March 2011, 11:54 AM |#7  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,889
 
More
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, 1885 views)
The Following 10 Users Say Thank You to seadersn For This Useful Post: [ View ]
25th March 2011, 12:04 PM |#8  
mponte's Avatar
Senior Member
Flag A Coruņa
Thanks Meter: 38
 
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 12:10 PM. Reason: add P.S.
25th March 2011, 12:09 PM |#9  
seadersn's Avatar
Recognized Developer
Thanks Meter: 1,889
 
More
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, 12:21 PM |#10  
Senior Member
Thanks Meter: 22
 
More
Works like a charm!! On hyperdroid cm7
thanks!!
25th March 2011, 12:38 PM |#11  
OP Member
Flag munich
Thanks Meter: 110
 
Donate to Me
More
how can i build a boot.img file for clk?

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

Advanced Search
Display Modes