[Kernel] TRIM: Fast and Stable CyanogenMod 11 on the Galaxy S2 AT&T i777

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0

cyril279

Senior Member
Jun 3, 2013
987
2,077
0
so you are saying that you use the i9100 kernel on the i777?
[...]
it seems the analog paths to ADCs 0 & 1 must be swapped for the i777. if you dont do this, the wrong analog input (mic?) will be used under some circumstances. [...]
Lanchon, you are correct about the mic swap issue, but I think dashrendar is using bits from an i777 M10 zip to make an i9100 M12 zip compatible with the i777. The i777 bits & boot.img/zimage should cover the mic swap.

I9100 CM11 M12 ROM

CM11-I777-SNAPSHOT-M10 ROM from which I grabbed files like the sec_touchkey.kl and modules.[...]
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
PS: I am yearning for the TRIM version of this kernel because I am curious the difference, and also still squeezing every ounce of stability and performance out of this phone before I switch to something else. :D
please try this kernel:
https://www.androidfilehost.com/?w=files&flid=23388

1)flash my kernel
2)reboot recovery
3)flash ***UNMODIFIED ZIP*** of recent cm nightly for i9100
4)flask my kernel again

please make sure the wifi works

PS. this is a trim+fpbug kernel! :)
 
  • Like
Reactions: dashrendar

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
please try this kernel:
https://www.androidfilehost.com/?w=files&flid=23388

1)flash my kernel
2)reboot recovery
3)flash ***UNMODIFIED ZIP*** of recent cm nightly for i9100
4)flask my kernel again

please make sure the wifi works

PS. this is a trim+fpbug kernel! :)
Hi Lanchon,

Thanks a lot. I will try to test this out tonight as I am at work right now.

I do have a question though. With your specific installation steps, I feel like I'm testing the kernel as well as the installation process. Is there a reason for doing it in that order as opposed to just flashing the kernel on top of what I already have (which is ported I9100 and your FPBug kernel)?

Also, I plan to run benchmarks before and after flashing the TRIM kernel. Which reminds me that I should probably reproduce the FPBug defect before and after installing your FPBug kernel. Any thoughts?
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Hi Lanchon,

Thanks a lot. I will try to test this out tonight as I am at work right now.

I do have a question though. With your specific installation steps, I feel like I'm testing the kernel as well as the installation process. Is there a reason for doing it in that order as opposed to just flashing the kernel on top of what I already have (which is ported I9100 and your FPBug kernel)?

Also, I plan to run benchmarks before and after flashing the TRIM kernel. Which reminds me that I should probably reproduce the FPBug defect before and after installing your FPBug kernel. Any thoughts?
yes, thats true.

and the only reason is that if im gonna publish trim kernels, i need to be sure they work! :)

yes you can just flash boot.img.

you can rule out fpbug and other kernel differences for benchmarks by flashing my previous kernel (the one you tested) for the "before" test. if you dont, data is invalid.

use a disk test, not antutu! people like androbench.

consider doing 3 before and 3 after runs, as scores may not be very repeatable.

assuming you are running CM, empty /preload and trim it before benching "after".

once you are finished with all this, please make a nandroid and test my installation steps (and then test buttons and wifi). i cant publish kernels unless i know they work, and theres little reason for building them then. besides, i think your overwriting of kernel modules is not needed with my kernels and can be detrimental to performance or cause failures. i will accept ur benchmarks only because before and after will be affected in the same way. but after bench, for stability, id recommend my install steps for daily usage.
 
  • Like
Reactions: dashrendar

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
so what happened with this?
Hi Lanchon,

Sorry for the late reply. I was not able to get anything done this past week. However, this morning I got a chance to test flashing the boot.img (extracted from kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip) and running benchmarks using AndroBench. The kernel flash was successful and attached are the benchmark results. It seems like the results are mixed?

I did follow the steps in [Kernel] TRIM: Speeding up the Galaxy S2 i9100 including running the lagfix tool to trim the 3 partitions. I tried trimming preload manually in the Terminal but there was no result even when using the verbose switch. I checked the folder manually and it was empty.

Please let me know what you think. My next step is testing the kernel ZIP flash procedure below, which I still owe you. I hope to give you an update on that today.
 

Attachments

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Hi Lanchon,

Sorry for the late reply. I was not able to get anything done this past week. However, this morning I got a chance to test flashing the boot.img (extracted from kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip) and running benchmarks using AndroBench. The kernel flash was successful and attached are the benchmark results. It seems like the results are mixed?

I did follow the steps in [Kernel] TRIM: Speeding up the Galaxy S2 i9100 including running the lagfix tool to trim the 3 partitions. I tried trimming preload manually in the Terminal but there was no result even when using the verbose switch. I checked the folder manually and it was empty.

