You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After last upgrade to 6.12.20 from two identical CM4 one is not booting from NVME #6751
I have 2 identical CM4s with the same Waveshare board with (only) NVME SSD. They run the same application and on Sunday I made on both the same official upgrade/update to 6.12.20. One is ok and one isn't anymore booting from NVME. The NVME drives are from different vendors, that is the only HW difference.
Because there are identical (except NVME drive vendor), I cloned the SSD of the booting one to the failed one. Again not booting.
So I made a SD card with the old 6.6 and the same disk UUID and boot the failed CM4 again. Immediately it is booting, recognized the SSD with the 6.6 kernel and mount the root filesystem with /dev/nvme0n1p1 (and not the SD one) and everything is fine and is working like normal.
Now I updated this SD card to 6.12.20 and - for sure it boots - but now NOT with SSD as root filesystem, it uses now the SD partition 2.
I logged in and checked the device entries. Only /dev/nvme0 was there, no ...0n1, no partition entries.
Now with booting SD 6.6. and filesystem on the NVME, I checked everything: both partitions of the two CM5 have the same content and structure as on the identical working CM4 with the different NVME vendor ....
Can it be that we have in the new kernel again a timing issue (as in old times) with recognizing the SSD?
I have checked now between which versions it has happened: this error has came in between 6.12.18 and 6.12.20. 6.12.18 boots normal from this SSD. 6.12.19 not tested.
I have tried this: no difference, still not booting directly from the SSD.
In a 2nd try I have add this option to the 6.16.20 SD card, it boots again completely from SD, but the SDD partitions are not there then, like before.
In a 3rd try with the 6.6 SD card and the 6.12.18 is no difference: the SDD partitions can be mounted.
I don't think it has to do with the power management, I still assume it's the longer duration of this SSD to come up: 26us compared to 10us of the working one. Maybe now the kernal waits not any more long enough for the SDD coming up ... only a thought.
But if I go back to the 6.6.51 where 1 is booting fine I see also the "SUBNQN" line, so it can't be the case. But the NVME initialization is much later 1.311 instead of 0.709:
Ah. It's already an attachment. Something odd is happening - it can't allocate memory for the hardware descriptors. Do you have anything nonstandard in the config.txt of either board?
The usual suspects are if a device (or host window) is 32-bit but tries to allocate from above 4GB. Or above 3GB in the case of older BCM2711 chips. It should all "just work" as the firmware fixes up any such mismatches.
There is only this SSD and the CPU fan (with 4-pin fan control) connected directly to this CM4. The CM4 has 8GB RAM and is without eMMC.
The other one is identical, the ONLY difference is the SSD model as describted before .... working in this setup for years with every update/upgrade without any problems up to 6.12.18 and then to 6.12.20 .... bum ...
Even when I boot from a fresh downloaded image on SD with standard update/upgrate to 6.12.20 (no config.txt and other changes), I get the same result. 6.12.18 fine, 6.12.20 this issue ....
Aha. I have an SK Hynix SSD in my collection (random OEM) and I get a failure to probe on a CM4 lite 8GB with 6.12. Furthermore, about half the drives seem to come up with 1 queue enabled and not 4 (== number of CPUs).
If you're willing to test an rpi-update kernel that may fix this drive enumeration failure, please do sudo rpi-update pulls/6761. Backup any important data on the SD or SSD before doing so.
Activity
ralf-9000 commentedon Mar 31, 2025
I have checked now between which versions it has happened: this error has came in between 6.12.18 and 6.12.20. 6.12.18 boots normal from this SSD. 6.12.19 not tested.
popcornmix commentedon Mar 31, 2025
@P33M I guess #6714 is the most likely change in that interval.
P33M commentedon Mar 31, 2025
Please list the model numbers of both SSDs, and the results of
sudo lspci -vvvon each setup (after reverting to a working kernel).ralf-9000 commentedon Mar 31, 2025
The NOT booting one is a SK hynix BC511 NVMe SSD (512GB):
The one booting from SSD is a Sandisk Corp PC SN530 NVMe SSD (DRAM-less) 512GB:
P33M commentedon Apr 1, 2025
What happens if you add
pcie_aspm=offto /boot/firmware/cmdline.txt on the broken drive/kernel?ralf-9000 commentedon Apr 1, 2025
I have tried this: no difference, still not booting directly from the SSD.
In a 2nd try I have add this option to the 6.16.20 SD card, it boots again completely from SD, but the SDD partitions are not there then, like before.
In a 3rd try with the 6.6 SD card and the 6.12.18 is no difference: the SDD partitions can be mounted.
I don't think it has to do with the power management, I still assume it's the longer duration of this SSD to come up: 26us compared to 10us of the working one. Maybe now the kernal waits not any more long enough for the SDD coming up ... only a thought.
P33M commentedon Apr 1, 2025
As you have a boot from the SD, please post the full output of
dmesgin the non-working case.ralf-9000 commentedon Apr 1, 2025
Will do this in the evening, I am now at work ....
ralf-9000 commentedon Apr 2, 2025
demsg.txt
Sorry, I came yesterday to late from work and then family has priority .... but now in the morning:
I have created again a fresh SD card with 64bit lite image, after that:
Then I upgraded/updated everything and end up with 6.12.20 after reboot, see appended text file.
Now I booted again and could give you now the dmesg output (see file appendix).
Ralf
ralf-9000 commentedon Apr 2, 2025
The only difference I see in 6.16.20 to my fully booting 2 in 1 is the partition table read (or a read at all):
On the SSD booting 2 I see the correct output:
But if I go back to the 6.6.51 where 1 is booting fine I see also the "SUBNQN" line, so it can't be the case. But the NVME initialization is much later 1.311 instead of 0.709:
I think still that is a timing issue, is there a possibility to delay the SSD recognition a bit for a test?
Ralf
P33M commentedon Apr 2, 2025
Please post the full contents of dmesg in the failing case (to pastebin if too large).
P33M commentedon Apr 2, 2025
Ah. It's already an attachment. Something odd is happening - it can't allocate memory for the hardware descriptors. Do you have anything nonstandard in the config.txt of either board?
The usual suspects are if a device (or host window) is 32-bit but tries to allocate from above 4GB. Or above 3GB in the case of older BCM2711 chips. It should all "just work" as the firmware fixes up any such mismatches.
ralf-9000 commentedon Apr 2, 2025
There is only this SSD and the CPU fan (with 4-pin fan control) connected directly to this CM4. The CM4 has 8GB RAM and is without eMMC.
The other one is identical, the ONLY difference is the SSD model as describted before .... working in this setup for years with every update/upgrade without any problems up to 6.12.18 and then to 6.12.20 .... bum ...
ralf-9000 commentedon Apr 2, 2025
Here is my config.txt (identical on both) ....
config.txt
pelwell commentedon Apr 2, 2025
Have you tried without
dtparam=pciex1_gen=3?ralf-9000 commentedon Apr 2, 2025
Yes, no influence ....
Even when I boot from a fresh downloaded image on SD with standard update/upgrate to 6.12.20 (no config.txt and other changes), I get the same result. 6.12.18 fine, 6.12.20 this issue ....
P33M commentedon Apr 2, 2025
Aha. I have an SK Hynix SSD in my collection (random OEM) and I get a failure to probe on a CM4 lite 8GB with 6.12. Furthermore, about half the drives seem to come up with 1 queue enabled and not 4 (== number of CPUs).
P33M commentedon Apr 2, 2025
Same drive works on 6.12 with a Pi 5 8GB and HAT+.
ralf-9000 commentedon Apr 2, 2025
The hat or CM4 carrier board does not matter in mv tests:
Because I need a solution, I have order a brandnew brother of the working WD SN530 512GB now on Ebay for 33€ :-)
But I think that has in the actual change since 6.16.18 a root cause also affecting other vendors and SSDs .....
ralf-9000 commentedon Apr 2, 2025
Minor side effect (maybe helpful to find the root cause with the SDDs):
On both CM4 I have a 4-pin fan (PWM controlled):
So it looks for me like some strange side effects, but maybe it gives a hint to the root cause ....
P33M commentedon Apr 2, 2025
If you're willing to test an rpi-update kernel that may fix this drive enumeration failure, please do
sudo rpi-update pulls/6761. Backup any important data on the SD or SSD before doing so.ralf-9000 commentedon Apr 2, 2025
I can do this tomorrow on the CM4 with the drive problem. Have I to mount then the 1st partition with the SDD?
/dev/nvme0n1p1 -> /boot/firmware
Because at the moment /boot/firmware is mounted on the SD card, I will umount it and mount it on NVME ....
No danger, I have a backup on my Sysnology and the 2nd working CM4 is a dd-clone of the not working one before going to 6.1.20 .....
You said "drive enumeration failure", so you found something in the changed code?
ralf-9000 commentedon Apr 3, 2025
So, I have tested 6761, see the file appended, what I have done ....
SUCCESS, it's now again booting from SSD only. And the minor fan problem (mentioned above) is also away ...
One question: Can I now let this CM4 participate in the normal update/upgrade cycles?
Many thanks, Ralf
implementing-6761.txt
popcornmix commentedon Apr 3, 2025
Yes, the fix has been merged so will be present in any future kernel builds (apt or rpi-update).