yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] okij:
Thanks! :)

I didn't write any kmsg-logs so far, but I know of the instructions you made here. One question about this: Would it also be sufficient to create a log file with "cat /proc/kmsg" from within a Terminal Emulator window on the Defy, after invoking the "su" command? I could then copy the output to a text file or I guess it must also be possible to redirect the output with ">" to a text file.

I'm asking this because for some reason the Developer Options don't work on my Defy at the moment (of course I enabled them by tapping 7 times on the build number, but if I try to invoke them now, the Settings app force closes), so I cannot start ADB.

I've seen that Quarx made a commit to ehci-omap.c here on 2013-04-09, called "Make usb wakelocks quiet, need more tests". Could this be a starting point for further debugging?

It also seems that there are newer versions of ehci-omap.c, by a google search I found a version from 2013 here. Could this be useful for you? :fingers-crossed:

Just one more reason to get that beast running! ;)

BTW (since you are more in contact with Quarx than the rest of us) do you know what he is currently busy at? He hasn't been doing much on his GitHub recently, so it would be interesting for us to know if he e.g. got a BT headset and maybe is working on the BT issue. :)
[Defy Android Development] Blechd0se:
Yes of course, if you desire. It doesn't really matter how you get the log as long as you get it :)

If i remember correctly, i have proposed him this change. We had a discussion back then and i couldn't understand why they even

used those wakelocks there, but yeah it could be the culprit, i just wait for the log and try to fix it then, thanks! :)

Don't know if you guys know, but Quarx has a full time job :) I guess that says all. I am sure if he has time, he tries to fix everything as he can.

We are currently very busy with life and stuff. Some days ago he said he was able to fix the idle issue on the 3.0 kernel (big step for us, not for users

unfortunately!).

I know here are very talented people and i haven't seen that many kernel patches in that short amount of time from other people like Quarx or me.

So keep it up!

Btw, in case somebody is still interested in the aero control app, here is my new alpha version.
[Defy Android Development] juried:
I am running Slimbean (based on CM10.2), and I observe a steadily increasing memory hogging of the System UI. On reboot it starts out with say 20MB, then after a few days it can be over 100MB. I have seen it at 130MB. A reboot brings it back.I am using an app called RAM booster by anttek to show me memory usage.
[Defy Android Development] yodawg:
EHCI_PM - what does it do?

Probably dumb question: what does ehci_pm do? Sounds like powermanagement for usb, so I am wondering myself what the effects of removing this module would be? Not being able to charge while phone is on or will it cause the usb-controller to suck the battery even faster?

I mean, would removing be a temporary workaround (with small side-effects) or would it make things worse?

That's great, even for us users, I think. Maybe one day you guys will finally be able to run this motherf*cker on our beloved defys ;)

Btw thanks, I really enjoy your work (you means you, quarx and all the other contributors).
[Defy Android Development] justjr:
I can't upload videos to Instagram... since it released videos I try to upload, it always FC when it asks to choose a cover image.

I tried it lots of times with many builds, I'm always up to date.

Now I'm using Marcin CM10.2 build with latest kernel by slug and wpa_supplicant patch.
[Defy Android Development] Proverbs2:
trying to log data partition corruption

Ok, I tried the low battery shutdown experiment twice more this evening, and saved logs using the record feature of CatLog. After starting the recording in CatLog, I ran the Stability Test app until the phone powered off due to low battery.

On the first trial, there was no data corruption at all, or none that I could detect. The phone rebooted normally after I replaced the battery.

On the second trial, the phone got stuck at the Cyanogenmod boot animation, with the green LED light illuminated.

As on previous occasions, I was not able to restore a TWRP backup even after wiping data. I first had to format the data partition using the bootmenu file system tools, then I was able to restore the backup.

I had the phone in airplane mode during the first trial, but during the second trial (when the corruption occurred) both wifi and the cellular radio were on. I'm not sure whether that is related to the corruption error, though.

I've attached a log from the first trial (when there was no data corruption).

Unfortunately, CatLog failed to save a log file during the second trial, when the corruption occurred. Only an empty ".test" file was in the catlog folder on my SDcard. Apparently CatLog's record feature doesn't actually save the log until the recording ends, and the phone died before it had a chance to save the file.

