0

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 192.168.0.144  netmask 255.255.255.0  broadcast 192.168.0.255
    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 127.0.0.1 netmask 255.0.0.0 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=192.168.0.144 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 '20 at 17:27
  • Does it solve your challenges? If yes, I am happy. – Arijit Chatterjee Sep 11 '20 at 17:33
  • Hey @ArijitChatterjee

    Rebooting now, seems to be fine. Will post progress, thank you!

    – Battlejuice Sep 11 '20 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 '20 at 17:53
  • Thanks @waltinator Checking it out, will keep updated. – Battlejuice Sep 11 '20 at 18:34
  • Your problem may/may not be a ethernet/Internet problem. Edit your question and show me free -h and sysctl vm.swappiness. Start comments to me with @heynnema or I'll miss them. – heynnema Sep 11 '20 at 18:48
  • @heynnema updated. Thank you. – Battlejuice Sep 11 '20 at 18:56
  • Did you install the r8168-dkms driver? If so, did it make any difference in your problem? Does the problem ever occur immediately after booting the computer, or sometime after running various applications? What, and how many, applications do you run at the same time? – heynnema Sep 11 '20 at 19:07
  • @heynnema I did install r8168-dkms driver and its now updated- I'm running Lutris to run a game, world of warcraft which runs in winetricks (since there is no Linux support) . The latency in the game and in my browser Mozilla Firefox (running in ubuntu 20.04) seems to be affected. Not sure if I should redirect my questions to their forums, since the problem is also present when browsing the internet. I tried yesterday to only watch a stream through mozilla firefox and the connection was fine with few disconnections. The problem starts sometime after booting, not immediately. – Battlejuice Sep 11 '20 at 19:17
  • You're not quite clear. It sounds like the r8168-dkms driver did NOT fix the problem, correct? Show me sudo dmidecode -s bios-version and tell me the EXACT make/model # of your computer or motherboard. Then I can put together an answer for you. – heynnema Sep 11 '20 at 19:21
  • @heynnema you are correct.

    F50d Gigabyte ga-320m-hd2

    – Battlejuice Sep 11 '20 at 19:25
  • What processor do you have... Intel or Ryzen? – heynnema Sep 11 '20 at 19:28
  • @heynnema AMD forever. I'm using AMD® Ryzen 7 1700x eight-core processor × 16 – Battlejuice Sep 11 '20 at 19:29
  • Please see my answer. Report back. – heynnema Sep 11 '20 at 19:35
  • @heynnema checking it right now, thank you! – Battlejuice Sep 11 '20 at 19:35

1 Answers1

0

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

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

BIOS

Gigabyte ga-320m-hd2

Your BIOS is up to date at version F50d.

memory

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.

swap

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
heynnema
  • 70,711
  • 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 '20 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 '20 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 '20 at 14:47
  • None of them are Overclocked, not a fan of it. Yes, it's listed. – Battlejuice Sep 12 '20 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 '20 at 01:00
  • @Battlejuice If you're not able to boot to the memtest USB flash drive and run a full memtest, you may still have a memory/hardware problem. I'd suggest that you contact the Gigabyte Support folks and ask for help. – heynnema Sep 13 '20 at 01:22
  • It would seem so. Sometimes the system reboots without warnings, freezes, I'm certain it's not the SSD, it's brand new with less than a week of use and the problem was still there before even acquiring it. Thanks for your help. Will mark this as solved for now and work around the RAM and MB. There is a lot to learn and I'm really happy with Linux/Ubuntu. – Battlejuice Sep 13 '20 at 04:09
  • @Battlejuice Please do keep me posted. – heynnema Sep 13 '20 at 14:55
  • @Battlejuice Status please... – heynnema Sep 18 '20 at 22:47
  • I apologize for the really long delay... Finally was able to run memtest on boot but it shows no errors. So I decided to go after another alternatives, installed rkhunter and chkrootkit , rkhunter is showing 3 possible rootkits and they managed to modified the /usr/bin/lwp-request. Memory is compromised as well: Checking for suspicious (large) shared memory segments [ Warning ] The kernel was modified on december 19th 2019! which means this hacker have had access to my computer for more than 2 years. I'm still not being able to get rid of him. – Battlejuice Oct 12 '20 at 13:36
  • @Battlejuice I think that you have to take rkhunter and chkrootkit with a grain of salt. Edit your question and show me ls -alh /boot. – heynnema Oct 12 '20 at 13:52
  • edited. I can't even update rkhunter it shows Invalid WEB_CMD configuration option: Relative pathname: "/bin/false" – Battlejuice Oct 12 '20 at 14:00
  • Yeah, I didn't took it seriously.. until I started to find weird folders on tmp one I memorized was called "cr0nd0g" was able to track that to some irc on debian [link]https://infobot.rikers.org/%23debian/20070905.html.gz[/link] in the same conversation they even talk about how "WoW" works (the only game I play world of warcraft) – Battlejuice Oct 12 '20 at 14:13
  • @Battlejuice That sounds like a rkhunter config file error. Have you checked/edited that file at all? I really can't help much here. Since your problem is Internet not working, I wouldn't look too deep for problems that don't exist, or don't effect the Internet problem. Did you do ALL of the things in my formal answer? – heynnema Oct 12 '20 at 14:17
  • Yes, I checked and even changed to true and y just to be sure one of them works. Think I'm going to have to find some security expert. The internet connection is affected by the constant traffic on the network when this individual use it. The modem starts to have problems to sync with my ISP when this happens: Missing BP Configuration Setting TLV Type: 17.1;CM-MAC=d8:d7... DHCP WARNING - Non-critical field invalid in response ;CM-MA... Started Unicast Maintenance Ranging - No Response received -... I really thank you for all your help. It has been invaluable. – Battlejuice Oct 12 '20 at 14:25
  • @Battlejuice Sounds like a modem/ISP problem, rather than a hacker. Have you rebooted your cable/dsl modem? – heynnema Oct 12 '20 at 14:33