Realtek r8127 Ethernet NIC disappears on every reboot, only recovers with full power cycle

The Problem

After a warm reboot (sudo reboot), the onboard Realtek r8127 10GbE Ethernet NIC completely disappears from the system. It does not show up in lspci, dmesg, ip link, or /sys/class/net/. The PCI bridge (0007:00:00.0) that should host it is present, but nothing is enumerated behind it.

The only way to recover the NIC is a full power cycle β€” sudo poweroff, physically unplug the power cable for 30 seconds, then plug back in and boot. After a cold boot, the Realtek appears normally at PCI 0007:01:00.0 and works fine.

WiFi (MediaTek MT7925) and all other PCI devices (ConnectX-7, NVMe, GPU) survive reboots without issue. Only the Realtek Ethernet is affected.

This started after trying to go to the 590.* driver. I revert back to 580.

System Details

  • Product: DGX Spark, hardware version A.7
  • BIOS: AMI 5.36_0ACUM018 (2025-08-06)
  • OS: Ubuntu 24.04.4 LTS
  • Kernel: 6.17.0-1008-nvidia
  • ConnectX-7 FW: 28.45.4028
  • Realtek NIC: r8127 (rev 05), PCI address 0007:01:00.0

Reproduction

Starting from a known-good state (NIC present after power cycle):

  1. Confirm NIC is working: sudo lspci -s 0007:01:00.0 shows the Realtek, ip -br link | grep enP7 shows the interface UP
  2. Reboot: sudo reboot
  3. After boot: sudo lspci -s 0007:01:00.0 returns empty. Interface enP7s7 does not exist.

I tested this 3 times consecutively β€” 100% failure rate on warm reboot.

Cold reboot, the NIC comes back.

PCI Bridge State When NIC Is Missing

$ sudo lspci -vv -s 0007:00:00.0 | grep -i 'link\|slot\|status'

LnkCap: Port #0, Speed 16GT/s, Width x1
LnkSta: Speed 2.5GT/s, Width x1
SltSta: PresDet- (no presence detected)
DownstreamComp: Link Down - Not Determined

The bridge sees no device present (PresDet-) and the link is at minimum speed (2.5GT/s). The Realtek chip is not responding to PCI link training after the warm reset.

Full PCI Device List (When NIC Is Missing)

0000:00:00.0 PCI bridge: NVIDIA Corporation Device 22ce (rev 01)
0000:01:00.0 Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]
0000:01:00.1 Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]
0002:00:00.0 PCI bridge: NVIDIA Corporation Device 22ce (rev 01)
0002:01:00.0 Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]
0002:01:00.1 Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]
0004:00:00.0 PCI bridge: NVIDIA Corporation Device 22ce (rev 01)
0004:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd
0007:00:00.0 PCI bridge: NVIDIA Corporation Device 22d0 (rev 01)   ← bridge present, nothing behind it
0009:00:00.0 PCI bridge: NVIDIA Corporation Device 22d0 (rev 01)
0009:01:00.0 Network controller: MEDIATEK Corp. Device 7925         ← WiFi works fine
000f:00:00.0 PCI bridge: NVIDIA Corporation Device 22d1
000f:01:00.0 VGA compatible controller: NVIDIA Corporation Device 2e12 (rev a1)

Frequency

Approximately 6 occurrences over 3 days. Every warm reboot I’ve attempted has lost the NIC.

Workaround

Using WiFi as a fallback for remote access. When Ethernet is needed, a full power cycle is required.

Software Workarounds Attempted (All Failed)

Method Command Result
Local bridge rescan echo 1 > /sys/bus/pci/devices/0007:00:00.0/rescan No effect
Global PCI rescan echo 1 > /sys/bus/pci/rescan No effect
Bridge remove + rescan echo 1 > .../0007:00:00.0/remove then echo 1 > /sys/bus/pci/rescan Bridge returns, Realtek still missing

The bridge re-enumerates after remove+rescan, but the Realtek chip never responds. The issue is below the OS β€” the hardware isn’t participating in PCI link training after warm reset.

Any help appreciated. Happy to provide additional diagnostics.

Until this is fixed, I wrote a systemd timer that checks if the Realtek NIC is present every 60 seconds. If it detects the NIC has disappeared (3 consecutive failures), it automatically enables WiFi so I can still access the system.

Includes flap protection and optional push notifications via ntfy.

Could you please check what driver you are using (lspci -vv)?

Kernel driver in use: r8127
Kernel modules: r8169, r8127

It should be r8127. The r8169 driver causes the device to disappear after soft-reboot. Simply blacklist the driver, e.g. add modprobe.blacklist=r8169 to the kernel command line.

The fix works. Thank you @czankel!

Confirmed: spark was loading r8169 instead of r8127. Blacklisting worked. This is how I did it:

# Backup grub, just in case
sudo cp /etc/default/grub /etc/default/grub.bak

# Edit GRUB config
sudo nano /etc/default/grub

# Find this line:
GRUB_CMDLINE_LINUX_DEFAULT="..."

# Add modprobe.blacklist=r8169 inside the quotes, e.g.:
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,921600 modprobe.blacklist=r8169"

# Save, then:
sudo update-grub

# Test rebooting and powering off a bunch of times
# sudo power off
# sudo reboot

For me, the r8127 driver was already installed at /lib/modules/$(uname -r)/kernel/drivers/net/ethernet/realtek/r8127/r8127.ko.zst