[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1029263: realtek: stability problems with realtek gigabit ethernet on stable and rc kernels



Dear Maintainers,

I am using this crude workaround daily and it seems to work (as per upstream advice)

cat /etc/systemd/system/realtek-bug.service
[Unit]
Description=Realtek Bugfix
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c '/usr/bin/echo 0 > /sys/class/net/enp2s0/device/link/l1_1_aspm'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/bash -c '/usr/bin/echo 0 > /sys/class/net/enp2s0/device/link/l1_aspm'

[Install]
WantedBy=network.target

obviously each user has to find out the /sys path to his/her realtek network device.


On Fri, 2023-01-20 at 14:15 +0100, xevilstar wrote:
Package: linux-image-6.2.0-rc4
Version: 6.2.0-rc4-2
Severity: severe
File: realtek
X-Debbugs-Cc: vmxevilstar@gmail.com

Dear Mantainers,

I am having an issue with my ethernet card.
It works when the system boots but after around a couple of hours it disconnects.
I tried different ways to get it working without having to reboot but nothing else seemed to work.
Even rebooting doesn't solve the problem since again, after a couple of hours, it stops working again.
I have googled around and found that some people had this same problem on older kernels but no solution seemed to apply to this rc nor latest stable kernel versions.
I am probably missing something here.
The issue happened also with recent stable 6.1.7 and rc kernel versions.
I am actually testing the latest 6.2-rc4 version.

Following are some data I think might be useful but if you feel I neglected to give enough informations and you need more please just ask me.

Here some informations about my system :
uname -a
Linux ghost 6.2.0-rc4 #2 SMP PREEMPT_DYNAMIC Tue Jan 17 13:35:46 CET 2023 x86_64 GNU/Linux

gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


/usr/src# lspci|grep -i net
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

description: Ethernet interface
product: RTL8125 2.5GbE Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0
version: ff
serial: b0:25:aa:49:a5:3a
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: bus_master vga_palette cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.2.0-rc4 duplex=full firmware=rtl8125b-2_0.0.2 07/13/20 latency=255 link=yes maxlatency=255 mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s



lsmod|grep r8169
r8169                 110592  0
mdio_devres            16384  1 r8169
libphy                200704  3 r8169,mdio_devres,realtek

the firmware version I am using is linux-firmware-20221214.tar.gz


Here you can find what happens (dmesg -wT)
[Fri Jan 20 11:04:32 2023] userif-3: sent link up event.

[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_chipcmd_cond == 1 (loop: 100, delay: 100).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:19:41 2023] r8169 0000:02:00.0 enp2s0: rtl_mac_ocp_e00e_cond == 1 (loop: 10, delay: 1000).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_chipcmd_cond == 1 (loop: 100, delay: 100).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:17 2023] r8169 0000:02:00.0 enp2s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).
[Fri Jan 20 13:20:18 2023] r8169 0000:02:00.0 enp2s0: rtl_mac_ocp_e00e_cond == 1 (loop: 10, delay: 1000).

I would love to provide a patch of any kind but I am afraid I don't have enough programming skills.

Thanks in advance for your time.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.2.0-rc4 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information


Reply to: