yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] Blechd0se:
Yes thats why i havent pushed it yet. But i dont think that there will be that much problems, since i use the suspend/resume code of kernel and display is turned automatically on when someone phones you, of course i need to test it.

I didnt put my phone this time to charger and changed target_load to 80, deepsleep was working fine about 7 hours as it should, 300 and 600 are now relatively even in terms of time usage.

It is not usefull to let cpu jump between 300 and 600, that drains battery, its more battery friendly to let it on 600 and both freqs are nearly even in power consumption, i know that this a phone, thats why i make such patches :)

For simunlock problem; can you provide some logs? Maybe i can help :)
[Defy Android Development] airwolf1544:
Hi, i have updated a frieds defy from CM7 to this rom (11/05/13).

Everything works smooth, but i can't activate wifi.

Already tried to delete data/misc/wifi with no luck.

I already searched this thread, but i haven't found anything..

Could someone help? Is this a known bug?

Thanks
[Defy Android Development] mato_d007:
Sorry for the delay, it was sleeping time here. Attached a logcat. This problem occurs only when you use a diferent carrier´s sim, the phone boots normally when i use the original carrier sim, with the patch flashed. With a clean install without gapps i get a bootloop without reboot, a full install reboots before the red led turns off in the booting process (this log its from a clean install without gapps and with a non original carrier sim)
[Defy Android Development] Blechd0se:
Hmm there is only a problem with panic_daemon, btw you can tell logcat that it only should show Errors instead of full :)

Since interactive is causing this dmesg would be a nice addition, but if even boosted is causing this it lools like a random problem.

I will later post my code for suspend/resume here and maybe a zImage, so this development gets a little more transparent :)

And here is my code so far;

From a229da66667f84821faee0b59e64b2fff5913bd4 Mon Sep 17 00:00:00 2001
From: Blechd0se <alex.christ@hotmail.de>
Date: Mon, 13 May 2013 17:41:55 +0200
Subject: [PATCH] cpufreq: interactive: add suspend/resume code

If the display of the phone is off, it won't need
high frequencies, so we can limit it to the last one
and restore the old frequency if it resumes.

However this needs a rework, because sometimes
a higher freq is needed while the display is off.

Change-Id: Ia85f72d2d519773720d171e711c069d033657b02
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
---
drivers/cpufreq/cpufreq_interactive.c | 40 +++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 559aa00..332338a 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -29,6 +29,7 @@
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/input.h>
+#include <linux/earlysuspend.h>
#include <asm/cputime.h>

#define CREATE_TRACE_POINTS
@@ -86,6 +87,9 @@ static spinlock_t tune_cpumask_lock;
/* Consider IO as busy */
static unsigned long io_is_busy;

+/* History */
+static unsigned int last_freq;
+
static unsigned int sampling_periods;
static unsigned int history_load_index;
static unsigned int low_power_threshold;
@@ -188,6 +192,7 @@ static inline cputime64_t get_cpu_iowait_time(
{
u64 iowait_time = get_cpu_iowait_time_us(cpu, wall);

+
if (iowait_time == -1ULL)
return 0;

@@ -670,6 +675,36 @@ static int cpufreq_interactive_up_task(void *data)
return 0;
}

+static void interactive_early_suspend(struct early_suspend *handler)
+{
+	struct cpufreq_interactive_cpuinfo *pcpu;
+	unsigned int cpu;
+	pcpu = &per_cpu(cpuinfo, cpu);
+
+	/* Safe the last frequency, so we can restore it later */
+	last_freq = pcpu->target_freq;
+
+	/* Suspend */
+	pcpu->target_freq = pcpu->policy->min;
+
+}
+
+
+static void interactive_late_resume(struct early_suspend *handler)
+{
+	struct cpufreq_interactive_cpuinfo *pcpu;
+	unsigned int cpu;
+	pcpu = &per_cpu(cpuinfo, cpu);
+
+	/* Resume */
+	pcpu->target_freq = last_freq;
+}
+
+static struct early_suspend interactive_suspend = {
+	.suspend = interactive_early_suspend,
+	.resume = interactive_late_resume,
+};
+
static void cpufreq_interactive_freq_down(struct work_struct *work)
{
unsigned int cpu;
@@ -711,6 +746,11 @@ static void cpufreq_interactive_freq_down(struct work_struct *work)
pcpu->policy->cur);
pcpu->freq_change_time_in_iowait =
get_cpu_iowait_time(cpu, NULL);
+
+	last_freq = pcpu->target_freq;
+
+
+	register_early_suspend(&interactive_suspend);
}
}

--
1.8.0.3
[Defy Android Development] ccav2000:
OT: How come you still develop for the DEFY since you have a Nexus 4?
[Defy Android Development] Blechd0se:
Because i like developing for it, i like to work with Quarx and the community and because defy has a lot of potential even with a locked bootloader in my oppinion.

Simple as that :)
[Defy Android Development] ccav2000:
Thank you for your reply, I was just curious since Nexus 4 is so much more advanced hardware wise. I will keep my DEFY for a while longer, I bought its new battery just the past Christmas season. If Quarx really manages to backport ION it will really upgrade the experience a lot, provided that HWComposer will also work.
[Defy Android Development] mato_d007:
Sorry about that lazy logcat. Now i made tests with 4 governors: interactive, boosted, ondemand and smartass, only the last one succesfuly booted. Attached new logcats (with filter) and dmesg of each test.

PD: I found a workaroud a little weird. If i boot the rom (with the patch) for the first time with the non-original sim card i can make it work with interactive, but then if i change to the original sim and reboot (wich is suposed to work always) i get the same bootloops that should only be with the non-original sim card, things are inverted... So its like the patch allows you to use only the first sim no matter the carrier.
[Defy Android Development] Blechd0se:
E/WifiStateMachine( 1613): Failed to disable IPv6: java.lang.IllegalStateException: command '1 interface ipv6 wlan0 disable' failed with '400 1 Failed to change IPv6 state (No such file or directory)'

in logcat looks interesting and dmesg tells us even more;

<6>[ 40.715515] usb 1-3: new high speed USB device using ehci-omap and address 66

<3>[ 40.753265] usb 1-3: device descriptor read/8, error -71

<3>[ 40.894104] usb 1-3: device descriptor read/8, error -71

<3>[ 40.996795] hub 1-0:1.0: unable to enumerate USB device on port 3

<3>[ 40.998077] ehci: suspend failed!

The funny thing about your booting governor is this line:

<4>[ 21.039337] ------------[ cut here ]------------

<4>[ 21.039550] WARNING: at ../../../../../../jordan-kernel/lib/kref.c:43 kref_get+0x20/0x3c()

<4>[ 21.039642] Modules linked in: netmux netmux_linkdriver modem_pm_driver nls_utf8 cifs compat cfg80211 mac80211 wl12xx cpufreq_stats overclock_defy symsearch backlight

<4>[ 21.041168] [<c0038d70>] (unwind_backtrace+0x0/0xd8) from [<c0064fac>] (warn_slowpath_common+0x48/0x60)

<4>[ 21.041351] [<c0064fac>] (warn_slowpath_common+0x48/0x60) from [<c01ccee8>] (kref_get+0x20/0x3c)

<4>[ 21.041473] [<c01ccee8>] (kref_get+0x20/0x3c) from [<c020a3e0>] (tty_open+0x120/0x3f8)

<4>[ 21.041656] [<c020a3e0>] (tty_open+0x120/0x3f8) from [<c00c9ec4>] (chrdev_open+0x1ec/0x208)

<4>[ 21.041839] [<c00c9ec4>] (chrdev_open+0x1ec/0x208) from [<c00c53ac>] (__dentry_open+0x18c/0x2a4)

