With a Pi setup with as many HATs are you have at play here, there could be many potential things that are going wrong.
Let’s start by trying to remove excess variables at play, starting with the physical layer. You have the PCIe Expansion Board between the M2 HAT and the Pi, which is going to add a lot of potential failure points.
Is the behaviour still occurring during the following situations:
When the M2 HAT is connected directly to the Pi, without the PCIe Expansion Board?
When a different NVMe Drive is used with the M2 HAT? Could you also tell us what NVMe drive you are using? Some have known issues with the Pi.
I have a 1 tbCorsair MP600 MICRO NVMe as recommend at the time of purchase.
I have not tried without the 2CH PCI hat as I expect the NVMe wont fail because it will not be written to like it is when the AI hat is being used for video recording. Nor have i tied another NVMe. I dont have access to one.
I can try without the 2CH PCI Hat and AI Hat but I will have nothing to run then to test out the NVMe.
Do you have a suggestion on how to stress test the NVMe.
I have been using Sudo smartctl -t short /dev/nvme0 - Sudo smartctl -l selftest /dev/nvme0 to do short tests. It has never failed doing this testing.
Hey, @Matt217152 I get that it’s a little frustrating, but I’d still strongly recommend breaking the stack down first. With all of these units together, there are just too many variables to tell whether this is a configuration limit or one component misbehaving.
First we need to prove that the NVMe + M.2 HAT combi is stable directly on the Pi. That gives a clean baseline and helps rule out a faulty ribbon, HAT, etc.
To give it a good testing, you should use something like fio command on a file. It will make a controlled disk workload that’s more likely to expose I/O errors, power issues, or device problems. Try using the below:
I did as suggested. No logs in dmesg with only the m2 hat. Ran the same test with all hats. No Dmesg logs. Ran frigate and I get this after a few minutes.
[ 1506.321960] nvme nvme0: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0x10
[ 1506.321985] nvme nvme0: Does your device have a faulty power saving mode enabled?
[ 1506.322121] nvme nvme0: Try “nvme_core.default_ps_max_latency_us=0 pcie_aspm=off pcie_port_pm=off” and report a bug
At a glance these error’s indicate an issue with driver availability, and the power mode is the most common type (and it would be uncommon that a network storage device would drop out for other reasons).
But I hope this fixes it! Please let us know if you run into any future issues
Liam
Glad you were able to find a solution. As Liam says, power mode issues can be pretty common with peripherals, I’m glad dmesg pointed you in the right direction.