Please let me know what you think. My next step is testing the kernel ZIP flash procedure below, which I still owe you. I hope to give you an update on that today.
well seq write did go up as usual. it seems ur emmc was not out of trimmed space but needed trim anyway. u might feel that the phone is more responsive, maybe.

fstrim -v /preload

with no result means no trim. why? dont know. maybe u were in recovery and the partition wasnt mounted?

just go to a terminal in andorid (or adb shell) and try again.

thanks! ill be waiting for your test
 
  • Like
Reactions: dashrendar

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
well seq write did go up as usual. it seems ur emmc was not out of trimmed space but needed trim anyway. u might feel that the phone is more responsive, maybe.

fstrim -v /preload

with no result means no trim. why? dont know. maybe u were in recovery and the partition wasnt mounted?

just go to a terminal in andorid (or adb shell) and try again.

thanks! ill be waiting for your test
Hi Lanchon,

I ran the test and here are the steps I followed:
  1. I created a Nandroid backup.
  2. I executed the flash of your test kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip. Flash was successful.
  3. I rebooted into Recovery.
  4. I executed the flash of cm-11-20141115-SNAPSHOT-M12-i9100.zip. Flash was successful. I was surprised because I thought it would fail at the Assert step. Does your kernel do something regarding this?
  5. I executed the flash of your test kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip again. Flash was successful.

I confirm that WiFi works. Microphone/speaker audio works normally.

In About Phone, Model number used to be "SGH-I777" (this gets updated as part of the manual modifications to the I9100 ROM), but now it says "GT-I9100".

Thanks a lot for the awesome kernel. Please let me know if you want me to test anything else. In the test above, I used the M12 snapshot because I am not really a big fan of using Nightly builds as daily drivers (I don't mess with my phone these days as much as I used to since it's my main and only daily driver). I hope using the snapshot doesn't invalidate the test.

By the way, is a kernel updated/rebuild needed to support CM12?
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Hi Lanchon,

I ran the test and here are the steps I followed:
  1. I created a Nandroid backup.
  2. I executed the flash of your test kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip. Flash was successful.
  3. I rebooted into Recovery.
  4. I executed the flash of cm-11-20141115-SNAPSHOT-M12-i9100.zip. Flash was successful. I was surprised because I thought it would fail at the Assert step. Does your kernel do something regarding this?
  5. I executed the flash of your test kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-nightly-crossflash-i777.zip again. Flash was successful.

I confirm that WiFi works. Microphone/speaker audio works normally.

In About Phone, Model number used to be "SGH-I777" (this gets updated as part of the manual modifications to the I9100 ROM), but now it says "GT-I9100".

Thanks a lot for the awesome kernel. Please let me know if you want me to test anything else. In the test above, I used the M12 snapshot because I am not really a big fan of using Nightly builds as daily drivers (I don't mess with my phone these days as much as I used to since it's my main and only daily driver). I hope using the snapshot doesn't invalidate the test.

By the way, is a kernel updated/rebuild needed to support CM12?
thanks so much for testing! everything works then, great.

yes, the recovery will accept both i777 zips and CM-based i9100 zips so that i9100 roms can be flashed but also other i777 kernels if you want to move away from my kernel.

my kernel will also accept being flashed on i9100 devices in case someone flashes an i9100 rom and then forgets to flash my kernel prior to rebooting.

it will take care of the keys and stuff so you only need to flash it over and forget.

the about phone thing, yes, i didnt considered that important enough to change. remember that im developing blind and cannot test, so i keep complexity to the minimum. it should cause no trouble.

i made a kernel for the nightlies and one matching the M12 (both are in the same directory). you flashed the wrong one for M12, itd be better if you flashed the right one over.

but better yet, upgrade to nightlies. cm11 has stopped development (in favor of cm12) so only bugfixes are accepted now. cm11 nightlies are now more stable than m12, flash a nightly! (and then my nightly kernel over it of course)

thanks again for testing!!!
 

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
thanks so much for testing! everything works then, great.

yes, the recovery will accept both i777 zips and CM-based i9100 zips so that i9100 roms can be flashed but also other i777 kernels if you want to move away from my kernel.

my kernel will also accept being flashed on i9100 devices in case someone flashes an i9100 rom and then forgets to flash my kernel prior to rebooting.

it will take care of the keys and stuff so you only need to flash it over and forget.

the about phone thing, yes, i didnt considered that important enough to change. remember that im developing blind and cannot test, so i keep complexity to the minimum. it should cause no trouble.

i made a kernel for the nightlies and one matching the M12 (both are in the same directory). you flashed the wrong one for M12, itd be better if you flashed the right one over.

