View previous topic :: View next topic |
Author |
Message |
freifunk_connewitz Apprentice
Joined: 08 Feb 2006 Posts: 238
|
Posted: Fri Jan 24, 2025 9:29 am Post subject: [workaround] ethernet card stays down when cable plugged in |
|
|
Dear Community,
since last year I'm having trouble with my ethernet card.
When I plug in the LAN cable into the NIC, it does not detect the carrier / the link. It seems to be in some sleeping state. No matter how often I replug the cable, it justs sits there doing nothing. This happens after reboot or resume and also when the cable is unplugged and replugged again. In /var/log/messages I can see that it detects the link going down - but nothing shows up there about it coming up again.
No error messages.
What immediately activates the NIC again:
* Bringing the interface down and up again with ifconfig.
* Querying the interface with ethtool: simply issueing wakes it up, makes it see the carrier and starts the dhcp process.
Does anybody else has seen this? What can I do? It is of course not too much work to just type ethtool in a shell every time, but it should work automatically.
See also (similar but not the same) this topic.
Some info about my setup:
Code: | lspci -v
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-LM (rev 30)
Subsystem: Fujitsu Client Computing Limited Device 001a
Flags: bus master, fast devsel, latency 0, IRQ 144, IOMMU group 13
Memory at 92300000 (32-bit, non-prefetchable) [size=128K]
Capabilities: <access denied>
Kernel driver in use: e1000e
Kernel modules: e1000e |
Code: | ethtool --show-features enp0s31f6
Features for enp0s31f6:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
tx-gso-list: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]
rx-udp-gro-forwarding: off
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]
|
working state:
Code: | ethtool enp0s31f6
Settings for enp0s31f6:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
|
The output of the last command in the non-working state just differs in that it says Link NOT detected, and of course not speed, duples, mdi-x info. Strange: after the first query the PHYAD changed from 2 to 1, where it stays then.
Code: | ethtool --show-eee enp0s31f6
EEE Settings for enp0s31f6:
EEE status: enabled - inactive
Tx LPI: 17 (us)
Supported EEE link modes: 100baseT/Full
1000baseT/Full
Advertised EEE link modes: 100baseT/Full
1000baseT/Full
Link partner advertised EEE link modes: Not reported |
Switching off eee not changes anything, however.
Last edited by freifunk_connewitz on Fri Jan 24, 2025 9:53 pm; edited 1 time in total |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2647
|
Posted: Fri Jan 24, 2025 11:08 am Post subject: |
|
|
Try passing SmartPowerDownEnable=0 to the driver. This is what I can think of.
You should have investigated back when the issue appeared. Not it would be a lot harder to trace it. You could have reviewed what changed and already have a clue what to look for.
You can still check what kernel was emerged around that time in /var/log/emerge.log. It might be a change in the kernel drivers.
Best Regards,
Georgi |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54766 Location: 56N 3W
|
Posted: Fri Jan 24, 2025 12:10 pm Post subject: |
|
|
freifunk_connewitz,
Maybe you need fplugd?
Code: | $ eix ifplugd
* sys-apps/ifplugd
Available versions: 0.28-r11 0.28-r12 {doc selinux}
Homepage: http://0pointer.de/lennart/projects/ifplugd/
Description: Brings up/down ethernet ports automatically with cable detection |
That it exists is all I know about it ... well, it has a man page too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
freifunk_connewitz Apprentice
Joined: 08 Feb 2006 Posts: 238
|
Posted: Fri Jan 24, 2025 9:51 pm Post subject: |
|
|
logrusx and NeddySeagoon,
Thank you for your help.
When the issue appeared I tried to investigate but back then suspected a hardware problem. And had not enough time to dig deeper.
The hint to disable SmartPowerDownEnable in the e1000e driver seems to work! I'll try it for a while under different conditions. But that really seems to prove that there must have been a change to the driver. But you are right, thats difficult to bisect now.
I did not try ifplugd because the driver option worked (and the last update of the packages was 20 years ago).
Thanks again for your support! |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1507 Location: Earth
|
Posted: Fri Jan 24, 2025 10:38 pm Post subject: |
|
|
what about the cable itself ?
_________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
|