5,600,335 Members 34,989 Now Online
XDA Developers Android and Mobile Development Forum

[Kernelpatch][25.03.2011] Bluetooth battery drain fix

Tip us?
 
trilu
Old
(Last edited by trilu; 26th March 2011 at 10:06 AM.)
#1  
Member - OP
Thanks Meter 110
Posts: 68
Join Date: Apr 2008
Location: munich

 
DONATE TO ME
Talking [Kernelpatch][25.03.2011] Bluetooth battery drain fix

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, 732 views)
File Type: zip patch.zip - [Click for QR Code] (3.0 KB, 699 views)
File Type: zip source.zip - [Click for QR Code] (24.0 KB, 310 views)
The Following 76 Users Say Thank You to trilu For This Useful Post: [ Click to Expand ]
 
arifqur
Old
#2  
Senior Member
Thanks Meter 239
Posts: 1,598
Join Date: Nov 2005
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?
 
silverbluem
Old
#3  
Senior Member
Thanks Meter 22
Posts: 184
Join Date: Feb 2010
ohohohohohoooooho!!!1
super man!! many many thanks
will try it now!
The Following User Says Thank You to silverbluem For This Useful Post: [ Click to Expand ]
 
seadersn
Old
#4  
seadersn's Avatar
Recognized Developer
Thanks Meter 1797
Posts: 2,436
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by silverbluem View Post
ohohohohohoooooho!!!1
super man!! many many thanks
will try it now!
pls report
ClockworkMod Recovery, latest version, completely working, "stock" & AdvWipe v2.0

CyanogenMod 10.1 SE ROM

"If one person has an imaginary friend, they're crazy. If multiple people have the same imaginary friend, it's religion."
 
trilu
Old
#5  
Member - OP
Thanks Meter 110
Posts: 68
Join Date: Apr 2008
Location: munich

 
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: [ Click to Expand ]
 
mponte
Old
#6  
mponte's Avatar
Senior Member
Thanks Meter 38
Posts: 210
Join Date: May 2008
Location: A Coruņa
can anybody build a boot.img to flash via cwm?
 
seadersn
Old
#7  
seadersn's Avatar
Recognized Developer
Thanks Meter 1797
Posts: 2,436
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by mponte View Post
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, 1882 views)
ClockworkMod Recovery, latest version, completely working, "stock" & AdvWipe v2.0

CyanogenMod 10.1 SE ROM

"If one person has an imaginary friend, they're crazy. If multiple people have the same imaginary friend, it's religion."
The Following 10 Users Say Thank You to seadersn For This Useful Post: [ Click to Expand ]
 
mponte
Old
(Last edited by mponte; 25th March 2011 at 12:10 PM.) Reason: add P.S.
#8  
mponte's Avatar
Senior Member
Thanks Meter 38
Posts: 210
Join Date: May 2008
Location: A Coruņa
Quote:
Originally Posted by seadersn View Post
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
 
seadersn
Old
#9  
seadersn's Avatar
Recognized Developer
Thanks Meter 1797
Posts: 2,436
Join Date: Nov 2010

 
DONATE TO ME
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).
ClockworkMod Recovery, latest version, completely working, "stock" & AdvWipe v2.0

CyanogenMod 10.1 SE ROM

"If one person has an imaginary friend, they're crazy. If multiple people have the same imaginary friend, it's religion."
 
silverbluem
Old
#10  
Senior Member
Thanks Meter 22
Posts: 184
Join Date: Feb 2010
Works like a charm!! On hyperdroid cm7
thanks!!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes