Oculink eGPU link speed limits to 2.5 GT/S

I use oculink to connect my RTX 3080 under fedora 43, but it can only run at PCie Gen1 x4 both at idle and under load.
Then i switched to Windows 11 and everything works great with full PCIe Gen4 x4 bandwidth, good performance.

I found something in kernel log

pci 0000:00:01.1: broken device, retraining non-functional downstream link at 2.5GT/s
pci 0000:01:00.0: 8.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x4 link at 0000:00:01.1 (capable of 252.048 Gb/s with 16.0 GT/s PCIe x16 link)
pci 0000:00:01.1: ASPM: current common clock configuration is inconsistent, reconfiguring

One solution i found is manually changing PCie port speed using setpci with commands below

sudo setpci -s 0000:00:01.1 CAP_EXP+30.L=4:4
sudo setpci -s 0000:00:01.1 CAP_EXP+10.L=20:20

It didn’t work though. AI also advised me to try this script, PCie_set_speed, but maked no difference.
I also tried these kernel parameter, but none of them could help.

sudo grubby --update-kernel=ALL --args="pcie_aspm=off pcie_port_pm=off"

Then i switched to Linux Mint, and find same kernel log and same limited PCie port speed

For now, i find a kernel patch that might prevent this problem, but i’m sure.
Do you have any ideas?
Detailed system setup:

  • Operating System: Fedora Linux 43
  • KDE Plasma Version: 6.6.2
  • KDE Frameworks Version: 6.24.0
  • Qt Version: 6.10.2
  • Kernel Version: 6.19.7-200.fc43.x86_64 (64-bit)
  • Graphics Platform: Wayland
  • Processors: 16 × AMD Ryzen 7 H 255 w/ Radeon 780M Graphics
  • Memory: 32 GiB of RAM (27.2 GiB usable)
  • Graphics Processor 1: AMD Radeon 780M Graphics
  • Graphics Processor 2: NVIDIA GeForce RTX 3080
  • Manufacturer: LENOVO
  • Product Name: 21VS
  • System Version: ThinkBook 16 G8+ AHP(with built-in tgx port)

OK, i found one strange solution.
My oculink egpu adapter support auto boot and shutdown with host pc, but it will not response to a reboot action, here is detailed steps i did.

  1. Normally boot from last normally shutdown
  2. reboot again
  3. echo 1 | sudo tee /sys/bus/pci/rescan to scan my egpu
    Then it can run at PCie GEN4 x4
    So how to make it work in a normal boot?