<4>[ 21.042022] [<c00c53ac>] (__dentry_open+0x18c/0x2a4) from [<c00c558c>] (nameidata_to_filp+0x44/0x58)

<4>[ 21.042114] [<c00c558c>] (nameidata_to_filp+0x44/0x58) from [<c00d2a24>] (do_filp_open+0x43c/0x830)

<4>[ 21.042297] [<c00d2a24>] (do_filp_open+0x43c/0x830) from [<c00c5144>] (do_sys_open+0x58/0x10c)

<4>[ 21.042480] [<c00c5144>] (do_sys_open+0x58/0x10c) from [<c0033f40>] (ret_fast_syscall+0x0/0x2c)

<4>[ 21.042663] ---[ end trace 9dfba9c0b20d2206 ]---

I assume thats not the fault of governor directly, but rather a problem in this patch? Does it really support 2ndboot kernels? Since a crashed ehci means no modem.

However, thats all i can read out of the logs, sorry for that :(
[Defy Android Development] mato_d007:
Im pretty sure its compatible since i have been using it on many 2nd-boot roms. Some did worked with the patch out of the box, and some others had problems with sio so changing to noop solved the issue. Only the latest 2-3 nightlys are having problems with interactive but they work with smartass and i remember one nightly that also worked with boosted. Its pretty random, sadly. Thanks for your help anyways.
[Defy Android Development] frozenwaverider:
Only the latest 2-3 nightlys are having problems

Could this be because of TWRP???

MB525 Red lense
[Defy Android Development] Antiga Prime:
Did that, several times; didn't fix anything.
[Defy Android Development] stickus:
Can't get baseband to stay installed

Love this ROM, great stuff. I'm having an issues however where I can't get the baseband to stick. I;ve been using the Baseband Switcher app, the device reboots, but the baseband defaults back to EU baseband (which won't allow me to connect to my North America provider). I've tried a number of things to resolve this, reflashed twice, tried 2nd-init app to restore CWM rather than TWRP, etc, etc. Anything else I should be doing in order to get working Baseband?

Edit: NM! Settings ---> Advanced ---> Baseband got me what I needed! YAY!
[Defy Android Development] leandeganis:
Can anybody tell me if this is working for you on latest build? it is for me.
[Defy Android Development] Antiga Prime:
Didn't work for me.
[Defy Android Development] MiC1337:
I'm experiencing no radio signal and stuck airplane mode.

i have an mb525 with CM10-20130217-NIGHTLY-mb526 rom mouted in.

will it be fixed with a newer version? thank you very much guys!
[Defy Android Development] defy_plus:
old build

last night I had 40% battery drain. How can I restore a backup? It doesn't see the backup
[Defy Android Development] zopeon:
Did you mount your sd-card in custom recovery?
[Defy Android Development] defy_plus:
it is mounted by default

dont you have this battery problem?

would factory reset help?
[Defy Android Development] Antiga Prime:
Was your backup done with CWM?? If so, it is not compatible with TWRP. If you really want to go back you can try flashing CWM:

http://forums.androidcentral.com/sprint-galaxy-s-iii-rooting-roms-hacks/235742-made-nandroid-cwm-switched-twrp-cant-restore.html
[Defy Android Development] Lamb17:
11/05 build works like charm for me

11/05 build works like charm for me

my hardware keys are back to normal

having no issues with wifi

no battery drain issues as well ...
[Defy Android Development] MiC1337:
I've made a fresh installation of 11/05 and 15/04 with the same result: process com.google.process.gapps stopped working/setup wizard stopped working... any ideas?
[Defy Android Development] Antiga Prime:
Which gapps are you flashing? Downloaded from where? Filename?
[Defy Android Development] MiC1337:
I've started with Defy-Gapps-CM10-20130326-without-Voice.zip which worked perfectly with a previous version of cm10.

then i gave it a shot with gapps-jb-20120726-minimal.zip..

after a consistent amount of wiping cache/data/dalvik and reinstalling Defy-Gapps-CM10-20130326-without-Voice.zip

i've manage to make it updating programs at the beginning, but still, asked me for pin and then again gapps/wizard error. when the screen locks i'm not able to get it on again, have to take out the battery and reboot...

i'm wondering if i have to go back to the previous version or somebody has a crack on this problem that had solved already...? thanks

edit: ok i finally had a breakthrough... after many many tries and combinations i wiped all the folders in the sd except the zip files i needed, mounted the cm-10.1-20130409-NIGHTLY-mb526 which is the 9-Apr rom (is it the most stable available?) and i had to look somewhere else for the gapps, cause i read back in the forum someone suggested to put 4.2.2 gapps with this newer versions of cm10.. i've found that here: http://d-h.st/users/ZordanKV/?fld_id=15433#files

and wizard finally worked. is that cause i wiped the folders? would that trick work aswell with the cm-10.1-20130511-NIGHTLY-mb526 (11-May)?

i was able to install CM10-20130217-NIGHTLY-mb526 (17-Feb) + Defy-Gapps-CM10-20130326-without-Voice.zip why doesn't that work on the newest ones?

is it safe now to upgrade from 9-Apr or will it crash like it happened from the 17-Feb to the 11-May?

Thank you in advance
[Defy Android Development] Feche:
Using latest nightly (11/5) the only problem is that the phone is only using 600mhz and 1000mhz, I am using Performance governor.
[Defy Android Development] leandeganis:
If you can, please also try changing in /system/build.prop this line:

ro.media.capture.classification=classE

To this line:

ro.media.capture.classification=classH

Apart of replacing the media_profiles and tell me if it worked after rebooting. Ty!

---------- Post added at 05:49 AM ---------- Previous post was at 04:52 AM ----------

About this last version, its working smoother than ever for me. Maybe because this is like a Performance governor, pretty much always at vsel4. However this new governor setting use much more battery... vsel1 must be used. On screen off should be good, with exceptions.
[Defy Android Development] roytam1:
same here with interactive governor, 800MHz is 0% in BBS
[Defy Android Development] androidtester80:
Same CPU problems for me too. I've switched to OnDemand and set max CPU to 800. The battery drain seems to have stopped.
[Defy Android Development] Pillepalle12:
Just had the same problem, not the SD Wipe did the trick, it was the 4.2.2 Gapps
[Defy Android Development] MiC1337:
oh thank you to make it clear! i was blaming myself for not trying the 4.1.2 gapps after the wipe to be sure.

but why a 4.1.2 rom needs 4.2.2 gapps to work? i still don't get it.. :(
[Defy Android Development] tombert.at:
Recovery

did the last nightly changed the recovery? Now the "custom recovery" start the TWRP and the "stock recovery" does not work - hangs up.

Also the TWRP gives an error during backup: "unable to locate /boot partition for backup". And - worst of all - it crashes randomly.

thx
[Defy Android Development] MiC1337:
the last 3 versions i guess i'm on the 09 Apr and it's the last one with the old recovery so far

edit: where have the dev controllers gone since the 17-Feb? loved them..

why is there a black stroke on the magnifier+google on the googlesearch bar now on the latest 2 roms? pretty ugly :(

is there any known fix for the latest build's video recording lagginess/noaudioattheend?
[Defy Android Development] leandeganis:
CAMERA Improvements (again)

I've posted some pages ago about camera improvements. Most of you said it didn't work. I think I've found the reason. I was missing a config on build.prop. Tested three defys (525 and 526) working well. Please tell me if they worked for you!! If not, I give up :confused: I leave you here the new instructions.

BRIEF: I've been testing some basic configs with my CM10. I've changed the media_profiles.xml & build.prop in order to record with better video quality (same size tough, 720p never worked) and better sound quality

without the sound bug

(end of videos not having sound). These are the best configs I could get.

I'm using the default camera app, and "Camera ICS" from market too, and my CPU is at 1050Mhz with 60 vSel. Using latest May2013 build, but also tested in the Jan2013 build. I have a Bayer 525 (redlense defy).

HOW? Unzip the attached file. With some file explorer like Root Explorer, put that file in /system/etc, replace the old one (backup first, just in case), and set owner to root/root, and permissions to rw- r-- r--, as any other file in the same folder.

Then, open the file "build.prop" located in /system with a text editor (you can use Root Explorer) and edit this line you'll find almost at the end of the file: "ro.media.capture.classification=classE" to "ro.media.capture.classification=classH". Be careful of not touching anything more on that file!

Now reboot your phone and try!

IN CASE OF FAILURE: If it's not working for you, after following those instructions, download and install Camera ICS https://play.google.com/store/apps/details?id=com.moblynx.cameraics (free ap from market), and disable hardware acceleration for it on HWA Settings. It should work now using that app.

Hope it helps! Tell me!

LeanDroid
[Defy Android Development] frozenwaverider:
Tried it, made a 7 min video, had usual stuttering but sound worked great right up to 6:48

Thats cool though as most of my videos are less than 5 mins

Will try again with overclock

Thank you for your work!

MB525 Red lense

Edit: Tested with OC 1200Mhz

Less stutter & sound the whole time(7:15)

Success! Well done, thank you again!!!
[Defy Android Development] leandeganis:
Thank you for testing! Glad it worked. :good:

About the stuttering [MENTION=322487]1000[/MENTION]mhz, it MAY be related to system (cpu, ram) load. Since I control each background process, and have my HWA disabled for almost everything but processes where it's necessary/better, I may have less ram usage and that may affect. That or any other setting, just guessing, since at 1050MHz/60vSel its working smooth here.
[Defy Android Development] frozenwaverider:
Hello, yes I agree, every ph is set up different which makes it so difficult for all you clever people to help us all out

I disabled HWA for everything but do have background tasks, data, bluetooth, 4 email accounts, Facebook, weather plus things like play store updates etc...

So I am happy that the video is better & very happy the sound is fixed :)

Keep up the great work!

MB525 Red lense
[Defy Android Development] toroloco73:
now i use the 7.2 on my defy+

but i want to return on cm10, because the 7.2 INMHO it'snt faster than cm10 like someone told me

3 week ago i used cm10, but someone told me that 7.2 was faster and no lagging, but it's true for me

do you think is better 0904 or the new 1105?
[Defy Android Development] lief.erl:
I am on the latest rom 11.05, android keyboard keeps crashing continuously. I can't type wifi password or login into google acc so that I can install third party keyboard. Anyone experiencing similar problem? Any solution?

Thanks
[Defy Android Development] slph:
lief.erl, reinstall gapps

Same here, but I've updated from 17.02.

I have green lense defy.

I did full wipe\factory reset.

Twice.

Then I've formatted /data and /cache from bootmenu.

Twice.

Still have insane drain on clean system (with only minimal gapps installed and no other apps)

Switching Wifi does nothing in this situation.

In nov-dec builds was exactly same problem only with green lensed Defy.

This commit caused battery drain in nov-dec builds, when it was reverted, batt drain gone from green lensed Defy.

My dmesg attached. This file already with some apps installed, because I've decided use this build 'as is' and charge every day :)

Btw, I have 250Mb free RAM in this build, instead of 120-100Mb in previous.
[Defy Android Development] leandeganis:
Same here, I have less RAM usage and the phone is working more smooth. However a big part of this last thing should be the governor. I didn't see the latest commits but at least there has been some changes in the minfrees at build.prop (at least compared with me previous version: Jan 2013)
[Defy Android Development] Shubhamqweasd:
hey quarx ,

I wasnt expecting this so soon :D ! great work !!!

btw , is hwcomposer implemented ?? or its still not possible for 2.6 kernel ?
[Defy Android Development] Quarx:
We now have hybrid kernel. In reality it's not 2.6.32 :p

ION/HWC not implemented yet, kernel contain support or ION, but can't be used for daily usage for now(ion don't want allocate memory). Just wait;)

