R8169 flaky on X870E Mainboard

First time NixOS user here! I upgraded my PC to a gigabyte X870E Mainboard and installed NixOS.

To support my new-ish ethernet adapter, I switched to nixos-unstable and installed the latest stable kernel (6.13.1). That generally works, but I lose ethernet connection every few seconds. The weirdest part is that 2 days ago the ethernet was bad, yesterday it’s fine and today it’s bad again. I didn’t change generations or anything else really.

Here’s an excerpt from dmesg:

[ 6430.571112] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6430.571137] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6451.559421] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6464.847050] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6464.847079] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6471.377508] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6484.642525] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6484.642550] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6486.492718] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6499.933479] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6499.933514] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6505.774079] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6519.057877] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6519.057907] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6521.168313] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6534.692720] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6534.692747] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6536.231142] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6549.505506] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6549.505533] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6570.367953] r8169 0000:0e:00.0 enp14s0: Link is Down
[ 6583.735615] Realtek Internal NBASE-T PHY r8169-0-e00:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6583.735645] r8169 0000:0e:00.0 enp14s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[ 6587.080440] r8169 0000:0e:00.0 enp14s0: Link is Down

I’m happy to provide more information, I just don’t know what might be useful.

Thanks in advance!

Hello so a few things here.

  1. What do you mean with ethernet adapter. Is it build in to your mainboard or plugged into a usb port or so.
  2. When the internet is bad can you ping other devices in you home network.
  3. When the internet is bad can you access the internet form another device.
  1. Yes it’s built-in to the mainboard
  2. I just tried: pinging external (i.e. google.com) fails to resolve the name. pinging internal gives the following:
ping 192.168.2.254 # my router/dhcp server
PING 192.168.2.254 (192.168.2.254) 56(84) bytes of data.
From 192.168.2.11 icmp_seq=1 Destination Host Unreachable
From 192.168.2.11 icmp_seq=2 Destination Host Unreachable
64 bytes from 192.168.2.254: icmp_seq=13 ttl=64 time=0.910 ms
64 bytes from 192.168.2.254: icmp_seq=14 ttl=64 time=0.645 ms
64 bytes from 192.168.2.254: icmp_seq=15 ttl=64 time=0.676 ms

192.168.2.11 is my IP.

  1. I have no issues when I e.g. tether my phone WiFi via USB. (Or on Windows on the same PC as NixOS; it’s a DualBoot)

Thanks for that reply btw - it got me digging into my home network once more. I figured out that my internet provider must have updated my router software without me knowing and that must’ve borked at least part of the network.
I restarted the router ~5x, rebooted the PC and now I don’t have the flaky ethernet issue… Let’s see if it stays this way over the next few days.

1 Like

So … it did work fine for a few days until yesterday it didn’t work. I rebooted my router hoping that would help and I rebooted NixOS twice.
But same issue as before; link goes down every few seconds.

When I have a ping to a local address running, it shows when the link goes up and down - either I get a reply or “no route to host”. Very weird…

Ok that is strange. I think this is not an issue with Nixos but rather your hardware. But to be sure please do the following:

  1. Post your info of your system
  2. Post you config
  3. Have you tried other OS systems (if so does this issue exists there)
  4. Have had any issue with your Ethernet before the mainboard upgrade
  5. Is your Ethernet cable fully plunged in (is it loose or something)
  6. Is your cable good (have you connection problems with other devices when they are connected with the same cable)
  7. Where is your cable connected to (a switch or router and what models are they)