Hello Lemmy,
Im trying to troubleshoot a connection issue to my laptop which is connect using the buildin ethernet port. The connection drops sometimes for a few minutes and then im able to connect again.
This is the port being used:
k3s-alpine-lap-6:~# lspci -nn | grep -i ethernet
0000:01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16)
Some information about the drivers being used:
k3s-alpine-lap-6:~# ethtool -i eth0
driver: r8169
version: 6.12.76-0-lts
firmware-version: rtl8168h-2_0.0.2 02/26/15
expansion-rom-version:
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
Some information i found using dmesg:
[ 10.535868] Bridge firewalling registered
[ 29.478495] usb 3-1: USB disconnect, device number 2
[ 30.635978] atkbd serio0: Unknown key pressed (translated set 2, code 0xd8 on isa0060/serio0).
[ 30.635990] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
[ 30.645244] atkbd serio0: Unknown key released (translated set 2, code 0xd8 on isa0060/serio0).
[ 30.645256] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
[ 55.836493] EXT4-fs (sda): mounted filesystem f9742482-7e09-4460-a10d-81c5f5abaf23 r/w with ordered data mode. Quota mode: none.
[ 347.743005] Initializing XFRM netlink socket
[ 354.759146] eth0: renamed from tmp5fca0
[ 354.898482] eth0: renamed from tmp375a5
[ 354.930148] eth0: renamed from tmpaf7f3
[ 354.970131] eth0: renamed from tmpc035d
[ 356.883835] eth0: renamed from tmp68492
[ 518.679868] Key type trusted registered
[ 518.745372] Key type encrypted registered
[ 518.750554] device-mapper: uevent: version 1.0.3
[ 518.750614] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@lists.linux.dev
[ 599.682490] hrtimer: interrupt took 24965 ns
[ 832.545952] r8169 0000:01:00.0 eth0: Link is Down
[ 845.527825] r8169 0000:01:00.0 eth0: Link is Up - 100Mbps/Full - flow control off
[ 846.467804] r8169 0000:01:00.0 eth0: Link is Down
[ 848.089514] r8169 0000:01:00.0 eth0: Link is Up - 100Mbps/Full - flow control off
[ 2407.857541] r8169 0000:01:00.0 eth0: Link is Down
[ 2420.398450] r8169 0000:01:00.0 eth0: Link is Up - 100Mbps/Full - flow control off
Im not knowledgeable about this types of issues so im not even sure the driver is the issue.
Does someone have a simular experience or knows what could cause this issue i would love to hear it! Have a great day!
(Im sorry my post isn’t very specific about the issue but im not sure how i could better start troubleshooting this)


It could be related to power saving settings and/or your power profile.
Some Q’s:
I saw you tried to set power for the interface itself, but if this is a power issue, you probably want to disable power savings on your PCIe interfaces. Easiest way to do this is probably installing
powertop, and navigating over to the ‘tunables’ menu, and disabling power management for those interfaces, just to test and see if it fixes it.If you need additional information let me know!
As additional troubleshooting step i connected a know working device to the cable and was able to get 1GB
Oh i just did
ethtool -I eth0and now it does show up as being able to do 1G.k3s-alpine-lap-6:~# ethtool -I eth0 Settings for eth0: Supported ports: [ TP MII ] 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: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Auto-negotiation: on master-slave cfg: preferred slave master-slave status: slave Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: pumbg Wake-on: d Link detected: yes Link Down Events: 2I’m not sure your rationale for picking Alipine for this use-case, but you might want to consider a more fleshed out distro for a NAS. Alpine is the BARE MINIMUM of an OS, meaning a lot of helpers that exist on other distros are not there for things like setting your power settings and link negotiations in certain cases. Sure the NIC driver is there, but all the nice tweaks for that specific module that exist in, say, Fedora Server aren’t going to be there, leading to this issue.
I’d honestly just throw FreeNAS, TrueNAS, or Unraid on this box and be done with it. They’ll have all the power settings and tweaks meant for a NAS in place, and then you won’t need to spend time hunting stuff like this down.
Very valid point.
Im actually running k3s on it so im not looking for any NAS specific OS. But if i picked a more general OS like fedora this issue might not have appeared. The reason i picked Alpine is since everything is running in containers i don’t need any fancy OS i just need to install k3s. But apperently Alpline can cause some issues :D
try running off a fedora usb stick long enough for this issue to have been triggered in alpine to confirm if this is the case without wiping out your installation.
Oh that is actually a great idea thanks!
i recommended this because i tried it once and it did work, however i learned the hard way that the image in the usb stick is different than the installed image and i had to use the usb stick’s image to find the exact module and configuration so that i could duplicate it on the installed image…fyi
and it too was a realtek nic. lol
Alpine is very specific in its use-case. Unless you know the exact package set you need to work with, it’s not suitable for general purpose use. It doesn’t even include glibc, for example 🤣 It’s meant to BARE as possible with a small footprint.