Latest build should increase performance and make better memory usage...

Also contain Blechd0se patches for interactive gov.
[Defy Android Development] roytam1:
does 0516 build fix battery drain in 0511 build?
[Defy Android Development] ccav2000:
Quarx, are you going to release a 10.1 build too?
[Defy Android Development] Quarx:
I don't know about it... not tested so much time.

Yes, building :)
[Defy Android Development] Shubhamqweasd:
after trying the new build :

1. memory management is great , u can really feel the difference :D.

2. performance increase not that significant , but yes it has increased :D

overall : build can be used , i mean no drawback as such for an experimental build :D

---------- Post added at 04:49 PM ---------- Previous post was at 04:40 PM ----------

quarx , do you advice to turn KSM and zRAM On ?

or it will be good enough with the new kernel ?
[Defy Android Development] Quarx:
Should work without zRAM.

KSM can be enabled, but it can be little affect on performance.
[Defy Android Development] BlazeReborn:
I'm downloading this ROM and minimal Gapps.

Any other things I should download? (kernels, patches, etc).

Will post again with feedback.
[Defy Android Development] pawelsz:
automatic locking up phone is not working
[Defy Android Development] BlazeReborn:
It's working here. Are you using the latest build?

[MENTION=777193]thread[/MENTION]

So far so good, people.

