Ethernet working at 10% capacity on Debian

2

I have recently installed Debian on an amd64 desktop. The Internet through Ethernet is very, very slow and I have not been able to fix it. It is not my network because I am getting high speeds on Windows on the same machine.

lspci:

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

I have already tried installing the r8168 driver to replace the 8169 driver because some have said it is problematic, but it actually made the Internet slower.

Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Flags: bus master, fast devsel, latency 0, IRQ 53
    I/O ports at 3000 [size=256]
    Memory at f0b04000 (64-bit, non-prefetchable) [size=4K]
    Memory at f0b00000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: r8169
    Kernel modules: r8169

Ethernet worked out of the box but it is very slow.

Am I missing a different driver or is this a different problem? Thanks

Edit:

There is no eth0 but enp1s0:

enp1s0: negotiated 1000baseT-FD flow-control, link ok
  product info: vendor 00:07:32, model 0 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

William

Posted 2018-12-03T00:40:25.530

Reputation: 79

Can you show sudo ethtool eth0 and/or sudo mii-tool -v eth0 while the cable is connected? – user1686 – 2018-12-03T00:47:54.223

Really, realtek cards suck. Consider not wasting your time and throwing in a decent card instead. You can pick a new one up for < $50, or second hand for < $15. – davidgo – 2018-12-03T01:22:06.237

How are you measuring? Which host are you measuring against? Are you downloading or uploading? – l0b0 – 2018-12-03T02:39:53.133

I am just going on speedtest.net and doing their test. I currently have 200ms ping and 3.6 Mbps download. On Windows I get around 30 Mbps. @l0b0 – William – 2018-12-03T02:58:22.760

200ms ping sounds like it's not talking to a server near you. Who knows what speedtest.net is doing - you probably want to check against a machine a fixed, short distance from your own. – l0b0 – 2018-12-03T03:01:22.833

On a good day I can get as low as 25ms, which is acceptable. Sometimes it gets wonky and it takes a bit. The speed test on Google is also around that. – William – 2018-12-03T03:09:37.847

Well, even if it's different from Windows on the same computer, it's still not a good test of the Ethernet card – you're measuring across nearly a dozen hops at once (and you didn't even look whether you're measuring against the same server both times)... Ensure that you're measuring over the same path (note that IPv4 and IPv6 may take different paths). Best option – if you have another Linux desktop, first try running iperf3 between the two. – user1686 – 2018-12-03T05:29:11.750

IIRC the RTL8111/8168 firmware is notorious for trouble. You may have to google around and experiment a bit to find a working driver/firmware combination. As the firmware is "non-free", you'll have to manually install it for Debian. I don't have this hardware, so I can't give a step-by-step answer. – dirkt – 2018-12-03T07:52:06.937

The LEDs on the Ethernet port often tell you at what speed the port is running (10M/100M/1G)(but this is firmware dependent and I cannot tell you what you should be seeing). So first check that you have the same lights pattern with Windows and Linux. Otherwise a MTU mismatch can cause packet fragmentation a lead to poor transfer rates. – xenoid – 2018-12-03T14:02:30.410

You should prefer to use Netflix's fast.com to SpeedTest. Comcast and other ISPs have been known to artificially speed up traffic to those sites. – Alex Reinking – 2018-12-06T09:09:29.820

@davidgo I am considering buying a new card. Are there any you recommend that play nice with Debian? – William – 2018-12-23T08:35:18.257

Answers

1

It's possible that auto negotiation has failed. I had a similar issue with a Realtek card on Arch Linux. The ethtool command (install via apt) might be of use.

sudo ethtool -s enp1s0 speed N duplex M

Where N is 10, 100, or 1000, and M is 'half' or 'full', depending on what your hardware supports. It might also be possible to set these from Debian's NetworkManager GUI.

Right now it looks like you're running 1000 with full duplex. Try half.

Alex Reinking

Posted 2018-12-03T00:40:25.530

Reputation: 288

Switching to half duplex seemed to get my speed up to 15 Mbps! – William – 2018-12-10T04:01:47.887