0

I'm trying to make my Ethernet connection work on my Ubuntu laptop but for some reason the NIC refuses to work.

I've tried everything I know, everything I found in the internet and it still doesn't work.

Here's a list of what I tried:

  • Using ethtool to change the speed and the duplex according to the Supported link mode of the NIC and the Advertised link mode of the switch and router.
  • Used three different ethernet cables connected to my switch and changed ports on the switch. Every other port and cables work.
  • sudo ifconfig <interface> up, sudo ip link set <interface> up but no changes.

Here is what dmesg --follow returns continuously as I run these commands:

[  916.193910] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[  917.082174] r8169 0000:01:00.0 enp1s0: Link is Down
[  918.678983] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[  919.564996] r8169 0000:01:00.0 enp1s0: Link is Down
[  923.672566] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[  924.556212] r8169 0000:01:00.0 enp1s0: Link is Down

When I change config with ethtool it just says Link is Down and doesn't do anything anymore, especially when I run autoneg off.

Here's what sudo ethtool <interface> returns before any modification:

Settings for enp1s0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: d
        Link detected: no

Whatever speed or duplex I put it at it doesn't change anything it says Link is Down.

EDIT

I tried to install the r8168-dkms package instead but that's what it says:

sudo dpkg -i r8168-dkms_8.048.00-1_all.deb
Selecting previously unselected package r8168-dkms.
(Reading database ... 295124 files and directories currently installed.)
Preparing to unpack r8168-dkms_8.048.00-1_all.deb ...
Unpacking r8168-dkms (8.048.00-1) ...
Setting up r8168-dkms (8.048.00-1) ...
Loading new r8168-8.048.00 DKMS files...
Building for 5.15.0-56-generic
Building initial module for 5.15.0-56-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/r8168-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-56-generic (x86_64)
Consult /var/lib/dkms/r8168/8.048.00/build/make.log for more information.
dpkg: error processing package r8168-dkms (--install):
 installed r8168-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 r8168-dkms

Output of lspci:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Stoney [Radeon R2/R3/R4/R5 Graphics] (rev da)
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15b3
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Carrizo Platform Security Processor
00:09.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Carrizo Audio Dummy Host Bridge
00:09.2 Audio device: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Audio Controller
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 20)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 4b)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 49)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 4b)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney HT Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney Address Maps
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney DRAM Configuration
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney Miscellaneous Configuration
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney PM Configuration
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Stoney NB Performance Monitor
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 07)
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
5
  • The common wisdom is that r8168-dkms is the better driver. I suggest that you install it and test. Welcome to Ask Ubuntu.
    – chili555
    Dec 22, 2022 at 2:31
  • Updated the answer @chili555
    – Jimmy
    Dec 22, 2022 at 6:53
  • "Consult /var/lib/dkms/r8168/8.048.00/build/make.log for more information." Did you? I suspect that a number of dependencies such as dkms are missing. Did you try: sudo apt update && sudo apt -y install r8168-dkms?
    – chili555
    Dec 22, 2022 at 14:24
  • I haven't checked, I'll check and get back to you as soon as I have looked into it. How would I know which dependencies are missing ? Should I compare it to the file system of the driver found online to the one I have on my system to see what's missing ?
    – Jimmy
    Dec 25, 2022 at 22:28
  • You will know if there are missing dependencies and which they are in the log referenced abobe.
    – chili555
    Dec 26, 2022 at 1:57

1 Answer 1

0

According to ethtool output it's a 100mbps card, therefore r8168 would be the wrong driver. Matching vendor driver is r8101. Better check whether firmware is loaded (if your chip version needs firmware). Helpful would be: dmesg | grep r8169

5
  • I see, and how would I go about changing the driver ? Should I install the new one and it's going to override the old one or should I purge the old one and install the new one ?
    – Jimmy
    Dec 25, 2022 at 3:20
  • "it's a 100mbps card, therefore r8168 would be the wrong driver." May I see a reference?
    – chili555
    Dec 26, 2022 at 1:57
  • Realtek provides three drivers: r8101 for 100Mbps, r8168 for 1Gbps, and r8125 for 2.5Gbps. If the original poster sends the lspci output you can check the PCI ID against the PCI ID's the three drivers bind to.
    – hkall
    Dec 26, 2022 at 12:36
  • I've added the output of lspci to the post
    – Jimmy
    Dec 29, 2022 at 1:41
  • OK, so it's a RTL8106e which requires firmware. You can check the dmesg log for firmware load failure and also check the output of "ethtool -i enp1s0" for the firmware version.
    – hkall
    Dec 29, 2022 at 23:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .