yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] azunino:
Wow! I have flashed this kernel on my s2 with cm11 M12 (emmc VYL00M with the bug). The fstrim commands took almost a minute. After rebooting the phone is clearly faster.

Thanks!

Enviado desde mi GT-I9100 mediante Tapatalk
[Galaxy S II Android Development] Lanchon:
i dont know what neat rom is, but it is definitely NOT stock. stock is samsung-signed kernel and system. fstrim didnt work because neat rom's kernel doesnt trim; same as all other custom kernels out there (that's why i publish the kernels)

your case is post #2, TRIM on custom roms

EDIT: i updated the instructions for you with new info regarding step 9, so re read it.
[Galaxy S II Android Development] snow:
Does this kernel use FPBug fix? And if yes, what fix? Your fix or [MENTION=5948587]zeitferne[/MENTION] fix?

With all due respect, I don't wanna be rude, just want to know. Thank you in advance. :D
[Galaxy S II Android Development] Acid0057:
It uses Lanchons fp bug fix for now. I think lanchon is going to change to zeis when he releases the next version.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
i think it's safer to just wait for a fix to merge into CM and then inherit that one.
[Galaxy S II Android Development] Mikros:
Because i get confused. I have the emmc bug. My model is VYL00M and the FwRev 0x19. The table says device brick. Shall i proceed flashing the kernel or i will brick my device?
[Galaxy S II Android Development] Acid0057:
Makes sense. Are you going to still produce your kernel with trim?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
maybe i should commit changes (for the two things) and see what happens. i dont see trim getting accepted without a fight (that i wont try) but who knows.

regarding your question, i will continue until cm merges or there are good options. gustavos got it now. if some other kernels get it then mine wouldnt be needed.
[Galaxy S II Android Development] Lanchon:
it wont brick
[Galaxy S II Android Development] azunino:
Mine has the same model. I flashed and it did not brick

Enviado desde mi GT-I9100 mediante Tapatalk
[Galaxy S II Android Development] olarf:
Yes I can confirm that it don't brick. I did it some days ago on similar configuration.

Gesendet von meinem GT-I9295 mit Tapatalk
[Galaxy S II Android Development] srgperez:
Step 4: Grab the attached Odin files, put the .pit file in PIT and the tar.md5 file in PDA. Press start and wait [Note: I had some issues with Odin, just keep trying, it worked for me even when it said it failed.]

Odin keep giving fail, and now my phone is bricked.

Reading about pit files, lot of people here and outside here says is a dangerous thing.

Nandroided back, and get my phone working.

The partitions are repartitioned, but the process have been very traumatic.
[Galaxy S II Android Development] olarf:
Repartitioning is way more tricky and dangerous then flashing the right Kernel :) Good that you manage it finally!

Gesendet von meinem GT-I9295 mit Tapatalk
[Galaxy S II Android Development] JimboAccy:
Hi Acid0057

I tried the terminal commands on my phone and it came back with an error saying it couldnt find user su or some words to that effect. I tried other apps I know on my phone that require root access and none would work so it appeared my phone had lost the fact it was rooted even though my custom rom was still working, since I flashed the trim kernel for my phone.

So I tried to flash back just the FPBug only kernel as that seemed to be the last point of it working but still I had no root access. So the next step I thought would be to try and reinstall my CWM recovery so did that then when I rebooted I just got a black screen after the bootup Samsung logo. I went back into recovery and cleared dalvik and cache and got back into my Rom ok (Phew) but still no root access.

So ended up going back to recovery, reflashed my custom rom again, flashed the trim kernel straight after (without reboot) and then cleared dalvik and cache again and rebooted. Everything is now ok - Rom is as it was (as I didnt wipe data/factory reset) my root access is back and Lagfix works and so does the commands in the terminal emulator app on the phone. Unfortunately I cant give benchmarks but I have attached screenshots of the Lagfix and terminal screens :)

Thanks for all your help.

Jimbo
[Galaxy S II Android Development] Acid0057:
Glad I could help.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] nhmanas:
Thank you for your awesome work!

I tried on cm11 m11 but I am waiting for cm12 trim enabled fp bug fixed ! :D
[Galaxy S II Android Development] drfie:
Zero time trim

It seems I am in the zero time trim group. Trimming was really fast <1s. It reported megabytes of trimmed data, but it did not change the speed much.

eMMC: VIS00M, 03/2012, rev 0x09

before:

SEQ RD: 26MB/s

SEQ WR: 5MB/s

RND RD: 1124

RND WR: 62

after:

SEQ RD: 30MB/s

SEQ WR: 4MB/s

RND RD: 1297

RND WR: 72

Thanks anyway :)
[Galaxy S II Android Development] Acid0057:
[MENTION=4141005]Lanchon[/MENTION] can you build your trim+fpbug fix for the i9100 Jan 4th nightly? Thanks!

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
thank you for reporting, and im sorry to hear that. i should create a list of known trim-disabled emmcs. buy afai remember, only you fully reported your emmc type and fwrev.

your emmc could in theory be trimmed by reseting it (same way emmcs bricked by brickbug can be cured), but then there is no way to flash the bootloader on it unless you use a jtag rig. in theory the firmware could be patched in ram on boot to re-enable trim, or be completely replaced by a better firmware version. in practice, none of this will ever be done.

if you believe your emmc still has trimmed free space (because, say, you never filled the storage in the life of the device), it might be worth it to repartition it (or easier to re create a smaller file system in the partition) and leave the trimmed parts out to guarantee they will never be written. the emmc can become VERY slow when out of trimmed space.

the FTL code in firmwares typically "read" trimmed areas faster than allocated areas (data is made up as all zeros on the spot rather than read). so you could know which blocks are trimmed by benchmarking read performance on each emmc block, if you would like to tinker. this can also be used to prove that writing all zeroes does not trim in your particular model.

this has been done on other ssds but no on these phones, afaik.
[Galaxy S II Android Development] Lanchon:
i cant, im not home.

kernels are fairly independent of the rest of android. use my last one, it will work.

in any case, cm11 is sort of stable now. i dont think any changes at all were made to the kernel in the last few weeks or maybe months.

the next change will be fpbug fix i think. of course you already have that.
[Galaxy S II Android Development] Acid0057:
Okay thanks lanchon.

EDIT: Dec 18th i9100 kernel working fine on January 4th nightly. No problems after 1 day of use.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Acid0057:
Sorry to bug again [MENTION=4141005]Lanchon[/MENTION] but when the next cm11 i9100 nightly comes out can you update your kernel to only include trim on that nightly? Since the fpbug will be merged into cm source then.

[quote name="Acid0057" post=57985853]So will this start on January 7th nightlies?[/QUOTE]<br />

<br />

It will be in the next nightly, see http://www.cmxlog.com/11/i9100/. But in their latest Blog post the CyanogenMod team announced that nightlies for CM11 will only be released weekly (every Sunday) now (instead official CM12 nightlies are now available daily).<br/>

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] JimboAccy:
Just a note - I use Markox89's custom CM rom (now with FPBug integration ;) ) and one thing I have noticed is happening when I have flashed Markox's Rom and the trim kernel then wiped cache and dalvik and restarted the phone for the past couple of updates, is that my headphone socket will stop working (not immediately though - a day after or so). It doesnt detect I have plugged anything into it (media sounds still come out of the phones speakers) and also when I receive and make calls, I can only use the speakerphone even though I try toggling it on and off. By reflashing the same rom and the trim kernel and again wiping dalvik, it sorts it out so next time it happens (probably wont be until Markox updates his Rom again (which can be as often as the official CM 11 Rom)) I am going to see if I can troubleshoot it a bit more as I am unsure if it is the flashing of the trim kernel or the Rom causing this issue as I normally do both at the same time before restarting.