Any other ideas for how I might try to capture the logs during a data-corrupting shutdown? I can't connect to the phone with a USB cable, or the battery will begin charging, and the phone won't shut down in the first place. Is there are way to prevent the battery from charging while connected by USB? Or perhaps there is another way to capture the logs using a different app on the phone itself?
[Defy Android Development] Hasuris:
This patch seems to be a major memorykiller. After applying it, my phone had a lot less free memory and became dead slow. Kingdom Rush Frontiers would crash right after launch. Without the patch I have ~140mb free at any time, 230mb if I kill all background processes (kingdom rush frontiers is quite playable then), with it less than 80 and killing processes achieves nothing. Don't know what process causes this, don't have time to look into it further now. I am on slimbean 4.3
[Defy Android Development] sevenrock:
Using a self-compiled ROM based on Quarx latest git rev I see > 200 MB RAM free with the patch in question, so wfm.
[Defy Android Development] atulclassic:
Memory always >200MB at any point of time with CM10.2 17.09 Quarx build

Using Greenified to hibernate background apps
[Defy Android Development] btwin:
Bluetooth breaks mic and earphone audio during calls

Hello, I'm running quarx 0917 cm10.2, upgraded from the latest cm10.

I recently found that activating bluetooth completely disables audio for telephony calls, either received or sent.

Are there any workarounds or patches to solve the issue without the need to do a system/data wipe and clean install?
[Defy Android Development] pasor1:
It's a Known bug. Switch OFF bluetooth and eventually reboot phone, solve this issue (in my case)
[Defy Android Development] atulclassic:
its a known issue but not like this.

Bluetooth tethering and bluetooth headset doesn't works as required.

Do a clean install again and this issue of yours will get resolved..no requirement of rebooting everytime.. :)
[Defy Android Development] hotdog125:
Actually it is a bug. If you enable bluetooth, you won't be able to hear anything in calls.
[Defy Android Development] atulclassic:
i have no such kinda issues..although i don't use bluetooth headset so never knew what happens actually with headset but direct calls have no problem
[Defy Android Development] btwin:
Forgot to mention that I don't have bluetooth headsets, I only use BT to connect my external gps device. The phone doesn't need to be paired with any other device to have the phone audio disabled and switching BT off doesn't solve the issue as the audio works again only _until_ BT is switched back on. It is not clear to me if this is a known bug still to be resolved, or if it is a known bug only for those who upgraded from a previous CM version without a clean install. If the latter is the case I'll likely stay with the bug, really don't want to wipe again the phone:)
[Defy Android Development] kapil_dheer:
Maybe you can switch on wifi, 3g, gps, torch alongwith stability test. All there put together will discharge more than charging.....then use Adb logcat on computer for logs.

---------- Post added at 09:27 PM ---------- Previous post was at 09:21 PM ----------

Or in terminal

su

adb logcat -vlong time >/mnt/sdcard/logcat.txt

This gives a constant recording without USB.
[Defy Android Development] Proverbs2:
Thanks! I'll give those ideas a try later, and report back if I'm able to capture a log during shutdown.

----------------------------------

Update: Both of those ideas worked well; I've been able to capture logs during low battery shutdowns. Surprisingly, however, I've been unable to reproduce the data corruption bug! I've tried to reproduce the bug by draining the battery to 0% six times since this last post. On three trials I captured logs using the ADB method, and on three more trials I used terminal emulator, but none of those six trials resulted in data corruption, so far as I can tell. I guess that's a good thing. I'll try again as soon as I have time.

Update 2: I tried 8 times to capture a log during a data-corrupting shutdown, and on the 8th trial I finally got it. See this post.
[Defy Android Development] syllogyking:
does anyone know why I sometimes receive 'hidden sender address, message not retrieved' in group MMS? I'm using quarx's 17/9 build.
[Defy Android Development] Lord_Flaya:
About the memory leak issue. I never experienced it, and i'm running an uptime of 40+ days now. I'd be happy to contribute with any information wanted or needed about config or logs if this in any way can help deeper understanding about this particular issue. However, I do not have that much knowledge of terminal or Linux-commands per say, so i'd need some instructions as how to attain these logs or whatever. :)
[Defy Android Development] okij:
kmsg-log for bug #13, "ehci_pm" is causing battery drain due to wakelocks

Last night, bug #13 occured again on my Defy+. As always, "ehci_pm" had produced an awful lot of wakelocks, this time almost 100000. :eek:

[MENTION=4855459]Blechd0se[/MENTION]: As requested, I wrote a kmsg-log after I noticed the bug this morning. :)

Since "cat /proc/kmsg > /sdcard/log.txt" didn't work for some reason, I just copied the full content of the terminal emulator window (where I already executed "cat /proc/kmsg") to the clipboard and pasted it into the attached "log.txt" file.

I hope that the kmsg-log helps in fixing this bug! :):fingers-crossed:
[Defy Android Development] Blechd0se:
Question: Do you have wifi enabled the hole time? Looks like ehci_pm doesn't cause this battery drain, its the wifi driver in kernel.

wakeup wake lock: wl1271_wake

You have tons of wakelocks from this device. Just turn off wifi during the night and everything should be ok. If ehci would really cause this,

we could have seen it in the logs :)

Btw; cat /proc/kmsg > /sdcard/log.txt does work, but it writes forever.I tried to explain this here. kmsg is a infinite stream, dmesg is a snapshot of this stream, so thats the command to use if you want to save

it in a .txt file.
[Defy Android Development] pasor1:
I found a new detail about data drops issue.

If I connect wi-fi to my router when mobile data are down, when I switch off wi-fi, mobile data become active. No need switch on and off airplane mode. (I'm on Quarx 17/9 without patch)
[Defy Android Development] okij:
Thanks for looking at the provided log file! :)

Yes, usually I have wifi enabled all the time when I'm at home. I'm using Wi-Fi Matic to let my Defy automatically switch on wifi when I come home and turn it off when I leave. :)

Hm, that would mean that I would have been right with my assumption I posted here and which I retracted again here because of the thousands of wakelocks that are reported by WakeLock Detector for "ehci_pm".

Please take a look at the two screenshots I attached:

Screenshot_2013-10-16-07-03-53.png was from this morning at 7 o'clock (it's the one I also already attached to my previous post) and shows 97565 wakelocks for ehci_pm.

In comparison, Screenshot_2013-10-16-01-07-19 was taken 6 hours before at 1 o'clock before I went to sleep (because I already had the feeling that the battery drain bug caught me again) and this one shows "just" 27173 wakelocks for ehci_pm.

So within 6 hours, ehci_pm produced more than 70000 wakelocks, while usually (before the battery drain bugs occurs) it behaves quite quiet, as you see on the second screenshot I posted here! :eek:

Well, that would just be a workaround for bug #13 (if it really works). Also rebooting my Defy every 1-2 days would be a workaround. But I really would prefer not to turn off wifi manually when I sleep, because the battery drain bug only occurs after a couple of days, so if it's really the wifi driver, something must be wrong with it. After a fresh reboot, wifi consumption absolutely is no problem for me at night, the total consumption of my Defy is <1% with wifi enabled at night. The bug occurs only after a couple of days (the bug last night was after about 3 days of uptime.)

I don't have a clue why it is shown by WakeLock Detector, but not listed in kmsg-log! :confused: Is it possible that the wifi hardware is also wired to the Defy via the USB interface (like the G2/G3-modem is AFAIK) so that this triggers the bug?

Might it even be that both the wifi driver and the USB driver have bugs which cause wakelocks?

Thanks for explanation! :)

I would be really happy if you could further investigate this bug! :) And if this bug is related to the wifi driver, it would be great if you could contact [MENTION=513620]Quarx[/MENTION] to have a look at his driver code for fixing the bug. Many thanks in advance! :);)
[Defy Android Development] Hasuris:
I tried to debug this some more: http://pastie.org/8405872

After boot I went straight to settings to see what processes are using all the memory. Right now I have 36mb available and settings crashed once cause my phone was out of memory. I can't pinpoint the process, that is using all the memory. All seems normal :eek:

For comparison my kmsg with the old "unfixed" kernel: http://pastie.org/8405913

Straight to settings/apps/active 144mb available
[Defy Android Development] bonedriven:
I can kinda confirm this with my experience (Last night, from 9:00pm my battery started to drop from 60% to zero this morning). It seems I have battery drops when wifi is on. I am not sure if it must be during night though. And it doesn't happen all the time. So maybe it's just that after a few days I need a reboot.

When it happens, it says "Android OS" used the battery.
[Defy Android Development] Blechd0se:
No need to bug Quarx with this, he fixed deep sleep with wifi enabled a long time ago, i know that the wifi code works.

I know that Android provides some wifi optimizations in settings, maybe you selected something wrong here?

