[APP] LagFix (fstrim) v1.5.1 2013.03.04

Did LagFix work on your Android 2.x device?


  • Total voters
    118
  • Poll closed .
Search This thread

t4d73

Senior Member
Sep 28, 2011
2,486
567
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I'm a little confused. Will this app cause the brick bug to trigger? I guess my device already has it. I confirmed with the app used to check. I'm wondering if I can go ahead and use this app safely with having the bug or will that actually cause me a hard brick?

Sent from my SPH-D710 using xda app-developers app
 

iamcanadian

Senior Member
Apr 6, 2008
161
7
Because your lag isn't related to nand, it's related to a bad filesystem (I'm assuming you're still running rfs instead of ext4 lagfix).

Sent from my Galaxy Nexus using Tapatalk 2

I am sorry, I am not sure I follow. Is there a way to fix my lag. I am running CM10. Please advice.



There is NO way! Most of SGS devices are prone to brickbug. Custom kernels DO NOT allow TRIM, devices with some error-prone Samsung kernels will be bricked. So this app is NOT available for you for your own good. I'm sorry, but please, send your hate to Samsung :)

thanks for the info.
 

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I'm a little confused. Will this app cause the brick bug to trigger? I guess my device already has it. I confirmed with the app used to check. I'm wondering if I can go ahead and use this app safely with having the bug or will that actually cause me a hard brick?

Sent from my SPH-D710 using xda app-developers app

If your device is confirmed to be brickbug affected - DO NOT RUN LAGFIX! There is an ongoing investigation to create a solution for such devices, but nothing can be promised at the moment.

Sent from my Nexus 7 using Tapatalk HD
 
  • Like
Reactions: t4d73

t4d73

Senior Member
Sep 28, 2011
2,486
567
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

If your device is confirmed to be brickbug affected - DO NOT RUN LAGFIX! There is an ongoing investigation to create a solution for such devices, but nothing can be promised at the moment.

Sent from my Nexus 7 using Tapatalk HD

Ok thanks. Guess I'll stay tuned.

Sent from my SPH-D710 using xda app-developers app
 

Markuzy

Senior Member
Apr 21, 2012
529
120
Singapore
Hi guys
I have a GT-N7000 Galaxy Note with insane brickbug confirmed.

Since this is a stock ICS kernel issue from what I've read, does it mean that "safe kernels" like Philz/Speedmod/Hydracore that disable secure erase is safe?

I am not sure how exactly your app supposingly triggers the brickbug.

I'm on ICS stock Touchwiz 4.0.4 with safe kernel Hydracore 5.4.

May feel like trying this out, I feel that you are wise to not include my device in the Play Store because of said bug issues lol.
What do you advise?
 

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
Hi guys
I have a GT-N7000 Galaxy Note with insane brickbug confirmed.

Since this is a stock ICS kernel issue from what I've read, does it mean that "safe kernels" like Philz/Speedmod/Hydracore that disable secure erase is safe?

I am not sure how exactly your app supposingly triggers the brickbug.

I'm on ICS stock Touchwiz 4.0.4 with safe kernel Hydracore 5.4.

May feel like trying this out, I feel that you are wise to not include my device in the Play Store because of said bug issues lol.
What do you advise?

Proper kernel will simply block TRIM operation, so it won't work any way.
 

wkwkwk

Senior Member
Jun 28, 2008
359
76
Hi,

Is this going to work with an encrypted device?
If I try to encrypt it (galaxy nexus gsm), the device slows down to a crawl and the discard option doesn't help to bring it back.

Thanks.
 

geoffcorey

Senior Member
Apr 24, 2010
2,156
484
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I am sorry, I am not sure I follow. Is there a way to fix my lag. I am running CM10. Please advice.
No. Your device doesn't have the lag that this app fixes. Your lag is due to the age of your device. And since you're on cm you actually have some of the fastest speed available to that phone.

Your lag is to do with age, not your internal sdcard.


Sent from my Galaxy Nexus using Tapatalk 2
 

drifter94

Senior Member
Jul 18, 2012
125
25
Torino Italy
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

There is NO way! Most of SGS devices are prone to brickbug. Custom kernels DO NOT allow TRIM, devices with some error-prone Samsung kernels will be bricked. So this app is NOT available for you for your own good. I'm sorry, but please, send your hate to Samsung :)

but but but.. I'm running cm10 on i9001 sgs+ and it made things a lot better! actually I'm was just going to forward it to some of my devs to let them know about it.. and I swear its no placebo!
step 1: install fresh rom ---system runs like god
step 2:work with the phone a couple of days---system gets choppy
step 3:install and run your app ---system runs like god

Sent from my GT-I9001 using xda app-developers app
 

wkwkwk

Senior Member
Jun 28, 2008
359
76
Hi,

It doesn't seem to work on an encrypted phone:

