Another interesting finding in my experimenting with DietPi. This ist however not related to Roon but to Linux on intel NUC-based devices (or even more general intel SATA-controllers of a certain generation) using the internal SATA-connector with SAMSUNG SSDs in general.
So whatâs the issue?
I set up DietPi on my Nuc7i3 formerly running ROCK, having all music on a 1 TB SAMSUNG 860 Evo 2.5" SATA SSD.
Monitor and keyboard are connected to access the local console, although it will be used headless after setup has completed.
When writing to the Samsung SSD (e.g. copying music files to it), the locally connected screen is flooded with error messages from the sata interface stating
âfailed command: WRITE FPDMA QUEUEDâ
Google research initially indicates hardware problems with the drive, cable or onboard SATA-Controller. Ouch. A spare SAMSUNG SSD behaves the same. A spare HDD works fine however. So hardware seems to be OK.
Digging deeper this comes down to a long standing known issue between SAMSUNG SSD, intel SATA controller and Linux Kernel with NCQ (native command queuing) implementation and it is recommended, to turn off NCQ for the specific controller/port to fix this. This slows down max. write speeds a bit, but in the above scenario you get an even bigger performance impact due to regular SATA interface halt and restart on every error.
So in case you encounter the same issues on your system, you need to edit the Linux kernel boot parameters to add a forced ânoncqâ command for the specific SATA controller/port.
Open the config file for grub filesystem to edit kernel boot parameter
sudo nano /etc/default/grub
Find the line
GRUB_CMDLINE_LINUX_DEFAULT="..."
And add the following parameter to the existing ones
libata.force=x.yy:noncq
Where âx.yyâ specifies the SATA-controller giving the errors.
The controller ID is stated in the error messages, make note of those.
In my case the controller ID is â1.00â. This could be different on your system depending on your specific hardware.
Now the edited line looks like this in my case (âconsoleblank=0â was there before, âlibata.force=1.00:noncqâ added):
GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0 libata.force=1.00:noncq"
Note: You can also leave out the controller ID, but this deactivates NCQ for all drives, so NVMe SSDs which are not affected are unnecessarily slowed down significantly by this.
Save the file and run the following commands to apply the changes:
sudo update-grub
Now reboot and youâre done. The flooding error messages should be gone now.
Hope that helps (if help is needed),
Roland
P.S.:
I donât know whether ROCK suffers from the same issue or Roon maybe has applied the same solution to it a long time ago already from testing with NUC hardware.
Testing with a monitor connected to ROCK and copying large amounts of data to the internal storage SSD didnât show any error messages on the screen, but these may just be hidden below the ROCK status message display.