I'm really new to Linux, trying to understand a bit more everyday and considering taking some courses to increase my knowledge.

I've been thinking on dropping windows forever and switch to Linux and finally decided it a few days ago.

I've been having some issues with my internet connection lately, sometimes getting lag spikes for a few minutes, diminishing until it's gone and it starts to lag again.

At first I thought it was a problem with my Ethernet driver so I searched for help:

Did ifconfig

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    inet6 fe80::1e1b:dff:fee5:58c6  prefixlen 64  scopeid 0x20<link>
    ether 1c:1b:0d:e5:58:c6  txqueuelen 1000  (Ethernet)
    RX packets 4046  bytes 2256451 (2.2 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 4081  bytes 566523 (566.5 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 839  bytes 88014 (88.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 839  bytes 88014 (88.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and lshw -class network

description: Ethernet interface
   product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:03:00.0
   logical name: enp3s0
   version: 0c
   serial: 1c:1b:0d:e5:58:c6
   size: 1Gbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip= latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
   resources: irq:29 ioport:f000(size=256) memory:fcc00000-fcc00fff memory:f0300000-f0303fff

The driver as you can see shows an outdated firmware

The problem is, I cannot find the right Driver, even on the realtek website.

I checked lspci | egrep -i --color 'network|ethernet'

and showd 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

Saw a similar post [Internet not working properly?] but it seems a different version. The Ubuntu Software tool doesn't show other updates.

Thank you for your help, remember I'm new to Linux, Will do my best to follow every given assistance.

Replying to @heynnema Free:

                  total        used        free      shared  buff/cache   available
Mem:          7,8Gi       2,3Gi       4,1Gi       128Mi       1,4Gi       5,1Gi
Swap:         2,0Gi          0B       2,0Gi

vm.swappiness = 60
battlejuice@littlefuckersobservatory:~$ ls -alh /boot
total 127M
drwxr-xr-x  4 root root 4,0K sep 29 17:13 .
drwxr-xr-x 20 root root 4,0K sep 29 16:53 ..
-rw-r--r--  1 root root 233K jul  9 20:50 config-5.4.0-42-generic
-rw-r--r--  1 root root 233K sep 10 07:12 config-5.4.0-48-generic
drwxrwxr-x  2 root root 4,0K sep 29 16:51 efi
drwxr-xr-x  4 root root 4,0K sep 29 17:12 grub
lrwxrwxrwx  1 root root   27 sep 29 17:12 initrd.img -> initrd.img-5.4.0-48-generic
-rw-r--r--  1 root root  48M sep 29 17:11 initrd.img-5.4.0-42-generic
-rw-r--r--  1 root root  48M sep 29 17:13 initrd.img-5.4.0-48-generic
lrwxrwxrwx  1 root root   27 sep 29 16:51 initrd.img.old -> initrd.img-5.4.0-42-generic
-rw-r--r--  1 root root 179K ago 18 07:46 memtest86+.bin
-rw-r--r--  1 root root 181K ago 18 07:46 memtest86+.elf
-rw-r--r--  1 root root 181K ago 18 07:46 memtest86+_multiboot.bin
-rw-------  1 root root 4,6M jul  9 20:50 System.map-5.4.0-42-generic
-rw-------  1 root root 4,6M sep 10 07:12 System.map-5.4.0-48-generic
lrwxrwxrwx  1 root root   24 sep 29 17:12 vmlinuz -> vmlinuz-5.4.0-48-generic
-rw-r--r--  1 root root  12M jul 31 10:43 vmlinuz-5.4.0-42-generic
-rw-------  1 root root  12M sep 10 07:36 vmlinuz-5.4.0-48-generic
lrwxrwxrwx  1 root root   24 sep 29 17:12 vmlinuz.old -> vmlinuz-5.4.0-42-generic
  • 'apt search realtek' shows me a driver 'r8168-dkms' from the repository. You may try to install that. – Arijit Chatterjee Sep 11 at 17:27
  • Hey Arijit thanks for you answer! – Battlejuice Sep 11 at 17:32
  • Does it solve your challenges? If yes, I am happy. – Arijit Chatterjee Sep 11 at 17:33
  • Hey @ArijitChatterjee ------------- Rebooting now, seems to be fine. Will post progress, thank you! – Battlejuice Sep 11 at 17:42
  • Since all the "bad counts" are 0, the only problem that pops out is autonegotiation is on. Read the docs on how to configure it OFF. Sometimes autonegotiation is unstable, and renegotiation (is link speed 10/100/1000?) happens too often. During renegotiation, packet delivery may be delayed. I may be wrong, but I have been bitten by autonegotiation. – waltinator Sep 11 at 17:53

There aren't a lot of clues to your problem, yet.

We'll test your memory, and change your /swapfile from 2G to 4G.


Gigabyte ga-320m-hd2

Your BIOS is up to date at version F50d.


AMD® Ryzen 7 1700x eight-core processor × 16

Note: Ryzen processors are notorious for memory compatibility issues.

Note: See if your memory is on this Memory Support List.

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.


We'll enlarge your /swapfile from 2G to 4G.

Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 4G RAM and 4G swap

Confirm this line in /etc/fstab... and confirm no other “swap” lines...

/swapfile    none    swap    sw      0   0

reboot                    # reboot and verify operation
| improve this answer | |
  • Seems its going to occupy a great deal of time. Will post the results tomorrow assap. Thanks again for your time and help. – Battlejuice Sep 11 at 19:55
  • spent the entire morning trying to boot from USB. Every time I try entering the bios or select a booting device it simply won't let me, the screen goes dark and it doesn't show video. Tried to switch the memory to a different socket and reboot, it worked 1 time but it did not run memtest, I'm pretty sure the memory is corrupted. On monday I'll try to test it on a friend's PC windows user, since Gigabyte has a bad history of booting menu not working. I'll keep you updated , thanks for your help and patience. – Battlejuice Sep 12 at 14:06
  • @Battlejuice Is your CPU or RAM overclocked? Did you check if your RAM is on the Memory Support list that I referred to? – heynnema Sep 12 at 14:47
  • None of them are Overclocked, not a fan of it. Yes, it's listed. – Battlejuice Sep 12 at 17:04
  • I was unable to run the test separately but able to run the test in ubuntu after installing memtest. sudo apt install memtest Ran a test on 1024 with 5 loops, and all the checks turned out to be OK . Pagesize says is 4096MB so I ran another test on 4096 with 4 loops and all the checks turned out to be OK again. This goes beyond my knowledge, I have a feeling that not performing this test on grud is keeping me out to test the RAM entirely. – Battlejuice Sep 13 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.