Jimbo
[Galaxy S II Android Development] Lanchon:
lol dont worry, the next kernel is going to be fine! :)
[Galaxy S II Android Development] Lanchon:
thanks for the report! but my kernels are for official CM only. anything can happen if you use them with a different rom.
[Galaxy S II Android Development] varun94:
[MENTION=4141005]Lanchon[/MENTION] i am using cm 12 unofficial.it doesnt have support for trim.can i use lag fix app.will it cause any issues?or is there anyway to do it manually.
[Galaxy S II Android Development] Lanchon:
lagfix or any other method wont work without a trim enabled kernel. see post #2.
[Galaxy S II Android Development] varun94:
will you make a trim kernel for cm 12 official if it comes in future?
[Galaxy S II Android Development] Lanchon:
of course!!! :)
[Galaxy S II Android Development] varun94:
thank you
[Galaxy S II Android Development] hal9074:
Hi Lanchon,

i'm using my i9100 with cm11 M12 and your FPBug kernel. It works very well.

Thank you for your great job!

My eMMC is affected by Samsung eMMC secure erase bug.

If i have understood well... i can flash safely the TRIM kernel without wipe anything and use LagFix on my device.

Thank you in advance.
[Galaxy S II Android Development] Lanchon:
yes you can!
[Galaxy S II Android Development] hal9074:
Thank you very much!
[Galaxy S II Android Development] jexxer:
Can you please build a CM12 kernel with trim support? I already asked Lysergic Acid but he will not add trim support to his stock kernel.
[Galaxy S II Android Development] Muchoaliento:
My review

before:

SEQ RD: 36.77MB/s

SEQ WR: 4.52MB/s

RND RD: 2.8 Mb/s, 718.57 IOPS

RND WR: 0.22 Mb/s, 57.91 IOPS

SQLite insert 653.59, 0.45 sec

SQLite update 527.24, 0.56 sec

SQlite delete 488.59, 0.61 sec

Browser 407.25 msec

Market 1863.5 msec

Camera 1192.75 msec

Camcorder 6140.5 msec

After

SEQ RD: 37.77MB/s

SEQ WR: 4.06MB/s

RND RD: 5.62 Mb/s, 1438.87 IOPS

RND WR: 0.22 Mb/s, 57.91 IOPS

SQLite insert 867.05, 0.34 sec

SQLite update 616.01, 0.48 sec

SQlite delete 711.2, 0.38 sec

Browser 619 msec

Market 1377 msec

Camera 1110 msec

Camcorder 4728.75 msec

eMMC chip VYL00M, revision 0x19

Gustavo_s kernel running on latest Omni 4.4 nightly. Overall good results

GRACIAS MOSTROOOOOOOOOO
[Galaxy S II Android Development] Lanchon:
jajjjajaj DE NADA GATOOOO!!!! ;)
[Galaxy S II Android Development] Lanchon:
once official builds start
[Galaxy S II Android Development] djoledtc:
Should i TRIM mz SGS2?????? :confused::confused:

I have NeatROM 8 ( kitkat 4.4.4 ) , and Apolo 7 CM kernel and i have very nice banchscores....

Is TRIP implemented in Apolos kelner????. I never TRIMed my SGS2 and is 3 years old...
[Galaxy S II Android Development] Cirra92:
Apolo does not support TRIM, as of yet. Looking at your scores, there is no need for it.

Ja TRIMovao sinoc, rezultati posle TRIMovanja su isti kao tvoji sada, ali mi telefon bolje radi, ne laguje, ako se tebi to desava TRIMuj, samo proveri eMMc preko aplikacije da nema bagove :)
[Galaxy S II Android Development] Zile995:
Trimming was quick on my phone(5 sec max, no apps installed)... My emmc doesn't support trim.

A steta sto to samsung nije omogucio na nekim modelima ;)
[Galaxy S II Android Development] djoledtc:
So TRIMing is just when having bad scores.... I wont get beter scores if i TRIM it??? Instaled this rom yesterday and Antutu score is 18000, no lags ona apps (dont play games) , and on 4.1.2 was around 11000, so thats cool.. I chacked eMMC and its great, not any bugs, but i will skip TRIMing for now if the scores cant get bigger......

Pozdrav za zemljake...
[Galaxy S II Android Development] Cirra92:
Pa steta, i zbog toga i zbog Exynos drajvera, ali opet S2 ne umire :)

Ne moras sada, i ne gledaj skor, vec ako pocne da se koci.

Pozdrav ljudi, srecan Bozic! :)

Anyway, yesterday I did TRIM on my device using Gustavo's latest kernel, and although my Androbench scores do not differ significantly, I can confirm that my device got a bit of fresh air, as there are no lags and slowdowns now, everything is more fluid than it was, so, big thanks to Lanchon :D :highfive:

Here are screenshots of my eMMc model, and Androbench scores. (2 pictures of each test, because it didn't fit)
[Galaxy S II Android Development] gohanSS:
I have a GS2 with emmc vyl00m fw. 0x19 , running carbon rom 4.4.4: which kernel should I use? Thanks for the help.
[Galaxy S II Android Development] Lanchon:
UPDATE: new kernel for the latest nightly:

cm-11-20150111-NIGHTLY-i9100

this kernel now inherits the FPBug fix from CM's tree. enjoy!
[Galaxy S II Android Development] Lanchon:
this PIT is buggy. there is a 0.5 GB gap between /data and /preload:

--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 2 (STL Read-Only)
Update Attributes: 0
Partition Block Size/Offset: [B]15024128[/B]
Partition Block Count: [B]14696448[/B]
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: UMS
Flash Filename:
FOTA Filename:

--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 13
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: [B]30723072[/B]
Partition Block Count: 46080
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img
FOTA Filename:
[Galaxy S II Android Development] JulGer01:
I'm back to 20150105nightly. Got massive freezes with 20150111. Don't know what went wrong.

Gesendet von meinem GT-N7000 mit Tapatalk
[Galaxy S II Android Development] Lanchon:
back to 20150105 nightly with what kernel? thanks
[Galaxy S II Android Development] JulGer01:
Your previous TRIMM.

Gesendet von meinem GT-N7000 mit Tapatalk
[Galaxy S II Android Development] Lanchon:
could you please try my newest kernel with your 0105 nightly? trying to figure out if its a rom or kernel issue.

(you dont need a backup, if it doesnt work just flash my previous kernel over. if it works, use the new one.)
[Galaxy S II Android Development] Acid0057:
Awesome Lanchon! I tried to look through your OP for the download link. Where can we download the new kernel for that nightly?
[Galaxy S II Android Development] Lanchon:
in the downloads pointed to by the OP!
[Galaxy S II Android Development] Acid0057:
Thanks Lanchon! Sorry to bug but this is the correct kernel that goes with the January 11th nightly from cm 11 i9100: kernel-Lanchon-TRIM-FPBug-20150113-cm-11-20150111-NIGHTLY-i9100.zip
[Galaxy S II Android Development] Acid0057:
Great thanks!

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] JulGer01:
Trying it now. Will report after one night... [emoji6]

Gesendet von meinem GT-N7000 mit Tapatalk
[Galaxy S II Android Development] JulGer01:
Looks like your kernel is working really good. No problems so far. No freezes no nothing. Don't know if something went wrong with my last ROM update. Will stay with your kernel for the time being. THANKS! ?

Gesendet von meinem GT-N7000 mit Tapatalk
[Galaxy S II Android Development] JonisB:
[MENTION=4141005]Lanchon[/MENTION]