# ./fstrim -v /data
fstrim: FSTRIM: Operation not supported on transport endpoint
#


It works fine on an unencrypted partition:

# ./fstrim -v /cache
388546560 Bytes was trimmed
#

Thanks.
 
  • Like
Reactions: Uni7 and chrone

kairi_zeroblade

Senior Member
Feb 10, 2011
2,322
12,710
ok so i used your app on my GNote 2 and did not trigger the brick bug..i have successfully applied it and did a few reboots and even pulled the battery just to check if everything is ok

BTW i am running my own kernel..and i am on stock SAMSUNG ROM..
 
Last edited:

daivatam

Member
Mar 22, 2008
39
5
It is not working on hyawei g300 with CyanogenMod 9....operation not supported on transport endpoint

it is possible to do something to make it work?
 

popophobia

Senior Member
Feb 20, 2010
308
22
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

Here is my Androbench result after applying the fix.
The value prior to that is roughly the same. I did esfsck in recovery a day ago. Not sure if it has anything to do with the crazy write speed. Or could it be an error in the benchmark app?

I'm running nexus 4 btw
 

Attachments

  • uploadfromtaptalk1359020540414.jpg
    uploadfromtaptalk1359020540414.jpg
    74.5 KB · Views: 480
Last edited:

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
Here is my Androbench result after applying the fix.
The value prior to that is roughly the same. I did esfsck in recovery a day ago. Not sure if it has anything to do with the crazy write speed. Or could it be an error in the benchmark app?

I'm running nexus 4 btw

are you using custom rom?
i believe the kernel is using fsync off -write process happens on RAM- hence your write speed is freaking awesome. lol :D
 

iba21

Senior Member
Jul 1, 2010
2,829
1,586
Venice
R: [APP] LagFix (fstrim) v1.1 2013.01.19

Oh ok.. nand phone supports trim operations
Stupid question to the OP:

