Slashdot Mirror


Apple Disables Trim Support On 3rd Party SSDs In OS X

MojoKid (1002251) writes One of the disadvantages to buying an Apple system is that it generally means less upgrade flexibility than a system from a traditional PC OEM. Over the last few years, Apple has introduced features and adopted standards that made using third-party hardware progressively more difficult. Now, with OS X 10.10 Yosemite, the company has taken another step down the path towards total vendor lock-in and effectively disabled support for third-party SSDs. We say "effectively" because while third-party SSDs will still work, they'll no longer perform the TRIM garbage collection command. Being able to perform TRIM and clean the SSD when it's sitting idle is vital to keeping the drive at maximum performance. Without it, an SSD's real world performance will steadily degrade over time. What Apple did with OS X 10.10 is introduce KEXT (Kernel EXTension) driver signing. KEXT signing means that at boot, the OS checks to ensure that all drivers are approved and enabled by Apple. It's conceptually similar to the device driver checks that Windows performs at boot. However, with OS X, if a third-party SSD is detected, the OS will detect that a non-approved SSD is in use, and Yosemite will refuse to load the appropriate TRIM-enabled driver.

11 of 327 comments (clear)

  1. Re:Why? by Anonymous Coward · · Score: 1, Interesting

    No they just want to lock down their systems as the millennials are idiots who can't fix anything themselves.

  2. Depends on the SSD by khb · · Score: 5, Interesting

    See http://blog.macsales.com/21641... for an example of a properly designed SSD.

    kext signing is a GoodThing for security. Making the system less secure so that lazy implementors are protected isn't a good trade off.

    Apple *should* have provided a better upgrade experience so that users wouldn't be surprised, or end up with unbootable systems. Users that don't want to have kext protection CAN turn it off see http://www.cindori.org/trim-en...

    To me this is akin to Apple's desupport of WPS ages ago. It took everyone else a while to figure out that WPS was a major security hole (indeed, its still there for most consumers).

  3. Re:Summary is misleading, you can work around by AmiMoJo · · Score: 3, Interesting

    Why do they even need a special driver for a third party SSD? It's a SATA device, and most operating system have a generic SATA storage device driver that they use for everything.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  4. Re:Why? by Anonymous Coward · · Score: 4, Interesting

    Some SSDs' TRIM support is so broken that its use can actually lead to corruption and other issues. Maybe Apple simply prefers to have users complain about speed than about data loss, IOW it could be cheap but safe workaround.

    The Linux kernel, for instance, keeps a blacklist for this issue instead — but one that (commonly) only grows when the devs get reports from somebody who already suffered data loss, and then it takes ages for the new kernel to be used widely in the wild.

  5. Easier solution by m.dillon · · Score: 4, Interesting

    It isn't really true that SSD performance goes down by a whole lot if TRIM is not enabled. SSD performance and firmware has undergone radical improvements every year and people have come to the mistaken belief that enabling TRIM is responsible for most of the performance and wear leveling improvements.

    TRIM has numerous problems, not the least of which being drives and/or filesystems which do not implement it properly. Because its use and effects can be seriously non-deterministic (even in a proper implementation), any bug in the drive firmware OR the filesystem in the use of TRIM can create serious corruption issues down the line when the drive actually decides to blow away some of the trimmed sectors. The TRIM command was badly conceived from the get-go.

    The easiest and safest solution to getting 95% of the benefit of TRIM without actually using TRIM is to simply partition a factory fresh drive to leave a bit of unused space at the end... say another 5-10%. As long as it isn't written to, the drive will use that space as part of its dynamic wear leveling mechanic. As long as the drive also does static wear leveling (which nearly all will do these days), you wind up with nearly all the benefit of TRIM without having to actually use TRIM. TRIM was more important in the days where static wear leveling was not well implemented (or implemented at all). It is less useful these days.

    -Matt

  6. Re:Why? by jones_supa · · Score: 4, Interesting

    The Linux kernel, for instance, keeps a blacklist for this issue instead

    This is true. The blacklist is contained in drivers/ata/libata-core.c for anyone who wants to take a look at it.

    To find it, in that file search for: static const struct ata_blacklist_entry ata_device_blacklist []

    For SSDs with (queued) TRIM problems, that list seems to contain only Crucial/Micron M500/M550. There is a lot of other devices blacklisted for various reasons. Of course they aren't blacklisted completely but just some features are disabled in them.

  7. Re:Apple is what MS always wanted to be by Princeofcups · · Score: 3, Interesting

    It always amazes me that people still try to bash Microsoft over the (bad) things they did in the 90s.

    Let me state this yet again for the business concepts challenged. Apple is NOT A MONOPOLY. When Apple gets to the point that 90% of all devices run their OS, then we can talk. Until then, there is no comparison.

    --
    The only thing worse than a Democrat is a Republican.
  8. Re:Why? by theVarangian · · Score: 3, Interesting

    In my experience, mac laptops cost 20% more and last twice as long as alternative PC laptop manufacturers. That doesn't seem like a bad deal to me.

    That is an interesting point, however I have owned 5 Mac laptops over the years. A G3 PowerBook, A G4, PowerBook, 2 Core Duos and 1 Core 2 Duo. I have owned about the same number of PC laptops. I have not seen any improvement in reliability over the macs except in the case of ultra cheap netbooks that Apple doesn't directly compete with anyway. Neither of our points matter much as they are totally anecdotal. Also, the 20% figure you list is arbitrary and varies over the years. The point I was trying to make you ignore. Why pay more for Apple to preinstall an SSD for you when you can buy the SAME BRAND if not identical model number they use and install it for usually HALF the cost or less than what they charge for the upgrade? Answer THAT. That is what the article is about after all.

    About TRIM: I upgraded my MacBook with a 480Gb OCW SSD module myself. In the two years since I did that I have not given TRIM a second thought and I have not noticed the SSD performance taking a nosedive either. According to OCW the built in garbage collector on their drives is so efficient that there is no marked improvement in running TRIM on the drive and from what I have been able to find out this built in garbage collector actually seems to work pretty well. I suppose I lucked out when I bought that drive.

    About the cost of storage: The price of preinstalled Apple SSDs is pretty outrageous although I'm not sure that your claim of equivalent PC drives costing half or less is quite accurate. Do you have any accurate information on what the spare parts prices of Apple brand SSDs are? I'd be interested to know. While I draw the line at paying for an Apple brand SSD a price that is 2-3 times that of an equivalent PC SSD like you are suggesting I'm still not going to skimp on storage. My MSc project advisor wrote a paper on the efficiency of SSD controllers and one of the things that came out of that research was that in many cases the onboard memory management system on these SSD drives is crap but generally you also get what you pay for which only confirmed what experience had taught me. Buying a budget SSD is like buying budget brake pads for your car on Alibaba, direct from China...

    And that concludes my rant.

  9. Re:Just to be clear... by AmiMoJo · · Score: 3, Interesting

    Lack of TRIM support guarantees that most SSDs will perform badly after some time. By your reasoning Apple will be blamed for writing crappy software that performs badly, which in this instance is correct.

    There is absolutely no reason not to enable TRIM on all SSDs. Apart from a small number with bad firmware a few years ago they all benefit from it. Whitelisting because of bugs in a few specific models is dumb; if they really cared they would just blacklist the known bad ones.

    Face it, Apple are just trying to make people buy their extremely overpriced SSD upgrades.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  10. Re:This isn't new by dgatwood · · Score: 5, Interesting

    The real problem here, as I see it, is that the developer of the TRIM enabler is writing bug reports that request a ridiculously complex solution that doesn't make much sense, rather than a very trivial solution that does.

    The right way to solve this problem would be for Apple to add a single line of code that checks for a magic value in the device tree, and enables TRIM support if it finds it. Then, the TRIM enabler could write a codeless kext for any devices whose TRIM support seems to work, whose sole purpose is to add that magic value into the device tree, that matches at a higher priority than the Apple driver, modifies the device tree, and walks away from the table, allowing the Apple driver to attach, see the flag, and use TRIM support.

    Heck, there's probably a flag like that in there already. Just looking at the device tree for my Apple-branded drive in 10.9, I see something pretty glaring:

    "IOStorageFeatures" = {"Unmap"=Yes}

    and thirty seconds later, found the documentation for that key here. Chances are, if you write a codeless kext that modifies the device tree to add this property to the device, and if you get your matching correct, the unmodified Apple driver will magically enable TRIM support. If so, then you just need to get a proper signing key from Apple, sign the codeless kext, and you're done. If not, file a bug asking for that approach (or a similar approach with a different key) to work.

    If that approach doesn't work, then and only then should you even think about writing an actual chunk of kernel code.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  11. Re:This isn't new by Anonymous Coward · · Score: 2, Interesting

    I'm the developer of Trim Enabler.
    What bug reports are you referring to? I am not writing any bug reports. Some Mac users feel obliged to send requests to Apple about removing the Trim 3d party SSD limitation, but I got nothing to do with that.

    You should understand that the problem of Trim with 3rd party SSD's is not that Apple didn't add support for it, but that they intentionally DISABLED support for it. The driver checks if the SSD is manufactured by Apple, and if not, disables the Trim feature.

    I've already tried making injector extensions, and it does not work. You can inject the Unmap key or even change the model name of the drive, but the behaviour is unchanged, which means the check is done internally in the block driver and not via IOServicePlane. In any case, it is a dead end anyway, since I don't think Apple would grant a kext certificate for an injector kext, so we're back to square one.