yashsingh1/xdaforums huggingface dataset:
[HTC One X] geoffcorey:
Wow, just used this on my gnex, and all I can say is: thanks!

I was originally running with the discard Mount option, but it turns out it wasn't doing anything as your app trimmed a quite big number. (I have since removed said Mount option)

Also, I used to have issues with an app that set settings on boot not actually doing so, but after this app it works again. And my phone feels snappy again.

Thanks for this app.
[HTC One X] AuxLV:
I'm glad my app helped! May I ask to do me a favour and rate app in Play Store? That would be nice (:
[HTC One X] zombiefly:
thanks. This is brilliant :D

the problems i talked of in my earlier post appear to have gone now after running Lagfix. My Phone is back to it's usual speed. :D :D

I was also using the emergency restore rom image method, glad I don't have to do that anymore, was a major pain.

I was looking into an app i use called settings profiles as I wanted to run lagfix after every usb dismount, unfortunately it doesn't support running applications, which is a shame. Is there any other way of hooking this in to run automatically after (un)mounting as a usb drive?
[HTC One X] AuxLV:
LagFix trims /data partition, it has nothing to do with /sdcard which is mounted/unmounted. I will add scheduler in the future releases.
[HTC One X] chrone:
i'll give this a try on Nexus 4 since it's affected too by the slow down write performance if free space left less than 4GB. well done and thanks for keeping it free! :)
[HTC One X] AuxLV:
I hope to hear your report if it will help in Nexus 4 case since I dont have one to test myself.
[HTC One X] tatsit:
works great! :good:
[HTC One X] AlexNone:
Hey,

Work great on Nexus 10 AOKP ;)

But not work on HOX on Renovate rom with Trip Kernel. I think Sense kernel is the probleme or other.Root acces is OK

# fstrim -v /data

sh: <stdin>[32] : /data/data/com.grilledmonkey.lagfix/files/fstrim : can't execute : Permission denied

# fstrim -v / cache

sh: <stdin>[35] : /data/data/com.grilledmonkey.lagfix/files/fstrim : can't execute : Permission denied

Thanks for your work
[HTC One X] chrone:
Just updated my post above. It works! I chose all /system, /data, and forgot the other partition.

Much appreciated dude!! :good::good:

Care to adding fstrim for Nexus devices to your app name? :P
[HTC One X] Kroutnuk:
Doesn't work on Bindroid Sense 4+ ROM. Access denied and doesn't ask for root acces.
[HTC One X] AuxLV:
Thanks for report, looks like chmod was not executed successfully. I'll look into this issue and add a fix in next version.

You can try to fix it manually if you are familiar with Linux console:

# su
# chmod 777 /data/data/com.grilledmonkey.lagfix/files/fstrim
[HTC One X] AuxLV:
Does not ask for root? This is very strange... I'll look into it too. Sorry for such problem - I don't have Sense ROM so I couldn't test...
[HTC One X] AlexNone:
Thanks !

I forgot the chmod :)

Fix manually with terminal emulator with chmod 777 and is OK.

Renovate Rom with Trip kernel 002 and Sense + are OK for fstrim :)
[HTC One X] chrone:
Nexus 4 16GB Storage Performance Over Time & TRIM

Before and after filling up the storage (coming from 5GB and filling it up to 1.2GB space available):

SW from 10 MBps to 4 MBps ~ 60% loss

RW from 1 MBps to 0.39 MBps ~ 61% loss

Did a reboot and the performance is getting better (1.2GB space available, deleted some files left with 2.2GB space available but the performance is more less the same):

SW from 4 MBps to 9.89 MBps ~ 147% gain

RW from 0.39 MBps to 0.51 MBps ~ 31% gain

Using the fstrim app (LagFix for Nexus 7 and HTC One X) and reboot (2.2GB space available):

SW from 9.89 MBps to 9.9 MBps ~ 0.1% gain

RW from 0.51 MBps to 1.07 MBps ~ 110% gain

:good::good:

i see a future request is in order, daily/weekly midnight crontab? :P
[HTC One X] marzinho:
Odp: [APP] LagFix for Nexus 7 & HTC One X

Looks like it works on OrDroid 12.5.1, which is Sense Rom, no errors...

Wysyłane z mojego HTC One X za pomocą Tapatalk 2
[HTC One X] ivelliosy:
It's working on ViperX JB, which is a sense based rom. It brings some smoothness, or Its a placebo effect, Im not sure :))
[HTC One X] DeeZZ_NuuZZ:
tried it manually and then the app and now it worked :) i tried and in antutu the I/O is still at 896....and i get only 12828 points in antutu :/ ...hm i try it again with the trimming...
[HTC One X] AuxLV:
I'm using TRIM. I'd be glad if you could consult me about brickbug. I don't have affected device, so I know nothing about the issue except that it happens on some devices.
[HTC One X] DirkStorck:
What do you select to trim? data, cache?

Thank you! :)
[HTC One X] Entropy512:
Nearly all kernels for GSII and similar era devices (except Samsung stock... lying sacks of ****... "working hard" on Brickbug was bull****...) block all MMC ERASE/TRIM commands for safety reasons. MMC ERASE commands are what causes the infamous "brickbug".

According to Samsung it's just secure erase that's affected, but the FAQ posted a few posts above implies that some people have triggered brickbug via this app?
[HTC One X] Stigy:
So I ran fstrim on my Galaxy Nexus toro and ran AndroBench before, after and after a reboot and I see something weird.

Before: 2.22 MB/s

After: 5.07 MB/s

Reboot: 2.38 MB/s

Any thoughts as to why my write went down again after a reboot?
[HTC One X] AuxLV:
Someone reported bricking device with LagFix:
[HTC One X] chrone:
interesting thought.

perhaps the brick bug on samsung devices is related with its own ssd department too. more info about this firmware bug in anandtech site here.

me myself often wonder how come almost all review sites told us to trim in order to prolong the nand chipset lifespan and improve performance. i think i finally found a link to confirm that trim/fstrim does improve nand chipset lifespan by reducing the write amplification.

without trim: storage is nearly full (used, free, and mark as deleted block), and you need to write a bunch of new files which exceed the free available block, the system must do this cycle: read the mark as deleted blocks, erase the mark as deleted blocks, modify the free available block, and write the new files.

with trim: storage is nearly full (used, trully free available), and you need to write a bunch of new files, the system just do this cycle: write the new files, hence less write amplification, longer lifespan and much faster write performance. :D

the trim command and secure erase are somehow very well explained in this write amplification article on wikipedia here.

resources:

http://www.anandtech.com/show/6503/second-update-on-samsung-ssd-840840-pro-failures

http://www.anandtech.com/show/6489/playing-with-op

http://en.wikipedia.org/wiki/Write_amplification

http://en.wikipedia.org/wiki/TRIM

http://en.wikipedia.org/wiki/TRIM#SD.2FMMC

http://en.wikipedia.org/wiki/Solid-state_drive

https://patrick-nagel.net/blog/archives/337
[HTC One X] RoachForLife:
Curious on the response to this post as well.
[HTC One X] iamcanadian:
Hello,

How come I can't install it on my Galaxy S (i9000)? My device has serious lags.

Any help is much appreciated!
[HTC One X] chrone:
how much free storage do you have there? i do hope it is more than 25% free available. fstrim can't be helpful to improve the write performance if you're using almost all of the storage capacity since the nand chipset characteristic is using the over provisioning too to maintain consistent performance, hence more free storage needed.

i'm still getting consistent write performance on nexus 4 with 2-3gb free space left available. tested on after fstrim before reboot and after reboot.

perhaps it's blocked because of the notorious samsung emmc brick bug.

more info on the brick bug:

http://xdaforums.com/showthread.php?t=1693704

http://xdaforums.com/showthread.php?t=1644364

just my two cents. :D
[HTC One X] Stigy:
I have ~9GB free on my 32GB Galaxy Nexus.

I can test again later if need be, just wondering why I saw lower numbers after the reboot since a lot of people were saying a reboot helped them.
[HTC One X] geoffcorey:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

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).
[HTC One X] AuxLV:
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 (:
[HTC One X] kfallz:
Does not seem to be friendly with O2Xs, mine kept booting into recovery after an reboot. Checked all three, according to the app it didn't touch system though. Had a backup beforehand, couldn't restore it, formatting from recovery doesn't help either, neither does installing a new rom. Gonna try some other stuff now, we'll see if i can revive it haha.
[HTC One X] chrone:
oh i see. did you wait for the system to be idle after the reboot?

in my case i wait for 5 to 10 minutes in order to make sure the running apps or services in the background are not actively crunching the storage input/output. :D
[HTC One X] kfallz:
Managed to get it working again, reflashed my baseband and could restore after that. Seems that fixed the partions, was worried i had to go through a lot of other crap or do an nvflash restore or similar ^^
[HTC One X] trvbone:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

So is this effective on my SGS3 or no?
[HTC One X] AuxLV:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

Looks like I should ban your device in market to prevent problems for other users. It is lg optimus 2x, right?
[HTC One X] AuxLV:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

SGS3 users say yes. I can't test myself - I don't own such device.
[HTC One X] :
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

Yes :thumbup:

Envoyé depuis mon GT-I9300 avec Tapatalk
[HTC One X] ptmax13:
I just wanted to say a big thank you..

This app made my GNex brand new!

I was having lag and other IO issues for weeks! This worked miracles!

Tested with 4.2.1 and franco latest nightly 361.

I'm off quickly for a 5star rating on gplay...
[HTC One X] t4d73:
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?
[HTC One X] iamcanadian:
I am sorry, I am not sure I follow. Is there a way to fix my lag. I am running CM10. Please advice.

thanks for the info.
[HTC One X] AuxLV:
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.
[HTC One X] kfallz:
Yea, lg optimus 2x.
[HTC One X] t4d73:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

Ok thanks. Guess I'll stay tuned.
[HTC One X] Markuzy:
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?
[HTC One X] AuxLV:
Proper kernel will simply block TRIM operation, so it won't work any way.
[HTC One X] wkwkwk:
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.
[HTC One X] AuxLV:
I don't know. Try it (:
[HTC One X] geoffcorey:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

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.
[HTC One X] drifter94:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

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
[HTC One X] wkwkwk:
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.
[HTC One X] miniudavid:
AW: [APP] LagFix (fstrim) v1.1 2013.01.19

To German if you need it.. ;)
[HTC One X] kairi_zeroblade:
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..
[HTC One X] daivatam:
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?
[HTC One X] popophobia:
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
[HTC One X] AuxLV:
This means trim operation is not supported on a hardware level. The only way to make it work is to change a device ;)
[HTC One X] chrone:
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
[HTC One X] xbs:
Can this app be safely used on a Nexus S (Samsung GT - i9020)?
[HTC One X] iba21:
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?
[HTC One X] DforDesign:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

Is that a bug:

O.o wtf?!
[HTC One X] AuxLV:
Most probable is that you are running with fsync disabled.

Users say yes AFAIK.

I don't know what your device supports.
[HTC One X] AuxLV:
Scheduled trimming is FINALLY WORKING! Hurray! Will try my best to get update into market today! Learned tons of new stuff about Android during this week :good:
[HTC One X] chrone:
awesome! can't wait to give it a try! :highfive:
[HTC One X] AuxLV:
Just sent it to a guy, who will publish it for me. He will upload when he will have free time, after app goes live I will update first post with a market link.