does it support a wear leveling function?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 207
    THIS APP REQUIRES ROOT!

    READ FAQ! Read that FAQ BEFORE you try app!

    Premium version is now ON SALE! -50% off of the price! Enjoy!

    Some Android users suffer from poor performance after some days/weeks of heavy usage. This is due to a well-known TRIM bug affecting these devices (there are reports that some Galaxy Nexus devices also have affected memory chips). Users with -discard mount option are NOT affected!

    The source of the problem is that internal storage is not properly TRIMmed when needed. You can find lots of information on XDA - http://xdaforums.com/showthread.php?t=1971852 and http://xdaforums.com/showthread.php?t=1929021 for example. It is also well-known fact that running fstrim Linux tool from time to time fixes the issue until internal memory runs out of free blocks. Other solutions like mounting with -discard or disabling fsync may be slow or dangerous.

    LagFix is a user-friendly implementation of fstrim utility. It allows you to select which partitions to trim (you should leave defaults unless you know what you are doing) and run the process easily.

    Please note that fstrim output depends on kernel and device. It works fine unless you see errors. You might see big amounts of bytes, zero amount or repeating amount. All are fine! Read fstrim manual to understand why all these outputs are valid.

    It is also advised to reboot your device after the TRIM process so that kernel could reinitialize block data.

    There are two versions of LagFix:
    1. Premium version (v1.5.1) - no ads + ability to auto-run trimming on specified schedule. The best choise!
    2. Free version (v1.5.1) - trims your memory with one click, has ads, no schedule.

    Warning! Premium version comes from different publisher! This is because Google does not allow to publish paid apps from my country. Send your rage to Google :) Both versions are legit, don't worry.

    Release notes:

    v1.5.1
    + Added CWM SuperUser support;
    + Added android.permission.ACCESS_SUPERUSER permission;
    * Fixed disabling scheduler;
    + New notification icons.

    v1.5
    Full rewrite, dropped RootTools lib, made my own. No more problems!

    v1.4
    + Device compatability detection is now completely reworked
    * Fixed a crash

    Earlier changelogs:

    v1.3
    + New UI
    + Added Info screen
    + Added device compatability detection (looks like it should be improved further)
    + Renamed Donate version to Premium
    * Fixed scheduling dissappear after reboot (Premium version)
    * Some other bug fixes

    v1.2 premium
    * Added auto-trim functionality which runs on specified schedule. Click Schedule button and you'll see the options. Setup the way you want and click Install. The button will change to Uninstall to remove auto-trim if needed.
    * Added detection if your device supports TRIM - run it once and you will know.
    * Fixed some bugs.

    v1.1
    * Fixed chmod not working on some custom Sense ROMs.
    * Added Android 2.2+ support.
    * Fixed crashes.
    * App is now multi-threaded.
    * Updated UI a bit.
    * New icon.
    * App is renamed.


    P.S. If your ROM mounts /data with -discard then this app is NOT needed!

    P.P.S. Free version is now attached for those, who do not have market for some reasons.
    72
    FAQ

    WARNING!
    There are some devices affected by BrickBug. Samsung Galaxy S2 and Samsung Galaxy Note are known to have it. There are also reports that some Acer A210/A211 and LG O2x are affected too. There is a Got Brickbug? app to test your device, but it is only intended for Samsung users. BrickBug means DEATH of your device if you try LagFix! There are some unlucky guys already. In case of brickbug - use warranty and exchange your device. This is a hardware fault and manufacturer is responsible.

    I provide NO WARRANTIES for LagFix app! Use it on your own risk.

    LG O2x brickbug may be recovered following this great tutorial by fifi139.

    What does LagFix do?
    It calls fstrim utility, which calls ioctl operation called TRIM, TRIM does the magic.

    What is fstrim?
    fstrim is a Linux utility to call TRIM on your memory devices. You can find more information about it and source code at SourceForge. It is now a part of util-linux and can be found inside Linux kernel repository.

    What is ioctl?
    This is a programming interface to talk to storage devices directly in UNIX opearting systems. It is called DeviceIoControl in Windows. It allows to do a lot of low-level things on different storage devices like hard drives, CD-ROMs, flash memory and SSD drives.

    What is TRIM?
    TRIM is a low-level function, which informs memory controller of unused memory block. This is used on most of SSD drives and some eMMC memory. SD cards use different function - SD ERASE. Read more in Wikipedia.

    Why the lags?
    Devices with TRIM support must be trimmed to know which parts of memory is free and is available to write more data. When memory controller does not know which parts are free, it starts the search asking operating system to help it. This process will take time and the less free space available, the more time is required. And this operation blocks everything else. So everything you do starts to wait (lag) when some data needs to be written. For example, when you switch apps, the state of previously used app is saved to internal memory so you could get back to it when needed. Saving = lags. Simple!

    Which devices are affected?
    It is known by now, that Nexus S, Galaxy Nexus, Nexus 7, Nexus 4, Nexus 10 and HTC One X need regular trimming. It is also believed that all pre-ICS devices used different memory and they do NOT need it nor support it. Pre-ICS support will be dropped in version 1.2. Other 4.0+ devices? Well, test it! And report if it really helps - your device will be added to the list.

    How to properly test it?
    Use AndroBench app before using LagFix and after. You only need micro test. Look for Sequential Write values. Reading from memory is NOT affected, because reading does not involve writting and only writting triggers search party for free memory blocks.

    Why to reboot?
    Most of the users DO NOT need rebooting after trimming. But SOME RARE kernels do not re-initialize free block information after TRIM. It is impossible to detect such kernels, so if LagFix did something but IO related lags did not go away - reboot! Most of users DO NOT need rebooting!

    My device is in the affected list, but LagFix does nothing.
    Some kernels mount storage with -discard option. This option forces kernel to call TRIM operation after all write and delete operations. That means that functionality of this app is built-in, you don't need LagFix in such case.

    Why not every kernel comes with -discard?
    Discard slows down write operations a bit and delete operations a lot. Desktop Linux users NEVER use it, instead they put fstrim in cron to run once per day. Scheduled launching of LagFix is comming in version 1.2.

    LagFix is not available for my device in Play Market, why?
    It was reported by many users that your device does NOT support TRIM operation. You don't need this app, it will NOT do anything on your device.
    6
    Works with S4 (i9505) if anybody's wondering

    Trimmed /system, /data and /cache a few times over the past few days and haven't run into any problems

    Sent from my :tank:
    6
    hi..
    does this app fix the problem permanently?
    or this problem will be back? if the problem will be back, how long the problem will back since we use this app?

    one more question..
    is this perfomance issue hardware of software issue? thanks :)

    Memory should be trimmed regularly. It will be back as soon as you write some new files. It depends on how often you write new data to /data partition. I personally trim my phone once a week.

    The thing is that trimming is needed on all solid memory types, but different memory types uses different mechanisms for trimming. For example, SD cards use function called SD_ERASE and it is automatically called when needed by all known to me operating systems. Newer eMMC chips use TRIM function like in SSD drives. Desktop OSes call TRIM on a regular basis, like once per day or so. This includes desktop Linux. But Google devs forgot about it for some reason. So it can be called a software "bug" by Google/HW vendors.

    What I did? I took fstrim app from desktop Linux, cross-compiled it for Android and packed inside nice looking app :) I'm also preparing patches for CyanogenMod so that fstrim would be included for devices with such eMMC chips and run automatically like it does on desktop systems. But I need to spend some time understanding how Android and CM works and where to put it correctly. And how to submit patches and so on, so bear with me.
    6
    is there any update for fstrim coming out?

    Yes, bug fixes this weekend.

    Sent from my HTC One X using Tapatalk 2