Fstrim on Welcome App

Hey guys,
I think it would be nice to add a fstrim.timer button to the welcome app since basically anybody would use it anyway. I know it is just a oneliner in the console but there are people that might not even know about it and it’s a bit more userfriendly. What do you think?

2 Likes

Going on step further, why not just enable it by default? Doesn’t hurt anything (better than setting a discard option), doesn’t do anything on any device which doesn’t support it?

4 Likes

Found this:

https://www.quora.com/What-is-fstrim-and-how-does-it-improve-the-performance-of-a-Linux-based-system#:~:text=fstrim%20is%20used%20on%20a,unused%20blocks%20in%20the%20filesystem.

From https://wiki.archlinux.org/index.php/Solid_state_drive#TRIM:

Warning: Users need to be certain that their SSD supports TRIM before attempting to use it. Data loss can occur otherwise!

So enabling it by default may not be wise.

We have some wiki articles too:

7 Likes

The only thing I can really find about this is a Launchpad bug from 2015: https://bugs.launchpad.net/ubuntu/+source/fstrim/+bug/1449005 :

This is limited to a certain SSD with certain firmware and has since been patched:

I don’t think that one instance of data loss five years ago should preclude the option from being considered.

3 Likes

Technically i believe it’s very hard to find SSD without TRIM support this days…
But i guess for a distro it makes sense to be on a safe side for defaults :pensive:

P.S. Personally i would still check it anyway after installation, too paranoid :upside_down_face:

1 Like

Ah, here’s the wiki edit:

https://wiki.archlinux.org/index.php?title=Solid_state_drive&diff=443628&oldid=443586

It’s related directly to the Samsung SSDs which had faulty firmware in 2015/2016. The warning has remained ever since.

2 Likes

Yep, i remember reading about it even when back on Windows at a time…scary stuff :ghost:

I would love to have your memory. :thinking:

I don’t think we need any more buttons keep it simple :yum:

2 Likes

It sounds like it would be easy enough to add as a personal command (or whatever the term is, not in front of EOS right now). I bet somebody smarter than me could post the needed code here and those that wanted could create one. Not fully the point of OP, I know, but it allows those that want it to do it and keeps the default simple and clean.

The commands are simple: enable or disable fstrim timer, and reboot.

  sudo systemctl enable fstrim.timer     # enable weekly TRIM
  sudo systemctl disable fstrim.timer    # disable weekly TRIM

But as always, user does this at her/his own risk. :scream:
Remember backups!

I did this on a machine with 4 SSDs, and so far no problem. :sweat_smile:

1 Like