Skip to content

After last upgrade to 6.12.20 from two identical CM4 one is not booting from NVME #6751

Closed

Description

@ralf-9000

Describe the bug

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?

Ralf

Steps to reproduce the behaviour

See problem description ....

Device (s)

Raspberry Pi CM4, Raspberry Pi CM4 Lite

System

Pi OS 6.12.20

Logs

No response

Additional context

No response

Activity

  1. ralf-9000 commented on Mar 31, 2025

    @ralf-9000
    Author

    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.

  2. popcornmix commented on Mar 31, 2025

    @popcornmix
    Collaborator

    @P33M I guess #6714 is the most likely change in that interval.

  3. P33M commented on Mar 31, 2025

    @P33M
    Contributor

    Please list the model numbers of both SSDs, and the results of sudo lspci -vvv on each setup (after reverting to a working kernel).

  4. ralf-9000 commented on Mar 31, 2025

    @ralf-9000
    Author

    The NOT booting one is a SK hynix BC511 NVMe SSD (512GB):

    pi@cm4-io-base-box-1:~ $ sudo lspci -vvv
    00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) (prog-if 00 [Normal decode])
            Device tree node: /sys/firmware/devicetree/base/scb/pcie@7d500000/pci@0,0
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0
            Interrupt: pin A routed to IRQ 27
            Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
            Memory behind bridge: 00000000-000fffff [size=1M] [32-bit]
            Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled] [64-bit]
            Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
            BridgeCtl: Parity- SERR- NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
                    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
            Capabilities: [48] Power Management version 3
                    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
            Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00
                    DevCap: MaxPayload 512 bytes, PhantFunc 0
                            ExtTag- RBE+
                    DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
                            MaxPayload 128 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <2us
                            ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+
                    LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s, Width x1
                            TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt+
                    RootCap: CRSVisible+
                    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
                    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                    DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                             10BitTagComp- 10BitTagReq- OBFF Via WAKE#, ExtFmt- EETLPPrefix-
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
                             AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled, ARIFwd-
                             AtomicOpsCtl: ReqEn- EgressBlck-
                    LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS+
                    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported, DRS-
                             DownstreamComp: Link Down - Not Determined
            Capabilities: [100 v1] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                    AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
                    RootCmd: CERptEn+ NFERptEn+ FERptEn+
                    RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
                             FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
                    ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
            Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
            Capabilities: [240 v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                              PortCommonModeRestoreTime=8us PortTPowerOnTime=10us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=24us LTR1.2_Threshold=56320ns
                    L1SubCtl2: T_PwrOn=26us
            Kernel driver in use: pcieport
    
    01:00.0 Non-Volatile memory controller: SK hynix BC511 (prog-if 02 [NVM Express])
            Subsystem: SK hynix BC511 NVMe SSD
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0
            Interrupt: pin A routed to IRQ 27
            Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=16K]
            Capabilities: [80] Power Management version 3
                    Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [90] MSI: Enable- Count=1/32 Maskable+ 64bit+
                    Address: 0000000000000000  Data: 0000
                    Masking: 00000000  Pending: 00000000
            Capabilities: [b0] MSI-X: Enable+ Count=32 Masked-
                    Vector table: BAR=0 offset=00002000
                    PBA: BAR=0 offset=00003000
            Capabilities: [c0] Express (v2) Endpoint, MSI 00
                    DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 75W
                    DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
                            MaxPayload 128 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
                            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                    LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s (downgraded), Width x1 (downgraded)
                            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                    DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt+ EETLPPrefix-
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- TPHComp- ExtTPHComp-
                             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
                             AtomicOpsCtl: ReqEn-
                    LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                    LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported
            Capabilities: [100 v2] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
            Capabilities: [150 v1] Device Serial Number 37-88-86-0a-00-2e-e4-ac
            Capabilities: [160 v1] Power Budgeting <?>
            Capabilities: [1b8 v1] Latency Tolerance Reporting
                    Max snoop latency: 0ns
                    Max no snoop latency: 0ns
            Capabilities: [300 v1] Secondary PCI Express
                    LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                    LaneErrStat: 0
            Capabilities: [400 v1] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
            Capabilities: [900 v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                              PortCommonModeRestoreTime=24us PortTPowerOnTime=26us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=0us LTR1.2_Threshold=56320ns
                    L1SubCtl2: T_PwrOn=26us
            Kernel driver in use: nvme
    

    The one booting from SSD is a Sandisk Corp PC SN530 NVMe SSD (DRAM-less) 512GB:

    pi@cm4-io-base-box-2:~ $ sudo lspci -vvv
    00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) (prog-if 00 [Normal decode])
            Device tree node: /sys/firmware/devicetree/base/scb/pcie@7d500000/pci@0,0
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0
            Interrupt: pin A routed to IRQ 27
            Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
            Memory behind bridge: 00000000-000fffff [size=1M] [32-bit]
            Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled] [64-bit]
            Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
            BridgeCtl: Parity- SERR- NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
                    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
            Capabilities: [48] Power Management version 3
                    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
            Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00
                    DevCap: MaxPayload 512 bytes, PhantFunc 0
                            ExtTag- RBE+
                    DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
                            MaxPayload 128 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <2us
                            ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+
                    LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s, Width x1
                            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt+
                    RootCap: CRSVisible+
                    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
                    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                    DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                             10BitTagComp- 10BitTagReq- OBFF Via WAKE#, ExtFmt- EETLPPrefix-
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
                             AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled, ARIFwd-
                             AtomicOpsCtl: ReqEn- EgressBlck-
                    LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS+
                    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported, DRS-
                             DownstreamComp: Link Down - Not Determined
            Capabilities: [100 v1] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                    AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
                    RootCmd: CERptEn+ NFERptEn+ FERptEn+
                    RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
                             FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
                    ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
            Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
            Capabilities: [240 v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                              PortCommonModeRestoreTime=8us PortTPowerOnTime=10us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=32us LTR1.2_Threshold=48128ns
                    L1SubCtl2: T_PwrOn=10us
            Kernel driver in use: pcieport
    
    01:00.0 Non-Volatile memory controller: Sandisk Corp PC SN530 NVMe SSD (DRAM-less) (rev 01) (prog-if 02 [NVM Express])
            Subsystem: Sandisk Corp PC SN530 NVMe SSD (DRAM-less)
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0
            Interrupt: pin A routed to IRQ 27
            Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=16K]
            Region 4: Memory at 600004000 (64-bit, non-prefetchable) [size=256]
            Capabilities: [80] Power Management version 3
                    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [90] MSI: Enable- Count=1/32 Maskable- 64bit+
                    Address: 0000000000000000  Data: 0000
            Capabilities: [b0] MSI-X: Enable- Count=17 Masked-
                    Vector table: BAR=0 offset=00002000
                    PBA: BAR=4 offset=00000000
            Capabilities: [c0] Express (v2) Endpoint, MSI 00
                    DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 unlimited
                            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W
                    DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
                            MaxPayload 128 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <8us
                            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                    LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                            ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 5GT/s (downgraded), Width x1 (downgraded)
                            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                    DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt+ EETLPPrefix-
                             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                             FRS- TPHComp- ExtTPHComp-
                             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
                             AtomicOpsCtl: ReqEn-
                    LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                    LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
                             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                             Retimer- 2Retimers- CrosslinkRes: unsupported
            Capabilities: [100 v2] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                    AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                    HeaderLog: 00000000 00000000 00000000 00000000
            Capabilities: [150 v1] Device Serial Number 00-00-00-00-00-00-00-00
            Capabilities: [1b8 v1] Latency Tolerance Reporting
                    Max snoop latency: 0ns
                    Max no snoop latency: 0ns
            Capabilities: [300 v1] Secondary PCI Express
                    LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                    LaneErrStat: 0
            Capabilities: [900 v1] L1 PM Substates
                    L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1- ASPM_L1.2+ ASPM_L1.1- L1_PM_Substates+
                              PortCommonModeRestoreTime=32us PortTPowerOnTime=10us
                    L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                               T_CommonMode=0us LTR1.2_Threshold=48128ns
                    L1SubCtl2: T_PwrOn=10us
            Kernel driver in use: nvme
    
  5. P33M commented on Apr 1, 2025

    @P33M
    Contributor

    What happens if you add pcie_aspm=off to /boot/firmware/cmdline.txt on the broken drive/kernel?

  6. ralf-9000 commented on Apr 1, 2025

    @ralf-9000
    Author

    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.

  7. P33M commented on Apr 1, 2025

    @P33M
    Contributor

    As you have a boot from the SD, please post the full output of dmesg in the non-working case.

  8. ralf-9000 commented on Apr 1, 2025

    @ralf-9000
    Author

    Will do this in the evening, I am now at work ....

  9. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    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:

    pi@cm4-io-base-box-1:~ $ uname -a
    Linux cm4-io-base-box-1 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
    pi@cm4-io-base-box-1:~ $ ls -l /dev/nvme*
    crw------- 1 root root 245, 0 Nov 19 14:40 /dev/nvme0
    brw-rw---- 1 root disk 259, 0 Nov 19 14:40 /dev/nvme0n1
    brw-rw---- 1 root disk 259, 1 Nov 19 14:40 /dev/nvme0n1p1
    brw-rw---- 1 root disk 259, 2 Nov 19 14:40 /dev/nvme0n1p2
    pi@cm4-io-base-box-1:~ $
    

    Then I upgraded/updated everything and end up with 6.12.20 after reboot, see appended text file.

    pi@cm4-io-base-box-1:~ $ uname -a
    Linux cm4-io-base-box-1 6.12.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux
    pi@cm4-io-base-box-1:~ $ ls -l /dev/nvme*
    crw------- 1 root root 245, 0 Apr  2 09:21 /dev/nvme0
    pi@cm4-io-base-box-1:~ $
    

    Now I booted again and could give you now the dmesg output (see file appendix).

    Ralf

  10. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    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):

    i@cm4-io-base-box-1:~ $ dmesg | grep nvme
    [    0.709495] nvme nvme0: pci function 0000:01:00.0
    [    0.709560] nvme 0000:01:00.0: enabling device (0000 -> 0002)
    [    0.712010] nvme nvme0: missing or invalid SUBNQN field.
    [    0.714095] nvme nvme0: IO queues not created
    pi@cm4-io-base-box-1:~ $
    

    On the SSD booting 2 I see the correct output:

    pi@cm4-io-base-box-2:~ $ dmesg | grep nvme
    [    0.697302] nvme nvme0: pci function 0000:01:00.0
    [    0.697343] nvme 0000:01:00.0: enabling device (0000 -> 0002)
    [    0.704022] nvme nvme0: failed to allocate host memory buffer.
    [    0.704794] nvme nvme0: 1/0/0 default/read/poll queues
    [    0.714206]  nvme0n1: p1 p2
    [    1.673657] EXT4-fs (nvme0n1p2): mounted filesystem ce208fd3-38a8-424a-87a2-cd44114eb820 ro with ordered data mode. Quota mode: none.
    [    2.319553] EXT4-fs (nvme0n1p2): re-mounted ce208fd3-38a8-424a-87a2-cd44114eb820 r/w. Quota mode: none.
    pi@cm4-io-base-box-2:~ $
    

    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:

    pi@cm4-io-base-box-1:~ $ uname -a
    Linux cm4-io-base-box-1 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
    pi@cm4-io-base-box-1:~ $ dmesg | grep nvme
    [    1.311723] nvme nvme0: pci function 0000:01:00.0
    [    1.311753] nvme 0000:01:00.0: enabling device (0000 -> 0002)
    [    1.321558] nvme nvme0: missing or invalid SUBNQN field.
    [    1.325726] nvme nvme0: 4/0/0 default/read/poll queues
    [    1.331070]  nvme0n1: p1 p2
    [    4.210103] EXT4-fs (nvme0n1p2): mounted filesystem ce208fd3-38a8-424a-87a2-cd44114eb820 ro with ordered data mode. Quota mode: none.
    [    5.295868] EXT4-fs (nvme0n1p2): re-mounted ce208fd3-38a8-424a-87a2-cd44114eb820 r/w. Quota mode: none.
    pi@cm4-io-base-box-1:~ $
    
    

    I think still that is a timing issue, is there a possibility to delay the SSD recognition a bit for a test?

    Ralf

  11. P33M commented on Apr 2, 2025

    @P33M
    Contributor

    Please post the full contents of dmesg in the failing case (to pastebin if too large).

  12. P33M commented on Apr 2, 2025

    @P33M
    Contributor

    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.

  13. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    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 ...

  14. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    Do you have anything nonstandard in the config.txt of either board?

    Here is my config.txt (identical on both) ....

    config.txt

  15. pelwell commented on Apr 2, 2025

    @pelwell
    Contributor

    Have you tried without dtparam=pciex1_gen=3?

  16. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    Have you tried without dtparam=pciex1_gen=3?

    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 ....

  17. P33M commented on Apr 2, 2025

    @P33M
    Contributor

    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).

  18. P33M commented on Apr 2, 2025

    @P33M
    Contributor

    Same drive works on 6.12 with a Pi 5 8GB and HAT+.

  19. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    The hat or CM4 carrier board does not matter in mv tests:

    • SK Hynix SSD 512GB up to 6.12.18 working on all tested constellations
    • SK Hynix SSD 512GB 6.12.20 NOT anymore working in all tested constellations

    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 .....

  20. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    Minor side effect (maybe helpful to find the root cause with the SDDs):

    On both CM4 I have a 4-pin fan (PWM controlled):

    • I have speed control of the fan in every constellation 6.12.18 and below (except some old versions what is known)
    • If the SK Hynix SSD is installed the fan runs always full speed with 6.12.20 on SD card.
    • With the WD SN530 the speed control is active (especially on 6.12.20)
    • With SK Hynix only full speed with 6.12.20
    • On both boards with removed SSD cards always normal speed control.

    So it looks for me like some strange side effects, but maybe it gives a hint to the root cause ....

  21. P33M commented on Apr 2, 2025

    @P33M
    Contributor

    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.

  22. ralf-9000 commented on Apr 2, 2025

    @ralf-9000
    Author

    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?

  23. ralf-9000 commented on Apr 3, 2025

    @ralf-9000
    Author

    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

    pi@cm4-io-base-box-1:~ $ dmesg | grep nvme
    [    0.743644] nvme nvme0: pci function 0000:01:00.0
    [    0.743681] nvme 0000:01:00.0: enabling device (0000 -> 0002)
    [    0.746015] nvme nvme0: missing or invalid SUBNQN field.
    [    0.748471] nvme nvme0: 4/0/0 default/read/poll queues
    [    0.754509]  nvme0n1: p1 p2
    [    1.725076] EXT4-fs (nvme0n1p2): mounted filesystem ce208fd3-38a8-424a-87a2-cd44114eb820 ro with ordered data mode. Quota mode: none.
    [    2.389857] EXT4-fs (nvme0n1p2): re-mounted ce208fd3-38a8-424a-87a2-cd44114eb820 r/w. Quota mode: none.
    pi@cm4-io-base-box-1:~ $
    
  24. popcornmix commented on Apr 3, 2025

    @popcornmix
    Collaborator

    One question: Can I now let this CM4 participate in the normal update/upgrade cycles?

    Yes, the fix has been merged so will be present in any future kernel builds (apt or rpi-update).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions