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.
If you read the rest of the article, you find that you can simply disable the driver loading security to have it working again.
The article paints this as a huge security issue, but why? Anyone putting in a custom SSD is also probably technically astute enough not to download a KEXT that ostensibly puts a cat following your cursor or what have you.
Cn anyone reasonably argue that having a system highly secure for non-technical users with easy workarounds for actually technical users is a bad compromise? The people who are not technical need all the help they can get.
Also - couldn't you actually just sign the drivers that are needed for trim? What prevents that?
"There is more worth loving than we have strength to love." - Brian Jay Stanley
It can be done if you're willing to disable kext security check
see http://www.cindori.org/trim-en...
Because they don't want you buy something with the lowest SSD option then upgrade after market? Why do this? Because you have half a brain and realize the "value" in shininess doesn't work for the SSD, HDD and RAM portions of a computer. Why pay their insane prices when you can not pay them? I for one have one Core 2 Duo MacBook (2008) that was a donation. I love OS X, but this kind of shit makes me not want to buy anything expensive or expected to last years from Apple unless I really feel the need to set money on fire via shiny technology. I hope the Apple crowd stands up and bitches, but more likely they'll just say your "buying it wrong".
Apple has never enabled TRIM on non-OEM SSDs, which is probably the conservative and correct thing to do. If you're clever enough to install a new SSD, you're clever enough to enable it on your own (and presumably to know whether you should enable it, and whether it's even a benefit for your particular drive).
The current workaround involved a single software vendor who didn't sign their kexts. Apple's new security policy won't let you load random unsigned kernel modules unless you explicitly turn off the signature checking. While this is inconvenient for me personally - because I have a 3rd-party SSD and I used that software myself - on whole, I'd rather have a more secure OS than the dubious benefit of a possibly slightly faster SSD.
Dewey, what part of this looks like authorities should be involved?
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).
The walled garden isn't just there to protect Apples brand image via some measures of quality control and moral censorship, its there to squeeze more money out of you, and more money out of the software developers for the platform.
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.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
Apple, for whatever dumb reason, has _never_ enabled Trim on non-Apple branded SSDs. I do not know of any HDD manufacturers that ever provided any kernel extensions that would enable Trim for their drives, so effectively, third-party SSDs have never had any official trim support on OS X.
Before Yosemite this has never been an issue. Any user who was able to install their own SSD could also download the handy TRIM Enabler software that forced Trim on for non-Apple SSDs. One toggle switch, one reboot, piece of cake. I've been running multiple Macs since OS 10.6 with multiple brands of SSDs (OCZ, Samsung, Intel, etc) with absolutely no issues and no signs of performance degradation.
The difference in Yosemite is, as the summary says, non-signed Kernel extensions cannot be loaded by default. Since non-signed kexts are blocked, software like Trim Enabler cannot load. You CAN override this behavior, but there are potential issues (see the Trim Enabler site for more information).
There is absolutely no reason to believe that the decision to make Yosemite require signed kexts has anything to do with the status of trim on non-Apple SSDs. I doubt trim even crossed anybody's minds during the decision-making process. Trim Enabler is just an unfortunate casualty of kext signing (which itself is probably not a bad thing!).
tl;dr -- a rather hysterical take on an issue that DOES display some Apple stupidity. Just let us enable trim on non-Apple drives natively and there's no problem!
hadn't shown multiple vendors who can't implement TRIM properly. Like the very popular SSD vendor whose firmware treated any TRIM as "TRIM all blocks" several years ago. Or the currently-shipping vendor whose firmware causes TRIM to delete a random block.
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.
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.
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
The difference is choice.
In the Apple model, yes, they have built that walled garden. Yes, they are generally sealed units with limited upgrade options. But with Apple in 2014, they're just one vendor among many viable alternatives. Depending on who you ask, they're somewhere between 8% and 15% of the market. That leaves a huge selection of alternate vendors from which to choose.
Microsoft, lest anyone forget, is a convicted (unfortunately never punished) monopolist. Is the late '90s they had something like 98% marketshare. In MS' world, you have no choice but to submit to his will and his ecosystem. You would not be free to leave and switch vendors because there would be no alternatives available. And while Gates may have recently been able to buy them a better reputation with his so-called charity work; you're a damn fool if you think he is anything but a viciously ruthless businessman who wanted nothing less than complete dominance over you.
Seriously, look at this fellow's posts. Doesn't matter what Apples does, it is not their fault, or it is their fault but it's Apple, so there is a good and just reason.
I just understand this mindset. TRIM has been around for a long time now and it works. Plain and simple. It has worked perfectly on my mac after I enabled with a 3rd party hack.
No, this is only a clamp down in order for force you to buy their SSD for double the price.
I am 100% positive if MS sold SDDs and suddenly blocked TRIM, this turkey would be screaming at the top of his lung about power grabs and anti-competitive actions. But, since we are talking about Apple....
lol...Apple is nothing like Microsoft and you clearly have no understanding what they were in so much trouble for in the 90's.
Are agnostics skeptical of unicorns too?
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.
There are three approaches to computing.
There's the commercial-ubiquitous approach. This is Microsoft's approach. Try to support (or to get manufacturers to support) as much hardware as possible. Be the default solution. Things generally look good (I can't fault Microsoft over their years for most of their UI decisions), stability may not always be terribly good though, and that's the sacrifice, ubiquity over stability, but the gain is to run on just about all hardware in existence. Android is also mostly falling into this category too now.
There's the commercial-restricted approach. Sell your hardware and your software, and only allow a select-few others to sell hardware or software that is compatible with your products. The upside is that the platforms are highly stable, but the downsides are that users will sometimes find they simply can't do something because it's disallowed. It also requires the company to be ever-vigilant about pushing more features and capabilities, as stagnation will mean death. Apple currently leads this community, but SGI, Sun, NeXT, Commodore, and a whole bunch of computer companies throughout the years have tried it and ultimately closed up shop.
The Open-Source method is the third approach, and it's both leading edge (ie, research projects by major universities) and completely behind (many user applications simply don't exist or are only partially functional).
I use Windows, OSX, and Linux daily as desktop environments. Linux is stable and fast, but often not compatible with developments out of Redmond and with a lot of work to make some features function. OSX is very smooth, very stable, and awkwardly locked-down to where some things simply aren't options. Windows is compatible with just about everything and requires weekly reboots to keep it running.
They all suck. All of them.
Do not look into laser with remaining eye.
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.
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.
So that if the Mac ever stops working, I can tell my Mom to just take it to the Apple store and they will fix it for her.
If the Mac contains a 3rd-party drive and it breaks, the Apple store will likely hand it right back to her and say "we can't support 3rd-party products". (At least, that's what happened last time I tried to save money by putting 3rd-party RAM into her Mac Mini) Then I will have to fly out and fix it myself, or temporarily remove the 3rd-party drive and replace it with the original Apple-supplied one, before the Mac can be made operational again.
It's worth something extra to keep the system entirely-Apple-supplied, so that there's no quibbling about who is responsible to fix what when something goes wrong. How much extra depends on how much your time is worth.
I don't care if it's 90,000 hectares. That lake was not my doing.
By whom?
For applications, a developer signs up with Apple (for $99/year) and part of what they get out of that is a private key that allows them to sign their applications. I don't know if the signing system for drivers is similar, but I don't see any reason why it couldn't be.
Can the owner of a Mac choose which code signing certificate authorities to trust? If not, how does that inability benefit the computer's users?
It benefits the user by allowing Apple to (largely) ensure that signed code on the user's machine is code that was written by a developer that isn't a known malware source. If the user could choose a different certificate authority, then every "see the dancing pigs for free" malware app could just instruct the user to choose SuperL33TChineseCertificatAuthority as a trusted certificate authority, and we'd be back to square one.
tl;dr taking the 'whom to trust" decision out of the user's hands means it is impossible for the user to screw that decision up.
I don't care if it's 90,000 hectares. That lake was not my doing.
The whole point of Apple hardware is that it's tested to work with everything that is compatible with it, and isn't compatible with anything that hasn't been tested. Going with a TRIM whitelist instead of a TRIM blacklist is part and parcel of this strategy.
For those who want OSX without the OSX philosophy, you can disable driver signing and install the same hacked-up kexts you normally do to get TRIM working. In fact, the existing TRIM enablers already do this.
Sandforce controllers ... that don't need trim in the first place due to their intelligent way of doing garbage collection and keeping a portion of the drive reserved for this purpose.
Seriously? I'd love to hear how you imagine that works.
Without TRIM, the SSD eventually considers all user-visible sectors to be in use. As a result, a sector is never just empty ready to be written. Even with reserved space, it still has to copy the entire much larger erase block in order to insert one sector.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
and last twice as long as alternative PC laptop manufacturers
This simply is not true. There is a new class action lawsuit against Apple for all the defective 2011 macbooks out there. We've had to replace the motherboard 4 times already in one of our macbooks, and now that it's out of warranty Apple wants $1200 to replace the motherboard again, with the same defective crap. 2008 Macbooks and iMacs have similar problems.
The problem comes down to heat dissipation - there is no room for proper cooling inside these computers that Apple designs, because they believe in form-over-function. Cooling it properly might require a slightly thicker macbook and that is unacceptable to Apple.
The generic MS drivers know how to see if the drive supports TRIM and send the commands if it does. That's the point of TRIM: It is an ATA standard command, so special software isn't needed.
In fact, in Windows all you use is the generic drivers. I mean you may install drivers for your SATA controller, but not for your drive. My laptop has a Samsung 840 Pro in it, with Samsung's Magician installed. However the drivers in use are disk.sys, partmgr.sys (both Microsoft files) and iastorf.sys (Intel's file). No Samsung provided drivers. Magician can directly send commands to optimize the drive if needed if the OS can't, but the OS sends TRIM commands no problem.
Yes... the demented world of Apple where daring to buy a 3rd party peripheral is only for "power users" or "cheapskates" or some other class of person that will be denigrated by the hive mind.
THIS here is the biggest reason to avoid Apple products. Not the price. Not the novelty form factors that cook your machine. Not the fact that nothing is maintainable.
It's THIS attitude here that anyone that's using this "platform for creatives" in a remotely creative way will get shouted down by the hive mind.
A Pirate and a Puritan look the same on a balance sheet.
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.
I've been primarily a Mac user since 1999 or 2000, and I've watched the serviceability of Apple's machines go back and forth over the years. Before they moved to the Intel processor, you often had very limited options to do anything with the configuration you purchased, even when the machine in question was a tower type desktop computer. RAM was generally not an issue, although Apple sometimes required very specific timing for the DIMM modules - limiting what you could put in. But certainly, upgraded video was a problem (very limited in which cards could be used as upgrades - including cases like the G4 Cube where some cards were physically too long to fit, even if they'd work otherwise). Laptops like the iBook G4 were notoriously difficult to take apart for service. I remember replacing a bad hard drive in one for a guy I used to work for, and it was at least a 2 hour long job for me with screws all over the place. After that, I understood why repair shops would quote such high labor rates when you asked about an iBook repair.
Then I watched things go the opposite direction. The newer Macbooks and Pros became increasingly easy to work on, so you could unscrew the bottom plate and have instant access to everything -- or just remove a small plate to get to the RAM slots. Batteries became removable from the bottom by just sliding an unlock switch. Even the iMac was easy to upgrade at one point (hard drive right there once you took the back cover off, and no need to do more than unscrew a couple screws on the bottom to get to the SO-DIMM memory).
But it's now swinging back to the "non serviceable" mode again, with the pentalobe screws trying to keep people out, soldered RAM on the motherboards, and having to take the whole glass and LCD screens out of iMacs to work on them.
Truthfully, I don't think the TRIM support for non-Apple branded SSDs is that big of a deal. It's been known for quite a while now that Apple wasn't including TRIM support for 3rd. party drives -- and there's even one 3rd. party SSD coming out now with TRIM functionality built into its firmware, so OS X doesn't need to have support to do it. You can turn off the feature in OS X that verifies you're only using signed KEXTs and get the custom ones to work for TRIM support too.
But sure, it's annoying .... and I'm not going to make apologies for Apple about any of this. We still use their products where I work and none of this will make us stop. (As long as you have a warranty, you just hand it back to Apple when it breaks and it's their problem. If you still need it and the warranty is up? Fine... you pay up and let Apple service it and hand it back to you again. Their repair prices have actually gone down in recent years, as they've made more products reliant on them to service them.) Home users are the ones who get the short end of the deal though, as money is more of a problem for us and we tend to buy lesser configurations of machines to save money up front -- intending to add to it later. With Apple, that's becoming a poor decision.
TRIM says 'I won't read back from this sector, so you can erase it whenever you want'. That makes it a bit easier for the wear levelling to work. It isn't essential though. An SSD controller can remap sectors at will. Typically, it will keep track of the age (number of erase cycles) of each cell and the time of the last erase. Once a cell reaches a certain age it will write some old (and therefore hopefully infrequently changing) data onto it. Current SSDs, because of the low reliability of individual flash cells, over provision by quite a lot, so it's relatively easy to structure the writes so that everything is a copy. This doesn't even affect performance, as the reads and writes can happen in parallel. The only thing that hurts performance is if you need to block a write waiting for an erase to finish.
I am TheRaven on Soylent News
The reason that Apple disabled this is that a lot of SSDs have really buggy TRIM implementations. This observation wasn't unique to Apple: Microsoft and the Linux kernel defaulted to TRIM being off until quite recently. Apple could afford to turn it on for their own SSDs because they did extensive compatibility testing of those before shipping them.
Now, it doesn't really make sense, but enabling it automatically would likely burn some users, and bug reports about data loss lead to a lot more anger than bug reports about lower performance.
I am TheRaven on Soylent News
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.
That's nice. Except there's no such thing as an Intel-Platform-SSD and an OSX-Platform-SSD.
Yes, there are SSDs manufactured by Intel. But that's irrrelevant.
Basically this is a stupid driver+firmware hack by the Cupertino Turtleneck Crew so that if someone wants to buy a third party SSD and put it into their system, Apple can penalize them by eventually destroying the performance of the drive, simply by preventing it from doing what is now a common housekeeping function on all modern drives.
And this happens whether you buy a quality drive OR NOT.
So it has nothing to do with drive cheapness.
It has to do with Apple being giant, flaming schlongs.
Chas - The one, the only.
THANK GOD!!!
No, you couldn't, since they are Apple's drivers not yours. Apple's driver takes over handling of external drives, but it refuses to TRIM them. Previously, people worked around that by patching the driver, but signing prevents that.
Yes, you can. People are already making kext-modification scripts and other tools that get around the signing.
This is pretty much a non-issue.
Yeah, well... I'm gonna go code my own operating system, with blackjack and hookers.
Get free satoshi (Bitcoin) and Dogecoins
I have a 2009 Macbook running Yosemite. Note this machine was not available with SSD at the time it was sold. A year ago I decided to put an SSD in it, and being aware of the TRIM issue, I made a point to buy a secondhand *Apple* SSD from a Macbook Pro. Neither Mavericks nor Yosemite will enable TRIM on this machine.
So apparently, not only will OS X not enable TRIM on a non-Apple SSD, but the machine *must* be a model for which there was an SSD option at purchase.
Citation needed. Both the built-in msahci and the intel-ahci-drivers in Windows are NOT restricting TRIM in any way.
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.