My nvme SSD does not work properly on Linux 5.18

The model of SSD is Shannon P6F3840
linux518 Kernel log:

This SSD can work normally under linux515.
linux515 Kernel log:

What does SSD not work on Linux518? → Unable boot? or Kernel cannot be started?


I see your error log of Linux Kernel 5.18, but 5.15 has no error.

[    2.284083] iwlwifi 0000:28:00.0: Direct firmware load for iwlwifi-cc-a0-72.ucode failed with error -2
[    2.287707] iwlwifi 0000:28:00.0: api flags index 2 larger than supported by driver
[    2.287720] iwlwifi 0000:28:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
[    2.287941] iwlwifi 0000:28:00.0: loaded firmware version 71.058653f6.0 cc-a0-71.ucode op_mode iwlmvm

Only wifi has the issue.

NVME SSD :Shannon P6F3840
In fact, if I use linux518, I cannot find this SSD under the /dev folder.

I see, Linux518 does not support this SSD, but Shannon P6F3840 is quite unknown to me.
So you can use Linux 515 LTS.


Linux515 detects two SSDs

[    0.703361] nvme nvme0: pci function 0000:01:00.0
[    0.703395] nvme nvme1: pci function 0000:23:00.0

Linux518 detects one SSD:

[    1.259103] nvme nvme0: pci function 0000:01:00.0

The SSD firmware is likely to have a uncommon implementation of the nvme commands.

It is not possible to say what or which storage commands are implemented or perhaps not implemented but it likely the device will work with Windows - it has probably been designed with Windows in mind.

Actually this SSD should be a data center oriented product.

Perhaps it need a special controller card?

But if 5.15 recognises the disk … stranger things …

In short, the PCI-E driver should have changed.

@Dark_iaji, you could check if you are affected by this FS#74916 : NVME device not found with linux-5.18.1.arch1-1 bug.

If you buy two identical NVME SSDs, you should know that hardware manufacturers will sometimes get lazy and use the same internal hardware ID for every unit of the same batch/model. This works fine on Windows, and on any recent version of the Linux kernel prior to 5.18.

Kernel 5.18 (the current mainline version) was changed to specifically reject duplicate IDs for… reasons (e.g. https://bugzilla.kernel.org/show_bug.cgi?format=multiple&id=216049)

4 Likes
lspci -vv -s 01:00.0    
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM173X (prog-if 02 [NVM Express])
        Subsystem: Samsung Electronics Co Ltd Device a801
        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, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 43
        NUMA node: 0
        IOMMU group: 15
        Region 0: Memory at fcd10000 (64-bit, non-prefetchable) [size=32K]
        Expansion ROM at fcc00000 [disabled] [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: nvme

lspci -vv -s 23:00.0
23:00.0 Non-Volatile memory controller: Shannon Systems Venice NVMe SSD (rev 03) (prog-if 02 [NVM Express])
        Subsystem: Shannon Systems Venice-E Series NVMe U.2
        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, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 39
        NUMA node: 0
        IOMMU group: 24
        Region 0: Memory at fc920000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at fc900000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvme

I use two completely different nvme SSDs.
Is there any kernel command line that allows me to get more PCI logs?

Shannon SSD is using SATA interface by default, but not PCI-E?

You mean that you need “SATA to PCIE” adapter for it. But I do not think it works. (Or I am wrong)
But Linux 518 breaks it or has some bug for it.


I also bought unknown keyboard myself, but all Linux Kernels do not recognize the keyboard properly and marked it as wrong ID “Camera”

$ lsusb
....
Bus 001 Device 003: ID 0c45:8006 Microdia Dual Mode Camera (8006 VGA)
....

Just normal NVME SSDs.

This doesn’t seem to be a bug caused by the kernel, but by a package built in the manjaro source, and I’ve located this commit.

I think you are misreading the specific commit - this is not a random Manjaro idea - it appears to be an adopted configuration from zen kernel

That becomes clear when you check the name of the patch file

+config USER_NS_UNPRIVILEGED
+	bool "Allow unprivileged users to create namespaces"
+	default y
+	depends on USER_NS
+	help
+	  When disabled, unprivileged users will not be able to create
+	  new namespaces. Allowing users to create their own namespaces
+	  has been part of several recent local privilege escalation
+	  exploits, so if you need user namespaces but are
+	  paranoid^Wsecurity-conscious you want to disable this.
+
+	  This setting can be overridden at runtime via the
+	  kernel.unprivileged_userns_clone sysctl.
+
+	  If unsure, say Y.

Running the command as root - is likely to reveal extra data.

When I execute lspci, I find that this SSD can be found in lspci, but it seems to use vfio-pci Driver. I realize that I configured this SSD to use vfio-pci Driver two months ago. When I stop using vfio-pci for this SSD, I can find the block device of this SSD under the /dev folder.
:weary: