Ethernet connection not working

Issue description: ethernet connection hasn’t worked for some time. I read some threads and I discovered that the r8168 driver support has been abandoned. I tried various proposed solutions but I still haven’t solved anything (including installing r8168-dkms). I don’t know if I skipped some steps, in any case here are some helpful outputs:

uname -a
Linux endeavouros 6.6.42-1-lts #1 SMP PREEMPT_DYNAMIC Thu, 25 Jul 2024 08:14:54 +0000 x86_64 GNU/Linux
hwinfo --network
33: None 00.0: 10700 Loopback                                   
  [Created at net.126]
  Unique ID: ZsBS.GQNx7L4uPNA
  SysFS ID: /class/net/lo
  Hardware Class: network interface
  Model: "Loopback network interface"
  Device File: lo
  Link detected: yes
  Config Status: cfg=new, avail=yes, need=no, active=unknown

34: None 01.0: 10701 Ethernet
  [Created at net.126]
  Unique ID: zHNY.ndpeucax6V1
  Parent ID: wcdH.isQdhdYszj5
  SysFS ID: /class/net/eno1
  SysFS Device Link: /devices/pci0000:00/0000:00:1d.1/0000:10:00.0
  Hardware Class: network interface
  Model: "Ethernet network interface"
  Driver: "r8168"
  Driver Modules: "r8168"
  Device File: eno1
  HW Address: 38:22:e2:17:b5:93
  Permanent HW Address: 38:22:e2:17:b5:93
  Link detected: no
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #18 (Ethernet controller)

35: None 00.0: 1070a WLAN
  [Created at net.126]
  Unique ID: AYEt.QXn1l67RSa1
  Parent ID: y9sn.yeYstgdJlKE
  SysFS ID: /class/net/wlan0
  SysFS Device Link: /devices/pci0000:00/0000:00:14.3
  Hardware Class: network interface
  Model: "WLAN network interface"
  Driver: "iwlwifi"
  Driver Modules: "iwlwifi"
  Device File: wlan0
  HW Address: f8:e4:e3:60:80:60
  Permanent HW Address: f8:e4:e3:60:80:60
  Link detected: yes
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #7 (Network controller)
inxi -Na
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8168 v: 8.053.00-NAPI modules: r8169 pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: 4000 bus-ID: 10:00.0
    chip-ID: 10ec:8168 class-ID: 0200

ls /usr/lib/modprobe.d/
totale 28K
-rw-r--r-- 1 root root  62 23 mag 13.14 99-opentabletdriver.conf
-rw-r--r-- 1 root root 128  9 lug 07.06 bluetooth-usb.conf
-rw-r--r-- 1 root root  18  2 lug 04.26 nvidia-utils.conf
-rw-r--r-- 1 root root 102 16 lug 20.05 optimus-manager.conf
-rw-r--r-- 1 root root  16 29 lug 11.11 r8168-dkms.conf
-rw-r--r-- 1 root root 306 24 lug 15.08 README
-rw-r--r-- 1 root root 821 24 lug 15.08 systemd.conf

lsmod | grep r816
r8168                 692224  0

Try removing the 8168 driver and see if it works with the 8169 (built-in) driver.

so:

sudo pacman -R r8168-dkms
modprobe r8169

am I right?

I would reboot, rather than modprobe.

Also remove any blacklisted items (for 8169, if you made any).

tried rebooting, still not working. Just to be sure, should the ethernet connection work automatically?

edit: I also removed blacklists for 8169

1 Like

And still not working?

yes, still not working

I am struggling to get a wifi signal, at work and it keeps kicking me out, you will have to wait for someone else!

1 Like

Right, gotta be quick :smiley: Does the card work if you boot off the install media? Did it work originally?

1 Like

I can try that, don’t worry about your connection haha, I can wait!

Ok, the card works in the install media

1 Like

Back at home, with working WIFI (Woo Hoo :rofl: ).

Which driver is used by the live media?

inxi -Na in live iso

inxi -Na
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
    modules: wl bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 4000 bus-ID: 10:00.0 chip-ID: 10ec:8168 class-ID: 0200

edit: noticed that the installed driver in my system is still r8168. inxi -Na in my system:

inxi -Na
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8168 v: 8.053.00-NAPI modules: r8169 pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: 4000 bus-ID: 10:00.0
    chip-ID: 10ec:8168 class-ID: 0200

Off to bed, but have you still got anything related to r8168 installed?

yay r8168 | grep installed

Yes I know that is convoluted, there are better ways to do it, but it works.

:zzz: night!

1 Like

the command won’t produce any output, while the output of yay r8168 is:

4 aur/r8168-8136 8.053.00-1 (+0 0.00) 
    A kernel module for Realtek 8168 network cards (DKMS version) for Device ID 0x8136.
3 aur/r8168-dkms 8.053.00-2 (+25 0.28) 
    A kernel module for Realtek 8168 network cards (DKMS version)
2 extra/r8168-lts 8.053.00-20 (104.1 KiB 101.8 KiB) 
    A kernel module for Realtek 8168 network cards for linux-lts
1 aur/r8168 8.053.00-5 (+0 0.00) (Orfano) 
    A kernel module for Realtek 8168 network cards

(Orfano means orphaned)

I think what @xircon was intending, was a list of your currently installed r8168 packages. This command will output that:

yay -Q | grep r8168

I have a same controller chip, just another vendor, but in my case it works:

$ inxi -Na
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK RTL8111H driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168
    class-ID: 0200

$ lspci
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)

$ uname -a
Linux jupiter 6.10.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 27 Jul 2024 16:49:55 +0000 x86_64 GNU/Linux

$ lsmod |grep r81
r8169                 126976  0
mdio_devres            12288  1 r8169
libphy                225280  3 r8169,mdio_devres,realtek

What exactly means “not working” ?
Is ist you don’t you see a device with ip a command?
Does it not get an IP address from dhcp?
What dies dmesg say after laoding the module?

Are you sure you have an cable inserted, as your log snipped above says “no link” ?

Sadly I got no output

It means I can’t switch to ethernet connection even if the cable is inserted (I’ve already verified it’s working).

About dmesg, it seems my system is still loading the r8168 driver, even if I can’t find and uninstall it.

r8168 Gigabit Ethernet driver 8.053.00-NAPI loaded
...
r8168  Copyright (C) 2024 Realtek NIC software team <nicfae@realtek.com> 
                This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>. 
                This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>.