No carrier on network card

I'm using nixos with an ASRock 960GM-VGS3 FX motherboard. It seems to me that the network interface randomly stops working. I get a no carrier on most boots. After upgrading to the 6.9 kernel it seemed to work, and then on one boot I got the no carrier message again. I don't think it's a hardware problem as it worked on some boots, and also worked before on windows. I also tested multiple cables, and tested the cables with other devices plugged into them.

ethtool outputs:

driver: atl1c
version: 6.9.9
firmware-version: 
expansion-rom-version: 
bus-info: 0000:02:00.0
supports-statistics: no
supports-test: no
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
Settings for eth0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                       100baseT/Half 100baseT/Full
	                       1000baseT/Full
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  100baseT/Full
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Speed: Unknown!
	Duplex: Unknown! (255)
	Auto-negotiation: on
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	MDI-X: Unknown
	Supports Wake-on: pg
	Wake-on: g
        Current message level: 0x0000003f (63)
                               drv probe link timer ifdown ifup
	Link detected: no

dmesg:

[    0.277484] pci 0000:02:00.0: [1969:1083] type 00 class 0x020000 PCIe Endpoint
[    0.277509] pci 0000:02:00.0: BAR 0 [mem 0xfebc0000-0xfebfffff 64bit]
[    0.277519] pci 0000:02:00.0: BAR 2 [io  0xe800-0xe87f]
[    0.277571] pci 0000:02:00.0: [Firmware Bug]: disabling VPD access (can't determine size of non-standard VPD format)
[    0.277626] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold

The problem persists even if I boot into a live iso, but as I said, it doesn't seem to be a hardware problem. Could this be a driver problem?

edit: I also tested it now with wake on lan and it works. I think this further supports that it is a driver problem.

Yea, this might be a known problem.

Read this:

https://www.reddit.com/r/framework/comments/yu3vvr/cant_connect_via_ethernet_on_nixos/

and perhaps try the suggested solution and see if it works for you.

Do post back progress or lack of.

Sadly it didn't seem to fix it. This is a PCI network card, so I don't think udev rules could help here. I also looked into PCI suspend settings and tried setting /sys/bus/pci/devices/0000:02:00.0/power/control to "on" but doesn't work either.

Yes, it looks like a driver problem.

This is strange. Is your lan a 100baseT/Full? Otherwise it should fail.

Do you have network manager? Then look here:

I tried it with different settings, hoping that it would work with a slower connection speed, but to no avail. I also tried it with and without network manager, it didn't seem to matter. (In network manager, I had to setup the interface manually just to get the no carrier error. )

I booted into a live debian iso and the NIC worked fine, restarted and it worked in nixos too. Restarted again, and it still works. (Not sure if it matters, but I used the netboot xyz iso to boot into debian, maybe that forced some kernel module to load early and that fixed some power management setting in the firmware, but this is pure speculation.)

I'm guessing it's some PCI power management thing. (I'll test if this solved it permanently, as I'm hoping to use this machine for my nextcloud server. I also restructured my nixos config recently, it's possible I'm overlooking something.) If the issue persists and I a find a more deterministic solution, I will post it here.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.