Battery is draining heavily, but it's because I've been using my phone constantly for about 1 hour at 1000 MHz (restoring backups, downloading apps, etc). I noticed my phone is heating way less now, and I could notice an increase in performance. This is a great sign: I lost a battery unit thanks to overheating.

CPU stats bug has been fixed, now I can monitor my processor properly now. Probably been fixed a while ago though.

Wi-Fi is stable and not slow at all. Didn't test 3G/mobile data yet: I'm at work and I don't get my carrier's signal here. Will do once I'm in college.

It seems the phone is entering deep sleep, but I didn't have the chance to test it yet. Will let the phone rest now and see if DS is active.

Overall this is a nice build, stable and way more efficient than my previous one. I'm LOVING this build so far. Thanks Quarx! =D

Running this on a MB525, red lens,

EDIT:

Just found an issue: the default file manager can't open folders with a large quantity of files. My music folder has over 1000 songs in it and I can't open it (operation timed out).

Any other file manager works perfectly though, just thought I'd let the devs know.
[Defy Android Development] paulle:
downloaded and installed, at the first glance everything seems to work.
[Defy Android Development] pranks1989:
Hi guys anyone here could get DLNA or UpnP to work? Or may be knows a way?

@Quarx: If I understand it correctly a fix directly in the source is required for this right?!

Issue: Internet connectivity unavailable after activating any DLNA or UpnP app..!
[Defy Android Development] sebx_g1:
Is default keyboard bug fixed ? How is speed of 22/07 build - comparable to Epsylon 20/07 build ? Do the rom still sometimes gives bootloops on green lens Defy ?
[Defy Android Development] adi4motion:
+1

10char
[Defy Android Development] trikpa:
when installing a fresh 2207, it doesn't ask me all that google crap about circles and stuff and most imoprtant, it doesn't restore my google play apps...
[Defy Android Development] joydeep1985:
Well there is a bug in music player apollo. Play any song on apollo or stock music play(google player) and turn off the phone from top . It would respond anymore. It responds after a long time . U cant turn on the phone neither the power button responds..
[Defy Android Development] marhensa:
no..

not just in apollo..

in youtube also the same,

volume control didn't change the sound volume too..

but it seems poweramp didn't face this problem.

that's not ultra fast bug, it's a feature :)

you can notice it does really works wiping the cache,

after wiping cache, there's long waiting "android is upgrading" after a boot,

which mean it re-creates the cache.
[Defy Android Development] AlexGraves:
Yes, confirmed that Volume is still responding normally with Poweramp.

Sent from my MB525