Ubuntu MATE and SSD Drives - Samsung 840 EVO in particular

Hi all,
being fairly new to Ubuntu MATE (I installed 14.04 last fall, actually), but a longtime user of other Ubuntu flavors, I am running into my first issue where it seems the MATE distro significantly differs from the “mother”. Here goes:
There are issues with the Samsung 840 EVO SSD drive (severe performance degradation for “old” data). So far I have not encountered that, probably because my drive is still fairly new. But still, I hade been trying to proactively assess the problem when first the news spread. So far this was without success, because I was unable to get the Linux version of the Samsung performance tool to work, neither from a boot CD nor from an USB thumb drive, both prepared using the ISO that Samsung provided for the Linux users. But this is just a side remark.
A few days ago Samsung came up with a new firmware. Linux users without any Windows system in their reach are still stuck, but that would not be an issue for me. Here is a source, that explains the issue and the fix:
Samsung Magician 4.6 and 840 EVO EXT0DB6Q Firmware Review - Finally Fixed
This sounded good at first glance, but then again, near the bottom there was this link to an alarming post:
The SSD become become totally unstable after the TRIM command
Some more digging yielded that Ubuntu 14.04 runs fstrim via cron.weekly - for some selected brands, including Samsung. Instructions describe the obvious: This can be disabled by editing the script within cron.weekly.
But this is exactly where I am stuck: My Ubuntu MATE 14.04 sports a cron.weekly directory without the fstrim script:

-rwxr-xr-x 1 root root 312 Feb 20  2014 0anacron
-rwxr-xr-x 1 root root 730 Feb 23  2014 apt-xapian-index
-rwxr-xr-x 1 root root 771 Sep 23  2014 man-db
-rwxr-xr-x 1 root root 211 Okt  7  2014 update-notifier-common

Question: Am I missing something? Is this a deviation from other (official) Ubuntu flavors? If so, I wonder if fstrim is still taking place in my system and I need to disable it elsewhere. Can anyone help?

Thanks for any information

Guenter

P.S. I love the forum software being used in this community. It is far superior to anything I have seen before.

Hi Guenter,

this is for U14.04 & Mint, it might help you though as it has several tips:

https://sites.google.com/site/easylinuxtipsproject/ssd

It is possible that Ubuntu MATE is simply missing a package that installs the crons you mention. If you can identify the packages that provides that scripts then I can add them to Ubuntu MATE :slight_smile:

Thank you folks, both of you, for your kind consideration of my concerns. I am afraid, though, I made my point not clear enough. Up until 2 days ago I thought it was a good idea to use fstrim with my SSD. But then I learned about this very tool messing up the SSD model that I own, once Samsung’s latest firmware is applied, I found this information backed by several people on the web. Now I have turned around 180 degree. I want to be absolutely positive that fstrim is not lurking somewhere on my system. Since it is not in the obvious place where Ubuntu 14.04. (other versions, not MATE, obviously) places it. (@wolfman: that is the place I am describing in my post and what your link confirms) If it were there, I’d know how to disable it. But since it is not there, I am uneasy whether it is hiding elsewhere or just missing. The fstrim tool as such is there, but is it running behind my back, that I don’t know.
@Wimpy: I might try chase for the package name when I next get my hands on a vanilla Ubuntu. In that case I will report back here.

fstrim and the corresponding cron are provided by the util-linux package, which I am sure is included with Ubuntu MATE.

So why the cron is missing from your system is something of a mystery to me :confused:

@Wimpy: You are absolutely right. Package util-linux is installed on my system, and yes cron.weekly/fstrim is listed in its properties, but no, it is not there. And I swear it was none of my doing (at least not consciously), so it remains a mystery.
For me this poses a permanent uncertainty - will it appear with some future update (without me noticing it) and knock over my SSD once I applied the Samsung FW?

I’ll ask the foundations team how this works.

Looking at the kernel’s blacklist of SSDs that misbehave on queued trim of Samsung’s there is only 850 PRO (at the moment :grin: )

Continuing the discussion from Ubuntu MATE and SSD Drives - Samsung 840 EVO in particular:

I am afraid the link you posted is broken. I am getting a 404. Further, search on Github for keywords such as blacklist, SSD did not yield anything. I would be interested to point the owner of that blacklist to this link from my original post: The SSD become become totally unstable after the TRIM command Maybe they will consider adding the 840 EVO to that list.

Link corrected. :blush:

Thanks, @nadrimajstor, I contacted the maintainer. Will post here about any outcome.

As promised, here is what happened:

Regarding the difference between the old and the new firmware of the Samsung 840 EVO, after some back and forth between myself and him, the kernel developer wrote
... The queued TRIM problems appear to be generic to Samsung's firmware and not tied to a particular model. A recent update to the 840 EVO firmware introduced the same issue as we saw on 850 Pro. Blacklist queued TRIM on all 800-series drives while we work this issue with Samsung. It appears to be generic to their implementation and not tied to a particular drive model.

> drivers/ata/libata-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index f6cb1f1b30b7..4476fb590733 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4235,7 +4235,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
>  						ATA_HORKAGE_ZERO_AFTER_TRIM, },
>  	{ "Crucial_CT*MX100*",		"MU01",	ATA_HORKAGE_NO_NCQ_TRIM |
>  						ATA_HORKAGE_ZERO_AFTER_TRIM, },
> -	{ "Samsung SSD 850 PRO*",	NULL,	ATA_HORKAGE_NO_NCQ_TRIM |
> +	{ "Samsung SSD 8*",		NULL,	ATA_HORKAGE_NO_NCQ_TRIM |
>  						ATA_HORKAGE_ZERO_AFTER_TRIM, },

>  	/*

In essence, the enhanced blacklist is a temporary workaround. The core issue will have to be addressed with Samsung. Let’s keep fingers crossed.
What that means to the various versions of Ubuntu, including MATE, remains to be seen.
Personally, I still don’t have an explanation why my Ubuntu MATE is not configured to run fstrim :frowning: