I then found out that this might be caused by the default R8169-driver in the kernel and that I should give r8168-dkms a try. Installing this did indeed fix the problem (buster uses version 8.046.00-1). (Note that the R8169-driver for all kernels of stretch did not have this issue).
Then yesterday, I upgraded from buster to bullseye. After a few struggles with package dependencies, broken packages and version updates that had breaking changes in their configs, that's all working properly.
However, the problem of eth0 intermittently losing link (3 seconds, then goes back up automatically) suddenly returned. The link-down happens in between 13s up to 1h40m periods (sampled in the past 23 hours), and every time the link goes back up again after 3s.
Other than the fact that bullseye uses kernel 5.10 and r8168-dkms version 8.048.03-3 (and I can't switch back to 8.046.00-1 as that requires kernel 4.19.0) there have been no significant changes with regard to networking, so I'm at a loss what could cause this (and at an even greater loss as to how to fix it).
Any help would be greatly appreciated.
Edit to include output from lspci and inxi:
Code: Select all
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller
Flags: bus master, fast devsel, latency 0, IRQ 24
I/O ports at e000 [size=256]
Memory at dfe04000 (64-bit, prefetchable) [size=4K]
Memory at dfe00000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 02-00-00-00-68-4c-e0-00
Kernel driver in use: r8168
Kernel modules: r8168
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller
Flags: bus master, fast devsel, latency 0, IRQ 25
I/O ports at d000 [size=256]
Memory at dfd04000 (64-bit, prefetchable) [size=4K]
Memory at dfd00000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 03-00-00-00-68-4c-e0-00
Kernel driver in use: r8168
Kernel modules: r8168
Code: Select all
System: Kernel: 5.10.0-23-686-pae i686 bits: 32 Console: tty 0 Distro: Debian GNU/Linux 11 (bullseye)
Machine: Type: Desktop Mobo: N/A model: N/A serial: N/A BIOS: American Megatrends v: 4.6.4 date: 03/27/2012
CPU: Info: Dual Core Intel Atom D2550 [MT MCP] speed: 1862 MHz
Graphics: Device-1: Intel Atom Processor D2xxx/N2xxx Integrated Graphics driver: gma500 v: N/A
Display: server: No display server data found. Headless machine? tty: 237x62
Message: Unable to show advanced data. Required tool glxinfo missing.
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168
IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168
IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: vlan34 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives: Local Storage: total: 223.57 GiB used: 144.7 GiB (64.7%)
Info: Processes: 135 Uptime: 1d 3h 30m Memory: 3.87 GiB used: 564.1 MiB (14.2%) Init: systemd runlevel: 5 Shell: Bash
inxi: 3.3.01