but better yet, upgrade to nightlies. cm11 has stopped development (in favor of cm12) so only bugfixes are accepted now. cm11 nightlies are now more stable than m12, flash a nightly! (and then my nightly kernel over it of course)

thanks again for testing!!!
Hi Lanchon,

I flashed kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-20141115-SNAPSHOT-M12-i9100-crossflash-i777.zip" on top of what I had and it flashed successfully. Using it right now and seems to be smooth and stable.

I do have a couple of questions:
- Regarding Nightly builds, I am confused as to why they are more stable than M snapshot builds. My current plan is to wait for the next Snapshot/M build for either CM11 or CM12.
- Also, is there a reason why the kernel is different between that for current nightly build and that for a 2-month-old snapshot build. My impression is that at this point, kernel should be pretty much stable. Why the two separate builds?

Perhaps these are questions that not appropriate for this thread or even forum section.

Many thanks again for your great work on the FPBug and TRIM fixes.
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Hi Lanchon,

I flashed kernel "kernel-Lanchon-TRIM-FPBug-20141229-cm-11-20141115-SNAPSHOT-M12-i9100-crossflash-i777.zip" on top of what I had and it flashed successfully. Using it right now and seems to be smooth and stable.

I do have a couple of questions:
- Regarding Nightly builds, I am confused as to why they are more stable than M snapshot builds. My current plan is to wait for the next Snapshot/M build for either CM11 or CM12.
- Also, is there a reason why the kernel is different between that for current nightly build and that for a 2-month-old snapshot build. My impression is that at this point, kernel should be pretty much stable. Why the two separate builds?

Perhaps these are questions that not appropriate for this thread or even forum section.

Many thanks again for your great work on the FPBug and TRIM fixes.
there will be no more cm11 M builds. (or maybe one after fpbug fix? i doubt it.) the next M will probably be cm12 and will be unstable compared to cm11 nightly. cm11 nigthlies only incorporated bugfixes but *no new features* after M12, thats why i consider them better.

i made an M12 kernel for those that want to use "pure" M12, for testing (we know M12 works), and because i expect it to be the last M. but if i were u, id use a nightly with my last kernel.
 

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
there will be no more cm11 M builds. (or maybe one after fpbug fix? i doubt it.) the next M will probably be cm12 and will be unstable compared to cm11 nightly. cm11 nigthlies only incorporated bugfixes but *no new features* after M12, thats why i consider them better.

i made an M12 kernel for those that want to use "pure" M12, for testing (we know M12 works), and because i expect it to be the last M. but if i were u, id use a nightly with my last kernel.
Thanks for the info, Lanchon.

Will the FPBug and/or TRIM tweaks make it into CM12 kernels? If not, will you be providing them to support CM12 ROMs?
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Thanks for the info, Lanchon.

Will the FPBug and/or TRIM tweaks make it into CM12 kernels? If not, will you be providing them to support CM12 ROMs?
fpbug fix made it to cm-11 nightlies!
cm-11 nightlies are now weeklies, released on sundays
there WILL be an M13!
cm-12 will get the fix soon, i've consulted my crystal ball, it is almost never wrong
 

dimoochka

Senior Member
Oct 9, 2014
137
104
0
Sup dude. It works on the S959G with CM11 M12; successfully trimmed preload/data/cache/system. Any chance you could compile cifs.ko into the kernel?
 

dimoochka

Senior Member
Oct 9, 2014
137
104
0
Sup dude. It works on the S959G with CM11 M12; successfully trimmed preload/data/cache/system. Any chance you could compile cifs.ko into the kernel?
Also, bug report; tried this with the latest nightly and both kernels and couldn't get it to boot. My /data partition is encrypted and it doesn't recognize the password. However this works fine with M12 + corresponding kernel.
 
  • Like
Reactions: Lanchon

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Also, bug report; tried this with the latest nightly and both kernels and couldn't get it to boot. My /data partition is encrypted and it doesn't recognize the password. However this works fine with M12 + corresponding kernel.
thanks! maybe some recent change. ill do M13 or a new nightly soon.
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
UPDATE: new crossflash kernel for the i777 !

this kernel now inherits the FPBug fix from CM's tree.

the crossflash kernels let you flash official CyanogenMod 11 for the i9100 on your i777.
includes TRIM and FPBug fix. see the OP for details.

EDIT: there are very few i777 users. please post or thank if you use this kernel so i know there is reason for me to keep producing them. thanks!
 
Last edited:

gvracer

Member
Dec 21, 2008
23
11
0
Grass Valley, CA
I have been running your 12/29 kernel with cm11 1/5 since it came out. It's the first time I've ever flashed an i9100 ROM and it installed great and has been running fantastic. Thank you for all your hard work.

Mike
 
  • Like
Reactions: Lanchon
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone