0

I recently bought a new Samsung 870 EVO SSD for my computer (AMD CPU, nvidia GPU) which was previously running on a Samsung 860 EVO SSD. I installed Ubuntu 20.04 on the new disk. No issues during installation. I encountered no problems with the old SSD (same Ubuntu version). System works fine once booted (no errors whatsoever in dmesg). But now I am randomly getting these errors at boot (~ 1 out of 10 boots):

ata1.00: status: { DRDY }
ata1.00: failed command: READ FPDMA QUEUED
ata1.00: cmd 60/08:70:58:a6:46/00:00:10:00:00/40 tag 14 ncq 4096 in

When this happens, computer usually won't boot, or takes a lot of time and once booted OS is not usable. A simple restart fixes the issue and then everything works as expected.

What I tried :

  • Sent my first 870 back and asked for a replacement -> Same errors with the new one.
  • Changed SATA cable and switched SATA port on motherboard -> Same.
  • Smartctl -t long finds no errors.

There are lots of posts with the same issue, and it seems that the only offered solution is to disable NCQ. From what I understood, disabling it will significantly lower system performance which I would like to avoid. What can be wrong with this new SSD given that the previous model always worked just fine ?

  • Download Samsung Magician and check your SSD firmware. Else do the NCQ patch that I've outlined many times elsewhere. – heynnema May 31 '21 at 20:32
  • There is no samsung magician for Ubuntu and I don't have any windows PC at hand. Can I somehow update the firmware without Windows ? The patch you are talking about (deactivating NCQ) is exactly what I would like to avoid. – Caribou123 Jun 01 '21 at 19:27
  • You might try FreeDOS (https://freedos.org) and see if Samsung Magician will run with that. The NCQ patch should fix your problem, without too many bad side effects (if any). – heynnema Jun 01 '21 at 19:56
  • I ended up here : https://bugzilla.kernel.org/show_bug.cgi?id=201693 Where it's recommended to try : libata.force=noncqtrim, which is supposed to impact performance less than libata.force=noncq. I'll post an update here in some days. I also found that my SSD's firmware is the latest one. – Caribou123 Jun 01 '21 at 20:40
  • In reading the link that you provided, libata.force=noncqtrim is only mentioned once, and it didn't fix/workaround the NCQ problem. My patch seems to work fine. Do you want me to repost it here, or have you found my answers here already? – heynnema Jun 01 '21 at 22:48
  • It's mentioned 16 times, just not in it's full form. Search for only : noncqtrim. I assumed your patch was to deactivate NCQ with libata.force=noncq for it's what you mentioned in another post. If it's something else than I would very much appreciate a repost. – Caribou123 Jun 02 '21 at 11:22
  • Status please... – heynnema Jun 04 '21 at 14:30
  • It's difficult to tell yet. Issue was not happening often. If it does not reappear by the end of next week I'll assume noncqtrim solved the issue. – Caribou123 Jun 04 '21 at 15:33
  • Please let me know if that does work, so maybe I can start recommending it. Monitor it with grep -i FPDMA /var/log/syslog*. – heynnema Jun 04 '21 at 16:13
  • Status please... – heynnema Jun 08 '21 at 13:38
  • The issue has not reappeared since, I'll consider this solved. I'll update this post in the future if it does. – Caribou123 Jun 11 '21 at 09:03

1 Answers1

-1

Note: Download Samsung Magician and check your SSD firmware. https://www.samsung.com/semiconductor/minisite/ssd/download/tools/

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs/etc., and watch grep -i FPDMA /var/log/syslog* or dmesg for continued error messages.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

Update #1:

User set libata.force=noncqtrim, which is supposed to impact performance less than libata.force=noncq. Will continue to monitor.

heynnema
  • 70,711