yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] Blechd0se:
Good point, but when i say OS i mean the kernel (in fact the ext4 driver). You can force it with the command i posted earlier;

fstrim -v /data

for example. Just run this in your terminal and wait (it took around 3-5 Minutes with 300 mb on /data for me).

Android 4.3 does actually a quite good job here, because there is some logic when trim gets called (just google it Android only calls it if some conditions are true), but with my ramdisk change users dont have to worry about it on 4.2/4.1 and can just use their device.

If you dont like it at all, then dont use my ramdisk. I never thought trim was even possible on our 2.6.32 kernel :)

Send from my Nexus 4
[Defy Android Development] ccav2000:
I did try that command already, but I do not seem to have such a command! All I get is "sh: fstrim: Not found"
[Defy Android Development] Blechd0se:
Hmm dont know, maybe busybox is not updated?

As i said i am using 4.2 and every works flawlessly.

I am using adb to execute this and it just works :/

Send from my Nexus 4
[Defy Android Development] ccav2000:
Could be. Some people, like this blog post https://patrick-nagel.net/blog/archives/337 claim that the discard option can make I/O a lot slower. I guess it depends on our controller.
[Defy Android Development] TJKV:
Again, what changes in ramdisk? :)
[Defy Android Development] ccav2000:
Did some more trials with the latest [MENTION=4855459]Blechd0se[/MENTION]'s kernel, my consistent issue is that the device freezes when in deep sleep if discard is enabled. If I keep it on the charger, that prevents deep sleep and it remains operational.
[Defy Android Development] overclockthesun:
Tried the kernel, it works fine here on MIUI 3.8.23. No more random reboots with and ext4 app partition or random reboots with swap partition.

Quite fast. However, entered this in terminal

fstrim -v /data and ....nothing ..... it says /bin/sh fstrim not found ?????

Any ideas why. Lagfix never worked on Defy for the same reason.
[Defy Android Development] cyrusct82:
I'm confirming this.

I cannot confirm this.

4h with this kernel on CM10 and no problems. Installed without wipes.
[Defy Android Development] ccav2000:
I wonder if it's hardware related. My DEFY is an old MB525 with green lens, probably the very first version. Could be it has an older controller and that may cause the freezes? Just a hypothesis.
[Defy Android Development] kapil_dheer:
The command works flawlessly here.
[Defy Android Development] ccav2000:
You have busybox 1.21, on CM10 I have 1.20.2. I guess that's the difference.
[Defy Android Development] niksy+:
That's ~164 megabytes of data :eek: That sounds like A LOT! This trimming business should've been implemented earlier in Android, imho! :silly:
[Defy Android Development] Arathon:
First of all Thanks for your awesome work, second i found the culprit the problem was with a setting in the app GreenPower which give the possibility to manage the connection (making it remains active) when certain apps are running, the app will check if the desired one is running every 10 seconds.

I'm certain that this is the culprit of the problem after some test running the phone without greenpower on(worked flawlessly) then trying one setting at a time and it freezes when i enable the manage app option. Why this happens i don't know and don't even know if it's a bug form our kernel or the app is in fault. If you need any other logs ask for it.
[Defy Android Development] overclockthesun:
Another update. Fstrim does not work on MIUI v3.8.30. The rom becomes epic stable and fast with this kernel though!!!!! :victory::victory::victory:

Unfortunately, This kills WIFI on miui. If you need testing in this regard let me know. I am running miui. [MENTION=221788]Blechdose[/MENTION] thanks a lot for your work.
[Defy Android Development] frozenwaverider:
Works on CM10(sunnyqeen unofficial complie) for me, so far it's v stable

I haven't enabled swap or anything else yet?

Trim works great! Although don't try on SYSTEM, causes many FC's!

Thank you [MENTION=4855459]Blechd0se[/MENTION], LEGEND!

MB525 Red lense

Edit, just enabled KSM and zRam 18% so I can test...

Edit 2, within 5 minutes I had a random reboot, disabled KSM and zRam but system sill not stable, I'm going to wipe caches, hopefully that will get me stable again, if that doesn't work I'll reflash old kernel then new one, fingers crossed, oh, no data loss, so that is great ;)

Edit 3, did wipes, reboot... bootloop with red light flashing, pulled battery, bootloop green light solid on, pulled battery, flashed older kernel, restarted but 1/2 factory reset, about 1/2 apps & settings lost, data wipe, reinstalling now

Hope no one else has this, lucky I have a backup from last week

