Ask Ubuntu Asked by Tuvel on January 3, 2022
I’ve installed Ubuntu 20.04 on a new SSD I’ve just bought (Samsung EVO 860 500GB).
I love it a lot, BUT!!!
I have a really frustrating issue! whenever I use Discord, Ubuntu starting to stutter. Like windows are moving at 24fps and like every 3 seconds the whole system freeze for a 0.5-1.0sec.
I’ve tried to fix the problem using Discord Canary (alpha software) and it did fix the problem only when I’m not in a voice chat! but when I am, the problem persists.
Today I’ve tried to play Minecraft with my friends and I was using Discord to communicate with them.
As I said above, the problem occurred exactly as I mentioned. But this time with a worse problem, every time there is that "freeze" I would "disconnect" from my network, but not exactly… I’m still connected to the WiFi but the server in the game itself freezes and I can’t hear my friends. (Again, for about 0.5-1.0sec…)
I’m dual booting with Windows 10. when that problem happened I’ve decided to boot into Windows to test if the problem is with my internet (just to check if the problem with my internet is actually my internet) but I’ve found out that there is no problem on Windows 10 whatsoever. The Internet is working perfectly fine (500Megabits Down & 100Megabits Up).
PLEASE! This is the only issue I’ve with Ubuntu that made this experience really frustrating!
Hardware Information:
CPU: AMD Ryzen 5 2600X
GPU: NVIDIA RTX 2070
GPU-Driver: nvidia-driver-440 (proprietary)
Mobo: Gigabyte B450M DS3H
RAM: 16G Of 2x8 Corsair Vengeance 3000mhz
ls -al /var/log/syslog*
-rw-r----- 1 syslog adm 332960 Jul 25 10:01 /var/log/syslog
-rw-r----- 1 syslog adm 2211262 Jul 25 2020 /var/log/syslog.1
-rw-r----- 1 syslog adm 344283 Jul 24 10:02 /var/log/syslog.2.gz
-rw-r----- 1 syslog adm 2040148 Jul 23 09:58 /var/log/syslog.3.gz
ls -al /var/log/auth.log*
-rw-r----- 1 syslog adm 250195 Jul 25 10:01 /var/log/auth.log
tail /var/log/syslog
Jul 25 10:01:50 tuvels-linux snapd[933]: 2020/07/25 10:01:50 Unsolicited response received on idle HTTP channel starting with "HTTP/1.0 408 Request Time-outrnCache-Control: no-cachernConnection: closernContent-Type: text/htmlrnrn<html><body><h1>408 Request Time-out</h1>nYour browser didn't send a complete request in time.n</body></html>n"; err=<nil>
Jul 25 10:02:14 tuvels-linux systemd[1]: systemd-timedated.service: Succeeded.
Jul 25 10:04:50 tuvels-linux anacron[901]: Job `cron.daily' started
Jul 25 10:04:50 tuvels-linux anacron[6349]: Updated timestamp for job `cron.daily' to 2020-07-25
Jul 25 10:04:50 tuvels-linux cracklib: no dictionary update necessary.
Jul 25 10:04:50 tuvels-linux anacron[901]: Job `cron.daily' terminated
Jul 25 10:04:50 tuvels-linux anacron[901]: Normal exit (1 job run)
Jul 25 10:04:50 tuvels-linux systemd[1]: anacron.service: Succeeded.
Jul 25 10:06:19 tuvels-linux PackageKit: daemon quit
Jul 25 10:06:19 tuvels-linux systemd[1]: packagekit.service: Succeeded.
free -h
total used free shared buff/cache available
Mem: 15Gi 2.8Gi 10Gi 210Mi 2.8Gi 12Gi
Swap: 2.0Gi 0B 2.0Gi
sysctl vm.swappiness
vm.swappiness = 10
dpkg -l discord
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=========================================
ii discord-canary 0.0.105 amd64 All-in-one voice and text chat for gamers
grep -i discord /var/log/syslog*
Log was too big (probably because this is a lot of errors or something like that).
So the log is HERE
From the comments...
Discord and Discord Canary
Discord Canary is alpha level software, which is bad enough, but as you note, it's bombing syslog. Alpha level software should only be run by developers who know how to deal with all of the expected errors. I'd remove Discord Canary and run the normal full release of Discord (if you have to run it at all).
In my opinion, Discord has a number of problems, and I consider it spyware. When you run it, it has code to determine what other applications that you're running... and who's business it that? Certainly not Discord or their developers. Also, if you're running the snap version, it requests permissions to do activity outside of its protective sandbox, which should never happen... and then it REALLY bombs /var/log/syslog and /var/log/auth.log.
I'd first immediately remove Discord Canary, then I'd install the normal "stable" Discord release... not the snap version, but a normal .deb release. See https://discord.com/new/download.
If the "stable" release still has a stuttering problem, try changing vm.swappiness back to 60 and see if that helps... sudo sysctl vm.swappiness=60
(for a temporary change only). If that improves things, to make it permanent...
Set vm.swappiness=60 (based on 16G RAM and 2G SWAP), this way...
sudo -H gedit /etc/sysctl.conf
# edit this file
Search for an existing vm.swappiness=
entry...
CTRL+f vm.swappiness
If found, edit it to say vm.swappiness=60
If not found, add vm.swappiness=60
at the end of the file
Save your edits and quit gedit
sudo sysctl -p
Update #1:
To update 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 16G RAM and 4G swap
reboot # reboot and verify operation
Add this line to /etc/fstab...
/swapfile none swap sw 0 0
Update #2:
Updated the Nvidia driver to NVIDIA-Linux-x86_64-450.57.run, and that seems to have fixed it.
Answered by heynnema on January 3, 2022
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP