Ssd trim

Hi!

Since (most) Samsung SSDs are blacklisted in the Linux kernel to prevent the async TRIM (otherwise it corrupts the drive), I was wondering if we need to configure anything special in order to either manually perform these missing trims (through a cron job) or with sequential trims.

I have a librem 15 (and Debian Stretch).
Thanks!
Mathias
PS: and some recommendations on the best BIOS settings (since you should know the hardware pretty well) could be a big plus!

Hi Mathias,

You need to enable it manually:

sudo cp /usr/share/doc/util-linux/examples/fstrim.{service,timer} /etc/systemd/system
sudo systemctl enable fstrim.timer

More info about this: https://wiki.debian.org/SSDOptimization

Best BIOS settings: just leave the safe defaults. :slight_smile:

I this still a problem?
I was unaware that Samsung SSDs are “Blacklisted”.
Could someone provide a reference to this comment?
Thanks.

Here is a ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/libata-core.c?h=v4.12-rc3 (see line 4456) as well as an older reference and discussion: https://www.reddit.com/r/linux/comments/3syabn/how_well_do_samsung_ssds_work_with_linux_nowadays/ .

The blacklisting might be unnecessary (it could be that the 850 EVO now properly support queued trim) but it could also still be a real bug (at least, the drive advertises queued trim support).

Mathias

Is this still an issue where we need to do this, or has it been fixed on more recent builds?

As I see at https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/libata-core.c on line 4544, Samsung’s 8xx are still blacklisted. That does not mean that there is certainly a bug, but at least that the kernel devs consider it to be risky (it seems that Samsung has been known to be slow to fix such things in firmware).