[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

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
Thank you. This app seems to be really helpful. Not like seeder entroopy sh!t :silly::laugh:

---------- Post added at 09:43 AM ---------- Previous post was at 09:36 AM ----------

What do you recommend: enable or disable Fsync?
Thanks in advance.

NEVER disable fsync! Otherwise you WILL loose data and even corrupt your memory on unexpected reboots like kernel panic, sudden discharge etc. These all are force major situations, most people never see them. But there's a meanness law, which states that it will happen when you relax and disable syncing :)
 

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
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.
 
Last edited:

MaximilianPs

Senior Member
Jan 7, 2009
332
21
Pesaro
Two question

1) Where the hek is going on the "Developer" option ?
I need to activate adb but I Cannot find the voice under the settings ...?!?!

2) Can I disable the lock screen with the two pages on the left and the right ?
'cause the default one is enough.
 

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
Two question

1) Where the hek is going on the "Developer" option ?
I need to activate adb but I Cannot find the voice under the settings ...?!?!

2) Can I disable the lock screen with the two pages on the left and the right ?
'cause the default one is enough.

i'm sure you are using an Android 4.2.x based cusrom and there's nothing this lagfix do to your rom settings. :p

here's to answer your questioning:
  1. to enable developer options: go to settings > about phone > and hit 7 times on the build number right at the bottom.
  2. the lockscreen widget is a built-in feature unfortunately. but some cusrom or device administrator app hacking can hide it.
 

Kwisatz89

Senior Member
Jul 29, 2010
86
22
Roma
R: [APP] LagFix (fstrim)

works great also on nook color... now it's fast as a galaxy tab :eek:

Inviato dal mio HTC One X
 

caliga4221

Senior Member
Feb 18, 2011
166
14
Re: [APP] LagFix (fstrim)

Getting error at play store that the package I am trying to "purchase" could not be found. Where can I get apk? Vibrant SlimBean ROM. Suffering terrible lag and frequent Insufficient space errors trying to install apps with 5gb free.... god how I hate that error.

Sent from my SGH-T959 using xda premium
 

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
Getting error at play store that the package I am trying to "purchase" could not be found. Where can I get apk? Vibrant SlimBean ROM. Suffering terrible lag and frequent Insufficient space errors trying to install apps with 5gb free.... god how I hate that error.

Sent from my SGH-T959 using xda premium

APK is one page back. Please test it and if it works I will enabled your device in Market.
 

caliga4221

Senior Member
Feb 18, 2011
166
14
Re: [APP] LagFix (fstrim)

Didn't ask for root 2 times. Checked system the it did. Uncked system then ran again. Got this result

Sent from my SGH-T959 using xda premium

Edit. Also sorry missed apk skimmed right over it. Could not run benchmark before and still can't get FC every time. But VERY noticible difference even opening app drawer much less an app.

Edit 2. Also might be of note. Using SuperSU instead of regular SU.
 

Attachments

  • uploadfromtaptalk1358853613710.jpg
    uploadfromtaptalk1358853613710.jpg
    47.5 KB · Views: 3,041
Last edited:

AuxLV

Senior Member
Apr 30, 2009
435
729
39
Riga
Didn't ask for root 2 times. Checked system the it did. Uncked system then ran again. Got this result

Sent from my SGH-T959 using xda premium

Edit. Also sorry missed apk skimmed right over it. Could not run benchmark before and still can't get FC every time. But VERY noticible difference even opening app drawer much less an app.

Edit 2. Also might be of note. Using SuperSU instead of regular SU.

Looks like your /data partition supports TRIM, but /cache does not. Thanks for info!
 

ireun

Senior Member
Jul 19, 2012
97
46
Sosnowiec
Odp: [APP] LagFix (fstrim)

On nexus 7 everything went well. But on neo V it didn't work. I only get "Not a type writer" error on every partition.

Wysyłane z mojego Nexus 7 za pomocą Tapatalk 2
 

RoachForLife

Senior Member
Jul 17, 2007
311
17
Orlando
Re: [APP] LagFix (fstrim)

This isn't something that you can 'reset', it's like wiping your cache. Once you do it, it's done. And there is no 'stock', just like a cache, it's just junk that accumulates over time that you're clearing out.

Ahh. I guess my understanding of how this works is off. I thought this changed the value in the device so it auto trimmed often instead of waiting for it to fill. Instead it seems like the app is used to manually trim one time or I can set a schedule of when to trim.

Is this correct? The latter
Thanks
 

chrone

Senior Member
May 5, 2012
1,050
369
Surabaya
Re: [APP] LagFix (fstrim)

So why install this app and not just reboot since the "problem" would be fixed by a reboot anyway?

Reboot didn't solve all the problem, in nexus 4 and galaxy nexus, reboot only improve the write performance up a bit but not back to normal. Proper fstrim from this app does back performance to normal more less right before you filling up your storage. Tested. :)

Sent from my Nexus 4
 

rtiangha

Senior Member
Jan 3, 2012
231
76
Re: [APP] LagFix (fstrim)

Works great on the HTC Doubleshot/T-Mobile myTouch 4G Slide. Thanks!

Sent from my SGH-T859 using Tapatalk 2
 

RoachForLife

Senior Member
Jul 17, 2007
311
17
Orlando
In what scenario would one want to also check the /system option? Also are anyone seeing benefits on a S3? Looking forward to trying on my N7 tonight

Thanks
 

the7thson

Senior Member
Sep 20, 2008
556
69
Denver, CO
WOW!! Tried this on my Galaxy Nexus and Nexus 7, results on both are staggering. I might have shed tears of joy, this is amazing :)

My GNex is running PA 2.54 (4.1.2 base) with Franco Kernel m6.
Nexus 7 is running PA 2.54 (4.1.2) base with stock kernel.

To the OP - THANK YOU! :good:
 

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