Pci express slot x16 does not work for x1 card

I tried two pci express x1 card in the x16 slot, neither was even detected the kernel, lspci showed nothing of course, it’s like two of them are not even power on.

however both x1 cards work in desktop’s pci express x16 slots, plus, a x16 AMD GPU card works on unmatched board as well.

both x1 cards are wifi cards but I don’t want to use the M.2 slot for that, question is, why did not the x1 work in x16 slot here?

Looked at schematics and nothing suspicious to me either.

It has nothing to do with the slot chosen, if an x1 card doesn’t work in the board’s regular PCIe slot, then it’s highly unlikely it will if you wire it through a passive adapter to either of the M.2 slots. I have tried numerous x1 cards with my board and they work just fine in the x16 slot, such as SATA, USB, UART devices. Mind that the slot is x8 really with the remaining positions left unconnected.

There may be an incompatibility between your cards and the onboard PCIe switch device due to a silicon erratum, such as one I have worked around in the Linux kernel with PCI: Work around PCIe link training failures (a complementing fix went into U-Boot with pci: Work around PCIe link training failures). The symptoms are exactly as you report, nothing there in lspci, although with said erratum in effect if you’re meticulous enough and run lspci -vvv -s 02:08.0 (which is the downstream port of the upstream switch wired to the x16 slot) numerous times, then you may be able to spot the Train flag under the LnkSta entry flipping between - and +.

I suggest that you try Linux 6.5 or later and see if that changes anything for you; I’d be glad to hear of the outcome. Otherwise there might be another incompatibility causing you a problem here, or that the workaround is not good enough for your case, as the exact nature of the erratum has not been yet determined and the manufacturers of the devices involved declined to comment.

These are very helpful and I’m using 5.15 as the kernel, I will see if I can backport them before trying a new kernel. Thanks!!!

With 5.15 you may instead try an earlier version of the change: pci: Work around ASMedia ASM2824 PCIe link training failures, which is functionally equivalent for basic usage (i.e. not for suspend/resume, etc.) and should be easier to apply, as it has later grown to a patch series, which actually relies on other changes made meanwhile too, so it might be a nightmare to backport.