My emmc is vis00m and I believe that emmc might not be compatible. I installed, from your page, both cm11 and your kernel from 20150111, following your instructions. I trimmed with lagfix almost instantly, the whole process was over in like 1-2 seconds, and I noticed no direct improvements when I used Androbench. Now I have repartitioned my i9100 to 1gb system, 45mb preload and 4gb data. I tried again with the same rom and kernel as above but now I get a message saying that I can't trim and that it's either a hardware or kernel problem.

/ Jonis.
[Galaxy S II Android Development] Lanchon:
it depends on your fwrev, just the model doesn't say much. in any case, sorry about that.

if you are rooted and have my kernel installed, then you can trim. my kernel shows as rod@rod-latitude in the about phone section. reflash it if in doubt.
[Galaxy S II Android Development] JonisB:
0x09 is my fwrev. I couldn't post it earlier since my phone was busy with Titanium Backup. :)

I am rooted and have the kernel installed. Trim was successful (but fast, it was finished in 1-2 seconds) before repartitioning. After partitioning I couldn't trim and got an error message, altough I followed the guide on page 1 and did the same as I did before repartitioning, when it worked. :) Using the cm11 2015/01/11 (IIRC) from your page. :)

Now I have Gustavos kernel installed and am running pac rom. I'll try a trim later on. :)

EDIT: Gustavo worked with pac rom. :)
[Galaxy S II Android Development] mwakious:
hi @ll!!

GREAT JOB!!

i installed your kernel patch on my moded CM11 nightly (mwakiousSGS2rom) and i have to say that after 4 days of testing my phone is flying!!:laugh:

very fast and stable:good::highfive:

my config is:

mwakiousSGS2rom v.2.2 (based on 18/01/2015 nightly)(unreleased)

gustavo kernel

PIT file 1GB+6GB

deleted preload in emmc
[Galaxy S II Android Development] RuffBuster:
Would love to try your CM11 "mwakiousSGS2rom"! Any chance of testing? Also how did you go about deleting the preload partition with the PIT you have? Cheers!
[Galaxy S II Android Development] varun94:
[MENTION=4141005]Lanchon[/MENTION] i have seen kernel for 13/1/15 date for galaxy s2 by you.it is saying trim fpbug fix.isnt the 13/1/15 nightly already has the fpbug fix.is it safe to flash kernel with 11th nightly.when will you make next trim kernel for cm.for next snapshot?how to check if my phone emmc supports trim or not.
[Galaxy S II Android Development] varun94:
Sorry 11th nightly.i ran fstrim commands from terminal.data partition took 1 second system and cache happened instantly(I have installed the cm 11 11th nightly today doing a wipe of system/data partition and cache partition)).so does my Emmc support trim?can I use the 13th kernel with 3/02/15 nightly?thank you for the reply
[Galaxy S II Android Development] Lanchon:
i dont know if it supports it, most do. on those that dont, the trim is a no-operation and doesnt hurt performance or the device. so there is no reason not to use trim.

yes you can. use my latest kernel with any recent nightly. there are no changes in the kernels of recent CM's nightlies (besides the fpbug fix).
[Galaxy S II Android Development] varun94:
my emmc chip
[Galaxy S II Android Development] jaswinprakash:
Request to op,sir please include kernel for cm11 kk i9100 linaro/sabermod weeklies... Can I use any other kernel in this weeklies.?
[Galaxy S II Android Development] Lanchon:
crossposting is against forum rules
[Galaxy S II Android Development] jaswinprakash:
Sorry...:(:(
[Galaxy S II Android Development] x3dnd3x:
I'm currently on cm11 Nightly 20141218. I flashed before a 5 or 6gb pit file(can't really remember). Can I use OP's kernel?

Also wondering, where's the download section? I just click on source code and download as zip? :confused:
[Galaxy S II Android Development] Lanchon:
yes.

download section is in the OP.
[Galaxy S II Android Development] x3dnd3x:
Okay. Saw the one trim kernel meant for the ROM I'm on currently. Will flash it through CWM and see how it goes. :)
[Galaxy S II Android Development] Lanchon:
use the latest kernel
[Galaxy S II Android Development] x3dnd3x:
You mean this for S2? :confused:

20150113-cm-11-20150111-NIGHTLY
[Galaxy S II Android Development] Lanchon:
lol i dont know, dont remember. the latest! :)
[Galaxy S II Android Development] x3dnd3x:
Yes. That's the latest currently for S2. Will give it a try out later in the night. Right now I'm on stock CM11 kernel.
[Galaxy S II Android Development] Schkisz:
does this kernel work with cm12?
[Galaxy S II Android Development] Lanchon:
nopy!
[Galaxy S II Android Development] BarkyJ:
Results