I hope it has little amount of bugs (: I was in a such a hurry... But working with schedules, launching root apps from services... First time trying! (:

P.S. I'll work on translations with everyone this weekend, I'm very tired right now, sorry. And I need some refactoring, lol.
[HTC One X] DforDesign:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

How could I disable fsync and what does it do?

That on advance
[HTC One X] iba21:
my device is the same as yours! :p

or different hox has different hardware?
[HTC One X] chrone:
go get a break. thanks for the work. :)

it's from the kernel, stock kernel usually comes with fsync on. never used custom kernel before, but go search the settings hope it can be turned off from it on the fly.
[HTC One X] AuxLV:
Well, I never wondered (:
[HTC One X] DforDesign:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I have dynamic File Sync enabled in faux app. It's the same as fsync so I simply don't have it disabled. Any clue? It's impassible tonhave such writing speeds
[HTC One X] goTouch:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

It would not disable fsync. For security purposes, leave it on.

Enviado do meu Galaxy Nexus
[HTC One X] fifi139:
+1. I tried the app and my O2x got bricked. Now I'm reflashing baseband and see if I can restore from my nandroid backup. If not, then I'll use nvflash.
[HTC One X] AuxLV:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I'm very sorry for such incidents.
[HTC One X] fifi139:
It's done. Just reflashed the baseband, went back to CWM and restored my nandroid backup and voila!!! everything works as before. :D
[HTC One X] AuxLV:
Re: [APP] LagFix (fstrim) v1.1 2013.01.19

I'm glad that it was easier to repair than SGS1 (: Can you please post detailed tutorial so that anyone else affected would know what to do?
[HTC One X] fifi139:
Steps on restoring bricked LG O2x

I'm not sure about other brands, but this is what I do for my LG O2x:

1. First make a nandroid backup in case something bad happens

2. If it really bricks, we still have CWM intact because only /data (in my case) that's locked.

3a. The easiest way is to use this AIO tool: http://xdaforums.com/showthread.php?t=2020737 (by spyrock), choose 7 - smartflash ROM or baseband

3b. Alternatively you can use: http://xdaforums.com/showthread.php?t=1658047 by tonyp

3c, If you don't know how to manually smartflash, this is the best instructions by Paul O'brien: http://www.modaco.com/topic/335494-...aseband-release-103521-20110725-v20l-version/

4. After flashing, remove the USB cable (people keep forgetting this), put in the battere, press Vol - and Power simultaneously to enter CWM.

5. Restore your nandroid backup and Reboot.

Everything should be okay.
[HTC One X] IonAphis:
Aux, a couple of questions about LagFix that is not clear in the xda faq (I have a Galaxy Nexus GSM):

1) Is this only true for JB 4.2? Or does this apply to all versions of Android?

2) Ever since installing CM10.1 I´ve had lag issues in videogames, but not on app transitions (which is what I understood from the xda post). Will this fix that, or is this only for app transition lags?

3) Say I apply this fix while on JB 4.2 (CM10.1), and I decide to downgrade to JB 4.1.2 (CM10) or move to a different ROM altogether, while most likely this will obviously defeat the purpose as it will overwrite anything done by the app, but is it safe to flash after applying the fix?
[HTC One X] AuxLV:
1. This is kernel and device dependent. Any kernel + device supporting TRIM operation but without auto-discard (kernel feature) is affected. OS version plays no role at all.

2. LagFix eliminates IO lags on write operations. The effect on apps depends on what's happening "behind the scene": games might auto-save your progress, some system service might receive new email/event and write it to memory and so on. Every write operation is affected. When they happen? It is hard to say without system debugger permanently attached - a lot of stuff happens in background.

3. Yes, it is safe to do anything. It is much like formatting your drive - you can do it any time, you just loose your data. Trim is the same, but you do not loose data (:
[HTC One X] AuxLV:
Oh my! Donate version is LIVE! Read OP for more info. And yes, it comes from different publisher - my country is not allowed to make piad apps, Google doesn't like us.
[HTC One X] IonAphis:
4) So applying the fix, the results will stay even after flashing ROMs?

5) How do i find out if my kernel supports TRIM but no auto-discard? Is the CM kernel affected by this?

6) I read about the possibility of bricking. Is this when it is applied to a non-supported device or is it something related to a specific unit? How prone is the GSM Galaxy Nexus to this possibility of bricking?

Again, thank you so much for your attention!
[HTC One X] AuxLV:
4. You need to run LagFix from time to time. Desktop Linux users schedule fstrim in cron to run every day or week depending on their disk activity (for SSD drives, not for HDDs of course). Now that donate version is out you can also schdule it to run as often as you need.

5. AFAIK the only stock kernel with discard is Nexus 7 4.2.1 kernel from Google. Custom kernel authors always write if their product comes with discard. AOSP 4.2.1 from pabx is such example. Kernels with discard auto-trim the memory on every delete operations. Devices which do not support TRIM operation are banned in Play Market, Galaxy Nexus is not, so you are safe to go.

6. Galaxy Nexus is supported. Unsupported devices are SGS1, SGNote1, Acer A210/211 and LG O2x. They are banned in Play Store after user reports. Galaxy Nexus users are happy and no bad reports from them.
[HTC One X] chrone:
Re: [APP] LagFix (fstrim) v1.2 2013.01.24

Thanks for the donate version. Just bought it, now go get your coffee. Haha :D

Sent from my Nexus 4
[HTC One X] AuxLV:
Thanks!
[HTC One X] Kwisatz89:
R: [APP] LagFix (fstrim) v1.2 2013.01.24

confirmed not working with galaxy tab p1000 and acer liquid a1

Inviato dal mio HTC One X
[HTC One X] AuxLV:
These devices are banned in Market for some time.
[HTC One X] SubMatrix:
Has anyone tried this app on an HTC Incredible 2? Trying to help speed up my gf's phone, and stumbled across this work. Thanks!
[HTC One X] Thats OK:
Thanx for this!

Recommended by a poster in the Asus TF700T section.

Some of us were having slowdowns with CROMi
[HTC One X] mw86:
Re: [APP] LagFix (fstrim) v1.2 2013.01.24

Thanks for this AuxLV. It worked fine on my Samsung Galaxy S3. I have left a link to your thread with a thanks to AuxLV and is within a list of resources for users in our Team Kernelizer thread. Thank you kindly for making this, it is truly a blessing. I hope the link to your thread is okay and if it is not I will remove it immediately. Thanks again AuxLV.

GS3 Tapatalk
[HTC One X] Penetratore:
I know that there is a warning for i9100 with brick bug .. but if I have a "good" kernel (Jeboo or Siyah) there it is also dangerous to instal this app?
[HTC One X] AuxLV:
The good kernel will prevent TRIM operation so this app will do NOTHING.
[HTC One X] m3n3chm0:
installed on my Zp900 (MTK6577)

I hope works fine on my ZP900 with MTK6577 :D

Has anyone testing it on MTK65** devices ¿?
[HTC One X] AuxLV:
It does nothing to your CPU/GPU/SOC - it is a tool for internal memory chips (:
[HTC One X] m3n3chm0:
OK , thank you guy !!
[HTC One X] DforDesign:
Re: [APP] LagFix (fstrim) v1.2 2013.01.24

AuxLV, I have fsync enabled and I get about 150mb/s write speed
[HTC One X] AuxLV:
Good for you!
[HTC One X] DforDesign:
Re: [APP] LagFix (fstrim) v1.2 2013.01.24

But my question is can it be valid? Or you think it's some bug in androbench?
[HTC One X] quasihellfish:
Any particular reason why /system is not selected by default? Are there any risks/concerns that I should be aware of before running that one, too?
[HTC One X] AuxLV:
I'm not a benchmark developer, I don't know. Maybe you are using a kernel with dynamic fsync?

No risks known, just to save you a second or two.
[HTC One X] eliaspizarro:
not working on Razr I x86
[HTC One X] Pluto:
Re: [APP] LagFix (fstrim) v1.2 2013.01.24

Can anyone please give me a direct link to the apk of the free version? I'd appreciate it.

Nvm got it.