You are not logged in.

#1 2020-04-06 19:45:15

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

[SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Hello everyone ,
I have this Dell Inspiron 5520 laptop , and everything was working fine and smooth till earlier today I upgraded to the latest lts version 5.4.30-1 kernel, the ethernet interface is gone.
Going back to linux-lts-5.4.28-1 and it shows up again.

here is some info I extracted from my box :

#uname -a 
Linux archlinux 5.4.30-1-lts #1 SMP Thu, 02 Apr 2020 14:39:46 +0000 x86_64 GNU/Linux
#lspci -v
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
	Subsystem: Dell RTL810xE PCI Express Fast Ethernet controller
	Flags: fast devsel, IRQ 16
	I/O ports at 2000 [size=256]
	Memory at c1404000 (64-bit, prefetchable) [size=4K]
	Memory at c1400000 (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 4e-08-00-00-36-4c-e0-00
	Kernel modules: r8169

notice there is no 'Kernel driver in use: r8169' line compared to when I go back to 5.4.28-1


#lsmod |grep r81
r8169                  98304  0
libphy                102400  2 r8169,realtek
#lsmod |grep real
realtek                24576  0
libphy                102400  2 r8169,realtek
#dmesg |grep -i r8169
[   16.919830] r8169 0000:07:00.0: can't disable ASPM; OS doesn't have ASPM control
[   16.923482] libphy: r8169: probed
[   16.923485] r8169 0000:07:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?
[   16.973526] r8169: probe of 0000:07:00.0 failed with error -49

notice the 3rd and 4th lines!


any help would be highly appreciated.

Last edited by behnamgolds (2020-04-07 09:22:04)

Offline

#2 2020-04-06 20:07:37

loqs
Member
Registered: 2014-03-06
Posts: 18,101

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Is r8169 or libphy included in the initrd?

lsinitcpio /boot/initramfs-linux-lts.img | grep usr/lib/modules/

Edit:
Also the full output of lsmod from under linux-lts 5.4.30-1.

Last edited by loqs (2020-04-06 20:25:18)

Offline

#3 2020-04-06 20:28:57

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

No those modules  were not included .

I added the following to the /etc/mkinitcpio.conf

MODULES=(libphy realtek r8169)

and done :

# mkinitcpio -P

rebooted and the problem is still there.

# dmesg | grep r8169
[    1.017188] r8169 0000:07:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.019467] libphy: r8169: probed
[    1.019472] r8169 0000:07:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?
[    1.073016] r8169: probe of 0000:07:00.0 failed with error -49

thanks.


Edit:

# lsmod 
Module                  Size  Used by
snd_hda_codec_hdmi     73728  1
snd_hda_codec_conexant    24576  1
snd_hda_codec_generic    94208  1 snd_hda_codec_conexant
intel_rapl_msr         20480  0
intel_rapl_common      28672  1 intel_rapl_msr
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
coretemp               20480  0
kvm_intel             311296  0
kvm                   786432  1 kvm_intel
irqbypass              16384  1 kvm
fuse                  139264  5
dell_laptop            32768  0
dell_wmi               20480  0
ledtrig_audio          16384  3 snd_hda_codec_generic,snd_hda_codec_conexant,dell_laptop
dell_smbios            32768  2 dell_wmi,dell_laptop
mei_hdcp               24576  0
crct10dif_pclmul       16384  1
iTCO_wdt               16384  0
dcdbas                 20480  1 dell_smbios
iTCO_vendor_support    16384  1 iTCO_wdt
sparse_keymap          16384  1 dell_wmi
wmi_bmof               16384  0
dell_wmi_descriptor    20480  2 dell_wmi,dell_smbios
snd_hda_intel          49152  3
uvcvideo              114688  0
crc32_pclmul           16384  0
wl                   6467584  0
dell_smm_hwmon         20480  0
snd_intel_nhlt         20480  1 snd_hda_intel
ghash_clmulni_intel    16384  0
videobuf2_vmalloc      20480  1 uvcvideo
aesni_intel           372736  0
videobuf2_memops       20480  1 videobuf2_vmalloc
i915                 2375680  20
radeon               1646592  1
btusb                  65536  0
crypto_simd            16384  1 aesni_intel
btrtl                  24576  1 btusb
btbcm                  16384  1 btusb
snd_hda_codec         155648  4 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
glue_helper            16384  1 aesni_intel
btintel                28672  1 btusb
bluetooth             663552  5 btrtl,btintel,btbcm,btusb
intel_cstate           16384  0
snd_hda_core          102400  5 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
videobuf2_v4l2         28672  1 uvcvideo
intel_uncore          147456  0
videobuf2_common       57344  2 videobuf2_v4l2,uvcvideo
snd_hwdep              16384  1 snd_hda_codec
intel_rapl_perf        16384  0
psmouse               180224  0
i2c_i801               36864  0
snd_pcm               135168  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
ttm                   122880  1 radeon
videodev              249856  3 videobuf2_v4l2,uvcvideo,videobuf2_common
i2c_algo_bit           16384  2 radeon,i915
rtsx_usb_ms            24576  0
ecdh_generic           16384  1 bluetooth
cfg80211              847872  1 wl
mc                     61440  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
memstick               20480  1 rtsx_usb_ms
ecc                    32768  1 ecdh_generic
drm_kms_helper        212992  2 radeon,i915
snd_timer              40960  1 snd_pcm
mousedev               24576  0
intel_gtt              24576  1 i915
snd                   106496  14 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
syscopyarea            16384  1 drm_kms_helper
mei_me                 45056  1
joydev                 28672  0
input_leds             16384  0
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
lpc_ich                28672  0
mei                   118784  3 mei_hdcp,mei_me
soundcore              16384  1 snd
rfkill                 28672  5 bluetooth,dell_laptop,cfg80211
fb_sys_fops            16384  1 drm_kms_helper
wmi                    36864  4 dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
battery                24576  0
ac                     16384  0
evdev                  24576  16
mac_hid                16384  0
vboxnetflt             32768  0
vboxnetadp             28672  0
vboxdrv               499712  2 vboxnetadp,vboxnetflt
drm                   520192  11 drm_kms_helper,radeon,i915,ttm
acpi_call              16384  0
agpgart                53248  3 intel_gtt,ttm,drm
ip_tables              36864  0
x_tables               49152  1 ip_tables
ext4                  778240  1
crc32c_generic         16384  0
crc16                  16384  2 bluetooth,ext4
mbcache                16384  1 ext4
jbd2                  131072  1 ext4
hid_logitech_hidpp     45056  0
rtsx_usb_sdmmc         32768  0
mmc_core              184320  1 rtsx_usb_sdmmc
rtsx_usb               28672  2 rtsx_usb_sdmmc,rtsx_usb_ms
sd_mod                 57344  5
hid_logitech_dj        28672  0
hid_generic            16384  0
usbhid                 65536  1 hid_logitech_dj
hid                   143360  4 usbhid,hid_generic,hid_logitech_dj,hid_logitech_hidpp
ahci                   40960  3
serio_raw              20480  0
atkbd                  36864  0
libps2                 20480  2 atkbd,psmouse
libahci                40960  1 ahci
libata                278528  2 libahci,ahci
xhci_pci               20480  0
scsi_mod              249856  2 sd_mod,libata
crc32c_intel           24576  2
ehci_pci               20480  0
xhci_hcd              278528  1 xhci_pci
ehci_hcd               98304  1 ehci_pci
i8042                  32768  1 dell_laptop
serio                  28672  6 serio_raw,atkbd,psmouse,i8042
r8169                  98304  0
realtek                24576  0
libphy                102400  2 r8169,realtek

Last edited by behnamgolds (2020-04-06 20:31:17)

Offline

#4 2020-04-06 20:44:32

loqs
Member
Registered: 2014-03-06
Posts: 18,101

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

What if you drop libphy from the MODULES array?

Offline

#5 2020-04-06 20:49:26

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

removed libphy and regenerated the initrd image , rebooted, same result.

Offline

#6 2020-04-06 21:01:23

loqs
Member
Registered: 2014-03-06
Posts: 18,101

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Was libphy included in the initrd as a dependency?

Offline

#7 2020-04-06 21:14:46

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

I don't know.
Is there a command to check that?

Offline

#8 2020-04-06 21:35:55

loqs
Member
Registered: 2014-03-06
Posts: 18,101

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Yes in post #2 but skip that for a moment.
If you unload libphy realtek r8169

modprobe -r r8169
modprobe -r realtek
modprobe -r libphy

Then try loading the r8169 module

modprobe r8169

If the issue is still present try unloading the three modules then try loading the realtek module before the r8169 module.

Offline

#9 2020-04-06 22:04:09

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Tried both to not avail.

Also tested the following too :

MODULES=(realtek)
MODULES=(libphy)
MODULES=(libphy realtek)

didn't help either.

Offline

#10 2020-04-06 22:43:35

loqs
Member
Registered: 2014-03-06
Posts: 18,101

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

[   16.923485] r8169 0000:07:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?

Was still present even if you unloaded the three modules,  then loaded the realtek module before the r8169 module?

Offline

#11 2020-04-06 22:50:41

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Yes in both cases the output of the dmesg was the same. Thats also the case with the various combinations of the MODULES array above.

Offline

#12 2020-04-07 09:14:41

behnamgolds
Member
Registered: 2020-04-06
Posts: 9

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

I couldn't figure out what the problem is , and did not spend much time either. But I ended up with installing the driver provided by the Realtek and it seems to be opensource(or at least parts of it is GPL2+) and last updated 2020/03/11 !

it is mentioned  " FE Ethernet LINUX driver for kernel up to 4.15 " but seems to work under 5.4.30-1.

here is the link to the driver's page.

the installation process was straightforward , just extracted the r8101-1.035.02.tar.bz2  and :

# ./autorun.sh

It seems to work just fine for now (will update if anything goes south)

# lspci -v
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
	Subsystem: Dell RTL810xE PCI Express Fast Ethernet controller
	Flags: bus master, fast devsel, latency 0, IRQ 30
	I/O ports at 2000 [size=256]
	Memory at c1404000 (64-bit, prefetchable) [size=4K]
	Memory at c1400000 (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 4e-08-00-00-36-4c-e0-00
	Kernel driver in use: r8101
	Kernel modules: r8169, r8101

I blacklisted all three modules libphy , realtek , r8169 .

# lsmod |grep r81
r8101                 217088  0
# dmesg | grep r81
[   17.013500] r8101 Fast Ethernet driver 1.035.02-NAPI loaded
[   17.034399] r8101: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[   17.034434] r8101  Copyright (C) 2020  Realtek NIC software team <nicfae@realtek.com> 
[   17.853110] r8101 0000:07:00.0 enp7s0: renamed from eth0

Notice the patents.

I am going to test it  for the time being and see what happens when the new LTS kernel upgrade is available.

Thanks for your help loqs I've learned so much from you .

PS:
If you want to investigate the problem any further I will be happy to assist.

PSPS:
There is an AUR package named r8101-dkms , haven't test it yet but worth mentioning since it is DKMS .

Last edited by behnamgolds (2020-04-07 09:34:09)

Offline

#13 2020-04-07 10:41:12

hkall
Member
Registered: 2019-11-11
Posts: 18

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

5.4.30 checks for a dedicated PHY driver to fix an issue with module handling on Android/x86. Seems that for your chip version no dedicated PHY driver exists.
Please check (with r8169 under 5.4.28) for attribute phy_id in sysfs and report the value (supposedly 001cXXXX).

Offline

#14 2023-03-14 21:05:02

jdelacueva
Member
Registered: 2023-03-14
Posts: 1

Re: [SOLVED] No ethernet interface after upgrading to linux-lts-5.4.30-1

Thank you behnamgolds as you gave me the solution. Nevertheless, with kernel 6.2.6-arch1-1 it needs an update.

After running ./autorun.sh the following error appears:

In file included from r8101-1.038.02/src/r8101_n.c:75:
r8101-1.038.02/src/r8101_n.c: In function ‘rtl8101_init_one’:
r8101-1.038.02/src/r8101.h:495:57: error: too many arguments to function ‘netif_napi_add’
  495 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)

The solution is to delete the parameter weight in the function netif_napi_add in line 495 of the source file src/r8101.h and to change it from

#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)

into

#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function)

After deleting the weight parameter, run again sudo ./autorun.sh and the error disappears.

HT goes to Linux source net: drop the weight argument from netif_napi_add

Last edited by jdelacueva (2023-03-14 22:59:22)

Offline

Board footer

Powered by FluxBB