Hello,

Just flashed CM11 M12 Snapshot tonight, and installed your Kernel patch etc, and just wanted to share the results from my i9100.

Photos attached. Before and After you can see from the time on the phone at the top.

Actually made everything..... slower. Any ideas?

I ran the command from cmd prompt to enable it after installing the kernel patch, and it said this:

C:\Users\BarkyJ>adb shell su -c "fstrim -v /system; fstrim -v /data; fstrim -v /cache; fstrim -v /preload"

/system: 46092288 bytes trimmed

/data: 1899298816 bytes trimmed

/cache: 98758656 bytes trimmed

/preload: 512663552 bytes trimmed

Cheers
[Galaxy S II Android Development] Lanchon:
it didnt make everything slower as you say! the only affected metric in your case is random write, which is very important for responsiveness, and btw had an impressive 100% increase.

regarding the other small changes: andobech is not particularly repeatable, these variations are not significant.

finally, you may want to read the "when things do not work" section.
[Galaxy S II Android Development] x3dnd3x:
I see significant speed increases on my S2 after installing this kernel. Might wanna give Buzz or Themer launcher a try again and hopefully since its faster now, it will not lag as much when I was on stock kernel.

Thank you Lanchon! :)
[Galaxy S II Android Development] RuffBuster:
Personally I find trimming defo gained some increase in performance, but from heavy testing of how my phone "felt" and not benchmark numbers. But I found that I only felt the difference after increasing my partition sizes, making sure each partition had at least 50% free. For me 6gb data and 1gb system. Also kept my preload partition but made sure it was totally clean as I'm sure I read somewhere here that keeping a space on your internal memory that is never written to can help ... Maybe I'm wrong on that bit, but I defo felt the difference after increasing my partition sizes at the expense of losing some internal storage.
[Galaxy S II Android Development] BarkyJ:
Hi RuffBuster

Can you please tell me about your setup, your ROM, Kernel, etc, and links where I can get them?

You seem to be happy with your setup, so would love to try it myself.

Still looking at how to do this partitioning to get 1GB/6GB Data, and when I need to do this in relation to ROM/Kernel loading etc.

Any help would be appreciated if you have a few mins to reply

Thanks
[Galaxy S II Android Development] RuffBuster:
Check my SIG mate.
[Galaxy S II Android Development] BarkyJ:
Yep, have seen your signature, just not sure where to obtain them from, best place to download etc.

EDIT - ah, top of your signature are links. Didnt spot that, hah.
[Galaxy S II Android Development] x3dnd3x:
Possible to use Buzz launcher now but still unable to use Themer smoothly. Seems like the kernel speed up the device a little.
[Galaxy S II Android Development] Lanchon:
no hardware compositing on this device is probably the culprit. maybe someone some day makes hwc work on this platform...
[Galaxy S II Android Development] 3l3ctr0:
Your kernel for omni rom?

Hello Lanchon,

I would like to give Omni Rom a try, but as far as I know the default Omni kernel is not able to trim, is it?

Is there a chance to see your trim enabled kernel for Omni?

Greetings ;)
[Galaxy S II Android Development] RuffBuster:
Really like to see someone release a trim kemel for Lollipop.