I can also see that you wont enable airplane mode and your modem is enabled the hole time.

Its kind of normal that the ehci driver fires that many wakelock, since it needs

check for network updates and stuff.

I dont know how this app works, but it won't show you why it wont deep sleep.

The log tells us; its wifi in your case.

Also it could be fault of the crapy modem we use. The wifi driver is not

in the usb subsystem in the kernel, i dont know if there are any references.

If you know how to reproduce the bug

you can also try to get logs when this happens, maybe the wifi suspend fail

gets triggered from something earlier.

Does anybody have the exact same problem and different logs?

Don't use this. Use the terminal and enter "free" to see actual free ram.

Sent from my Nexus 4
[Defy Android Development] su8044:
I have the same problem, and i think it's even worse... Battery drain happens at all times, not only at night or when wifi is on or off. And it's the same Android OS app the responsible for this. Because of that, 2 days ago i was on the street and the battery lasted only 6 hours, so i was left with a 100% drained battery and my phone rebooted with the hated cyanogenmod loop. i rebooted again and it was magically repaired. On the next day i noticed i lost 3 apps :eek: yes, you read that right, 3 apps where no longer on my apps list, but somehow google play says they are still there and won't let me install them. Phone now doesn't get as hot from use as before the "happening" but i have 3 apps missing somewhere inside my phone.... and it still drains enough battery to power a small country.