Finally up & running again, loving this new kernel & TRIM but I won't enable zRam or KSM again in a hurry ;)
[Defy Android Development] fairxda:
Deleted. Wrong forum.
[Defy Android Development] TJKV:
Well that number is just the MAXIMUM number of bytes/pages that can be marked as empty, but the amount of space actually marked as empty is probably much lesser. So that number that is outputted might be considered the total free space in your /data partition, which depends simply on the number and size of your apps.

http://man7.org/linux/man-pages/man8/fstrim.8.html

(And no I didn't know this from before, i only googled it after seeing your comment. http://xkcd.com/903/)

EDIT: Anyone knows a good storage bechmark app for Android? I used AndroBench on /data but it seems to be giving insane results:

18.89MB/s Sequential Read (Might be correct, not sure)

79.33MB/s Sequential Write (Higher than the Transformer Pad, Nexus 4, Galaxy Note, just below Note II)

0.85 MB/s Random Read (Entirely believeable)

121.93MB/s Random Write (Higher than any other device in the AndroBench results, including HTC One, S4 etc. Only lower than Transformer Prime.)

I even raised the file size used in testing to 50 and then 100MB, not much difference @_@

Okay I compared your ramdisk with SB's, saw where the discard option goes. But the discard option is not necessary to be able to run the fstrim command on your latest kernel right? I'm asking because I already flashed a ramdisk with the discard option so I cannot test it myself without reverting :P

And the first two times I ran it, the phone hung, similar to a kernel panic on Ubuntu on my laptop. No data lost though, so I tried it a third time and it ran just fine. So just confirming what you said about kpanics :P

Also I'm testing everything in that list of changes from you that I had sent you. GPU Control doesn't seem to be working. /kernel/gpu_control/gpu_control_active is 1 but entering "echo 2200 > /sys/kernel/gpu_control/max_freq" makes this pop up in kmsg: "<4>[17238.291351] GPU clock changed to: 200 MHz"
[Defy Android Development] overclockthesun:
Well, I flashed cm10.1 to try out the Fstrim option.

Ran fstrim -v /data of course as su, and .... :( it just remains there.... nothing and then after around 2 mins, my phone just reboots abruptly.
[Defy Android Development] ccav2000:
Although I cannot be sure, I suspect you're in the same boat as me, with possible hardware limitation. The DEFY was never designed with TRIM as an option, so none of us can be sure what kind of memory controller it has, and if it's the same for all production batches. More user testing is required.

By the way, witch model do you have, MB525 or MB526?
[Defy Android Development] HammDefy:
Installed new cm10 Kernel: Booted fine. After activating swap and waiting 5 minutes my Defy had a Data Loss and Boot Loop. Installing Rom -> again Boot Loop with corrupted recovery. Had to start over from sbf..... :(

I think I'll test another Rom, propably Kayant's PA...

Sry, I'll post this to cm10-Threat...
[Defy Android Development] hotdog125:
The fstrim command gave reboot in the first 2 times, and then worked. Random FCs are there, but the again it's experimental.
[Defy Android Development] Blechd0se:
Just a few statements. Thanks for the feedback so far!

[MENTION=4883523]fairxda[/MENTION]

I checked your logs. There is nothing really to worry about (although thats normal since a reboot happened).

The only line that scares me is;

<6>[ 11.452423] e2fsck: userdata: ***** FILE SYSTEM WAS MODIFIED *****

Thank you anyway, are there some steps how i can reproduce this problem? Because then i could actually see the kernel

log at reboot :)

[MENTION=4194521]overclockthesun[/MENTION] and [MENTION=3344838]ccav2000[/MENTION]

That screenshot is quite scary, because it either means something goes really wrong or (and this is more likely) trim is not

supported by your memory controller. This explains that it won't work, but not the reboots.

Although i can't believe this, since Defy(+)'s hardware should be exactly the same except for camera and battery.

I can't even explain why motorola should enable it for some devices and for some not.

[MENTION=4148153]TJKV[/MENTION]

Thanks for the benchmarks! Especially in this case i am also using AndroBench and noticed very small improvements

for /data.

No discard is only a mount option for ext4, has nothing to do with fstrim command.

If you can, grep me exactly that kpanic with adb enabled.

Yes overclocking doesn't work at the moment, only a few frequencies work at all, need to fix that (its on my todo list) :)

[MENTION=4998126]frozenwaverider[/MENTION]

If i might recommend you something; don't touch anything. If you have the needs enable zram, but let everything as it ships.

I try to produce a kernel with "just flash and forget"-philosophie while giving all options for tweaking to advanced users :)

I might go through some upstream commits, maybe i missed something, but its strange that some users nearly have 0

problems and others have to go SBF. Maybe i should revert the changes to the ramdisk, but thats somehow against the just flash thing :(

Another thing where i could need your help (just a suggestion);

Some users pm'ed me about an idea. We should have a central place where all this bug reports/features/requests/other stuff

should be collected, like a thread only for this kind of topics. This shouldn't be done directly by me, because i have a totally

different point of view. I also thought about writing my own bugtracker, but we are a community. Can we make this happen?
[Defy Android Development] TJKV:
Hmm too late, it already works fine on my MB526 so probably no klogs for you :P

But I will try it with my dad's MB525 and let you know within a week hopefully.

But trim will be useful only after prolonged usage (weeks/months) without a data wipe right?

About the graphics, ah okay :)

About discard, then I can add it to system_core as a "stable/non experimental" change?

What about the Github issue tracker? But you push directly to Quarx's account, I see you don't use your kernel branch any more...
[Defy Android Development] ccav2000:
This is only my personal opinion, but using discard on stable builds is premature at best. I had severe problems with it, and I think I won't be alone. For now not enough users have installed this to have a good sample, but it seems at least one has a problematic memory controller and can't use trim.
[Defy Android Development] fairxda:
Hmmmpff. Maybe I don't remember all what happened.

The first reboot was beginning with the cyanogenmodlogo, then I had one reboot beginning with the motorola logo.

I was looking with logcat if something looks strange so far as I can see that.

Then - Logcat runs further in the background - I run Cpu Spy Reborn to see how much time deepsleep was running

and then happens the first reboot.

After the defy+ booted again I started after 3-4 min. a terminal, then immediately the second reboot happens.

With SetVsel I had changed 300 to 25, 600 to 35, 900 to 50 and 1100 to 60.

More I can't say.

Edit: Oh, I remember a short time before the first reboot I tried successfully "fstrim -v /data". After that I ran logcat ... see above ...
[Defy Android Development] Proverbs2:
The fstrim command works perfectly here, and I have one of the earliest DEFYs made, I think. (I bought it from someone who had won it on the Oprah show back in September 2010, a couple of weeks before the phone's initial release.)

By the way, I've been using the 31.08-cm10.1 kernel (on Quarx's 09.07.13 build) for several days with KSM and zRam 26%. No problems so far; everything seems fast and stable. (I haven't tried draining the battery to test the data corruption problem, though.)

Thanks again, Blechd0se!
[Defy Android Development] overclockthesun:
[MENTION=4855459]Blechd0se[/MENTION] I wonder if this will help. i have a 32 gb sd card. I have an ext4 partition for link2sd and another 512 mb for Linux Swap.

I don't know why but random reboots seems to be a norm. Am gonna reflash the card only with fat32 this time around. If the reboots stop then it is obviously something else. If not, then the card could be spoilt.

Also the kernel just won't show up in about phone dialog. I have to flash after another reboot only then it works.

Maybe once the script detects and ext4 and a linux swap parition, it gets screwed?? maybe it gets confused or something with regards to what to fstrim ...even though I gavae it the /data directory to trim.

---------- Post added 3rd September 2013 at 12:12 AM ---------- Previous post was 2nd September 2013 at 11:56 PM ----------

MB525 late July 2011 model with Green but Bayer Module. I can run any Defy+ rom without losing my cam or other complications.
[Defy Android Development] ccav2000:
I see. Mine is bought at 22/01/2011. I still have its box and the receipt. It's a MB525 with SOC module, but I flashed it last year with a DEFY+ Gingerbread SBF, solved a random reboot problem I had at the time, so I can't go back to a rom that's not a 2ndboot ROM without losing camera.
[Defy Android Development] okij:
[MENTION=4855459]Blechd0se[/MENTION]: I also get the same "FITRIM: Not a typewriter" error that [MENTION=4194521]overclockthesun[/MENTION] got when trying to use the fstrim command.

But in comparison I'm using a MB526 Defy+, bought in spring 2012 and my 32 gb SD card has just one single FAT32 partition.

So if there really are differences in the memory controllers, maybe rather the newer Defy's are affected by not working trim!? :confused:

Personally I'd vote for dropping the trim support in the kernel/ramdisk again, or at least make it somehow optional, because (at least so far) there are too many severe problems with it. :)
[Defy Android Development] overclockthesun:
Oh no lets not do that. TRIM is a step forward and a right one at that which [MENTION=4855459]Blechd0se[/MENTION] has taken. I had been asking all over XDA and MIUI if there was anyway that we could use trim on versions lower than 4.3 and Blech has done it! We just need to keep on trying till we figure it out

I will flash a gingerbread Fixed Sbf and then try again with this rom.
[Defy Android Development] atulclassic:
deep sleep issue

what should i do to make it enter deep sleep..facing huge battery drain @ 5% per hour
[Defy Android Development] overclockthesun:
build.prop tweak. works for me.
[Defy Android Development] atulclassic:
pls guide..how to and what values
[Defy Android Development] hotdog125:
I think 2 of the issues on the CM10.1 to-do list are fixed (my opinion after reading through) and it might be time to remove them from the the to-do list - delay on wakeup and memory leak. Delay is still there on wakeup though it is not much.
[Defy Android Development] Antiga Prime:
IMO, memory leak is not fixed. Just watch the size of "system_server" grow (and sometimes "systemUi"), and keep growing, after a few days. A hotboot fixes this, but ideally it shouldn't be necessary.
[Defy Android Development] hotdog125:
Fortunately unlike before, where the system became unusable after about 5-6 days, now I could use the phone smoothly with about 200mb RAM (that's what the settings app shows) for about 270 hours of uptime before I rebooted for flashing a new kernel by Blechd0se. It might not be fixed fully (I agree with you), but it's better than before.:)
[Defy Android Development] Lord_Flaya:
I have never experienced memory leaks on cm10.1. Been running it since day one. :D
[Defy Android Development] MarcinRN:
mine was bought 10.2011 (no idea how long it was kept in shop though). bayer module:
[Defy Android Development] trurl3:
Newest Blechd0se kernel. Is this normal for CM10 (JB4.1) ? Sorry for OT.
[Defy Android Development] overclockthesun:
View attachment 2234735
[Defy Android Development] overclockthesun:
Why is my system ext3? I formatted it using recovery to ext4 before flashingView attachment 2234778
[Defy Android Development] TJKV:
http://xdaforums.com/showpost.php?p=45279828&postcount=486

Reason: Locked Bootloader. This reason hasn't been popping up in the forums much recently because of 2nd boot kernels, but there still are a few restrictions.
[Defy Android Development] overclockthesun:
can you link me to the rom? I have this reboot probem and its just bad now. I wanna know what i am doing before screwing something up. Am running 2.2 SEA version.
[Defy Android Development] Anton111111:
What governor is best for battery and performance for kernel 25.08?
[Defy Android Development] HammDefy:
Interactive/Deadline

Gesendet von meinem MB526 mit Tapatalk 4
[Defy Android Development] roytam1:
tried 31.08-cm10 for my quarx CM10-20130709 for few days, the most noticeable thing is data corruption. (KSM, zRAM 10%, SIO)

At first it corrupted my LINE account settings, but later it corrupted my Google Play Store app and I had to recover from my backup.
[Defy Android Development] overclockthesun:
[MENTION=4855459]Blechd0se[/MENTION] Finally it worked! Maybe I was on miui including it's experimental ones that something in my phones memory got corrupted. Did this to stop my reboot.

Installed cee froyo retail fill sbf.

Then I installed cm 7 over it... A first for my phone. Then I reset the phone to factory reset.

This stopped the random reboots.

Then I installed cm10 without wiping data and cache to ext4.

Rebooted and installed gapps and the new kernel! Rebooted and viola! FSTRIM works.

So I doubt is a controller problem. Installing cm10 over cm 7.2 should get fstrim working after a factory reset of 7.2
[Defy Android Development] measel:
slugzero made it: usb host mode

http://xdaforums.com/showthread.php?p=45331483

USB Host mode on Defy
[Defy Android Development] sunil_defy:
Is this the end of 4.2.2 development for defy.
[Defy Android Development] atulclassic:
deep sleep issue

someone pls help..i m on Quarx CM10.2 with Blechd0se kernel 31.08..

my phone not entering deep sleep..having huge battery drain.
[Defy Android Development] Feche:
Is Defy development dead?
[Defy Android Development] overclockthesun:
add this to your build.prop file at the bottom

# Battery Tweaks
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
[Defy Android Development] atulclassic:
thanks buddy!!
[Defy Android Development] sunil_defy:
I believe it is.
[Defy Android Development] time87:
i don't think so... Quarx is on vacation, simply... it's summer, after all!
[Defy Android Development] sunil_defy:
Quarx is the best. hope he keeps defy alive.
[Defy Android Development] hotdog125:
After running the ROM for a few days, I found that the phone didn't sleep at all after switching off data. I had a massive battery drop. BBS showed nothing except some entries under kernel wakelock - SCIM and GKI_LOCK_TIMER. Toggling airplane mode on and off 're-enabled' deep sleep. I've experienced this problems on all AeroKernel ROMs, mainly CM10.1 and Slimbean. Speaking of apps the only app installed was Whatsapp, as my defy+ has become my secondary phone.
[Defy Android Development] Kayant:
Flash player has to do with JB itself since support was dropped for it by Adobe......

Edit --- my bad forgot we could just sideload the apk :p
[Defy Android Development] sebx_g1:
Odp: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

Who knows? Better to have that feature than not.
[Defy Android Development] Mavasilisk:
How many people are using your phone? Its not a PC where 1-2 or even 3 people use it and some of them have their own accounts. The smartphone is used by 1 person so I think this feature is pointless. Correct me if I am wrong.
[Defy Android Development] bone101:
AW: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

Is it necesserry to wipe battery stats after installing the rom ? Because the battery percentage where not shown correct (it jumped from 80% to 32% after installing and back to 42% after turning back to CM10 ) and the phone is getting very hot after booting, here

I had same thing with cm10.1 build from 10.2.2013

MB525 red l
[Defy Android Development] drunk_ryder24:
there,i made it home and run terminal on the 3.1 project: here what it says:

cata894@cata894-VirtualBox:~$ cd kernel

cata894@cata894-VirtualBox:~/kernel$ cd p-android-omap-3.1

bash: cd: p-android-omap-3.1: No such file or directory

cata894@cata894-VirtualBox:~/kernel$ cd test-3.1

cata894@cata894-VirtualBox:~/kernel/test-3.1$ export ARCH=arm

cata894@cata894-VirtualBox:~/kernel/test-3.1$ export SUBARCH=arm

cata894@cata894-VirtualBox:~/kernel/test-3.1$ export CROSS_COMPILE=/home/cata894/android-ndk-r8d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-

cata894@cata894-VirtualBox:~/kernel/test-3.1$ make mapphone_defconfig

#

# configuration written to .config

#

cata894@cata894-VirtualBox:~/kernel/test-3.1$ make menuconfig

scripts/kconfig/mconf Kconfig

*** End of the configuration.

*** Execute 'make' to start the build or try 'make help'.

cata894@cata894-VirtualBox:~/kernel/test-3.1$ make -j2

scripts/kconfig/conf --silentoldconfig Kconfig

CHK include/linux/version.h

CHK include/generated/utsrelease.h

make[1]: `include/generated/mach-types.h' is up to date.

CC arch/arm/kernel/asm-offsets.s

In file included from include/linux/spinlock.h:387,

from include/linux/seqlock.h:29,

from include/linux/time.h:8,

from include/linux/timex.h:56,

from include/linux/sched.h:57,

from arch/arm/kernel/asm-offsets.c:13:

include/linux/atomic.h:15: error: redefinition of 'atomic_add_unless'

/home/cata894/kernel/test-3.1/arch/arm/include/asm/atomic.h:211: note: previous definition of 'atomic_add_unless' was here

include/linux/atomic.h: In function 'atomic_add_unless':

include/linux/atomic.h:17: error: implicit declaration of function '__atomic_add_unless'

make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1

make: *** [prepare0] Error 2
[Defy Android Development] Kayant:
Try this....

open the file atomic.h from arch/arm/include/asm/ and scroll to line 211 and remove atomic_add_unless......

If It's a big chunk of code post a copy of the file to somewhere like pastebin and I can try you want exactly needs to be removed...
[Defy Android Development] level_666:
Re: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

For me it would be useful, since my brothers play with this device and they change my progress on the games. I want to keep my savegames and stats clean.
[Defy Android Development] hunyadia:
Re: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

Hmmmm strange question. Basicly phone is for 1 person, but maybe multiuser sometimes good when children play with my phone.

Sorry for ot.
[Defy Android Development] bone101:
AW: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

+1

MB525 red lense
[Defy Android Development] AnTerNoZ:
AW: [JB+][3.0.8 kernel] CM10.1 Android 4.2.2 for the Defy(+)

play games is not the only thing, if u use ur phone at home and at work, u can configure it both individual to had a clean interface for office use.