Please explain to me how to get the log (step by step, i'm only beginning to understand linux and android) so i can also help with this issue. thanks for reading my rant
[Defy Android Development] atulclassic:
togglt airplane mode once every reboot..it will do it
[Defy Android Development] jountha:
I faced d same prob when i flashed for first time.... In few days i flashed once again and things are improved since then.
[Defy Android Development] Prowler:
Walter workaround for dialer work fine!, just copy to system/app and set rw r r permissions, then reboot.

As always, thanks to Quarx and BlechdOse.
[Defy Android Development] Sir Flashalot:
Nope. Upgraded from Quarx' CM10 4.1.2 and wiped Data/Cache before flashing this build. Paired my Sennheiser MM550 again and Bluetooth A2DP (Audio), AVRCP (Remote) and HFP (Calling/Mic) protocols working just fine. No audio stuttering when Wifi-n enabled. Need to test with ad-hoc wifi, which caused occasional A2DP stuttering on previous builds. Great!

Not sure. It's normal behavior for the Bluetooth A2DP profile to be disabled when FM Radio app is started, because it requires the wired headset to be attached to the Defy which functions as an antenna as well. Inserting this wired headset wired disables A2DP automatically, if I'm not mistaken, I never use FM Radio. On previous builds going back till CM7 as well as Moto stock, it's not possible to route FM Radio audio to Bluetooth headsets when a wired headset is attached, which is mandatory for radio to function.

- Edit: Indeed, BT cannot be enabled when FM radio app is running. When the wired headset is attached without FM Radio running, BT enables and connects just fine. When BT is enabled and connected to f.e. my PC together with wired headset attached, FM Radio messages "FM Radio is being launched, please wait" (for eternity). I guess this is a flaw in Android OS design, not for this build specific

Recording seems just fine, to my standards, but I never use it so I have no reference. Only the preview screen when recording lags when panning (moving horizontally), lagging is not visible when playing this recording (duration: 4 minutes) though.

Time will tell. Noticed memory usage has increased from 200MB in CM10 to 260-290MB in CM10.2 but haven't tweaked yet. In Android it's okay to utilize all available RAM memory at the cost of free memory. It's not M$ Windows.

Only a one second blanc screen delay, which is acceptable to me.
[Defy Android Development] shangjiyu:
how 2 change the call id

to show?it's always grey!
[Defy Android Development] justjr:
CallID option always gray hre too. Hate this.
[Defy Android Development] level_666:
Well don't use it then. This is for testing purposes.
[Defy Android Development] sdrawkcab3:
Bravo CM10.2

Just a heads up for interested parties, the Bravo (MB520) build will not boot and will not load recovery or bootmenu tools after it's been flashed.

(I know this is the defy thread, but Quarx builds for the Bravo, too and there's no CM10.2 Bravo thread.)
[Defy Android Development] vai0:
kernel 3.4.5 ?????
[Defy Android Development] justjr:
You so helpful
[Defy Android Development] kryzeK:
ISO setting in focal, where is it? Our device does not support or is it a bug in the app?
[Defy Android Development] HammDefy:
Locked Bootloader = no native Kernel 3.4

Gesendet von meinem MB526 mit Tapatalk 4 Beta
[Defy Android Development] s_u_n:
I came here just to check if someone has requested 4.3 for our good-old Defy, and here we are already 12 pages with a working ROM.

After upgrading to a lot of nightlies, and experiencing lags in 4.1.2, one day, my phone got stuck at the CM animation screen.

I had to wipe data (for the first time) and then install the latest build (June 16).

Ever since the phone is much better to use with no noticeable lag on 9/10 occasions.

With 3G ON, the phone does tend to slow down considerably most of the times, but what I learnt is that wiping of data really helps solve problems.

So, those upgrading to 4.3 may consider wiping data (along with cache and dalvik cache) to avoid potential problems.

I am hesitant to upgrade till an update to 4.3 comes out.

But great work and a great community!
[Defy Android Development] desihu:
downgrade

Im stuck with the dialer "Unknown" bug, and wanted to switch back to 10.1. Tried flashing 10.1 rom thrice but each time the phone got stuck on the CM logo.

any pointers to move back... till such basic issues are more bearable..?
[Defy Android Development] yogesh324:
do a complete with wipe with twrp or aroma wiper and just install the zip thats all
[Defy Android Development] Quarx:
Why no? Just 3.4 not available for omap3. We have 3.0.8, but many problems not easy to fix.

Locked bootloader not a problem.
[Defy Android Development] srijithn:
Wow Quarx.. JB 4.3 is ready and rocking., :good::good:

Phone.apk is inside the system.,.,but it doesnt get executed

Any incoming call even includes the Call origination with City/State/country.,

Unknown bug prevails - as CallerID is greyedout.,

Battery life seems to better than CM10.1 ., But not yet tried with full charge ., also there is 10%step battery .,

[MENTION=513620]Quarx[/MENTION] :

This thread includes the Dual Recovery zip which can help us flash CM10.2 into Defy... (it has CWM6 and TWRP) .,

@TJKV : can u include the basic gapps too on ur pack (gmail/talk/maps)

[MENTION=637170]desihu[/MENTION]

Try wipe data/cache/system then flash CM10.1 ., Also if stuck @ bootlogo., remove battery wait for few minutes then Switch on

haha., Quarx is so positive ., :good::good::good::good:
[Defy Android Development] TJKV:
I have a version with Talk for those who don't want to use the new Hangouts app. But the other apps are all available on the Play Store, I think it's better to download from there. They are also safe to restore using Titanium etc, so I don't think I should include them in the minimal gapps.
[Defy Android Development] cyrusct82:
No one noticed the new build???

01.08.2013 http://quarx2k.ru/cm10.2-nightly-defy+/cm-10.2-20130801-NIGHTLY-mb526.zip
[Defy Android Development] ccav2000:
Wel, I did, but I am not ready to test CM10.2 yet, especially since there is no easy way to revert back to CM10/CM10.1 since TWRP is not in this release.
[Defy Android Development] Quarx:
[MENTION=3344838]ccav2000[/MENTION], TWRP included in cm10.2...
[Defy Android Development] ccav2000:
It is? Ok then, I will consider testing it during the weekend. Still no official gapps unfortunately, but for the tests the minimal should do.

---------- Post added at 03:13 PM ---------- Previous post was at 03:08 PM ----------

By the way, I am curious about data connection, how it behaves in CM10.2? Works immediately or we will have the same problems we had with 10.1 before it was fixed? Anyone tested?
[Defy Android Development] su8044:
tried that several tiems, didn't work.

I have flashed so many times i lost count, and every time a new bug appears :crying:... i'll try flashing again this weekend and see how it goes.

---------------------------

Several users have reported battery drain, so even if i flash again maybe some bugs will disappear but battery drain is almost certain that will come back. I wanna help solve this bug, so please explain in detail how to make log files and what apps are you using to recollect data so that i can be of use
[Defy Android Development] juried:
I get the SystemUI steadily increasing its memory usage, keeps going and then the phone crashes and reboots.
[Defy Android Development] bonedriven:
OK. So my problem is very clear:

When wifi is on, battery is dying in a 10%/1h speed, disregard day or night.

Comsumption by "Android OS". If wifi is off, battery seems to last much much longer.