While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Team Fortress 2 Comic issue 7 is finally, officially available
- Valve released the Best of Steam - 2024 showing off the highest earners and most played games
- Firaxis reveal Sid Meier's Civilization VII system requirements for Linux
- Valve will join Lenovo at CES 2025 for the future of gaming handhelds
- Steam Deck Verified highlights for December 2024
- > See more over 30 days here
I have been having some rather extreme system lag over the last several weeks, and I suspect that it might be because of the NVIDIA drivers I am using. I am not sure how to produce the relevant outputs that would be helpful in diagnosing the problem, so I would be really grateful if anyone can help direct me. But also, has anyone else been having system lag issue?
It is most extreme when I am playing games, but it also becomes an issue with even running something like Discord.
Thanks for your time, and I am sorry I cannot be more specific without some initial advice.
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.11.0-40-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-2600 CPU @ 3.40GHz
Memory: 15.6 GiB of RAM
GeForce GTX 1070
View PC info
As for information lshw is a good place to start.
sudo apt-get install lshw
sudo lshw -sanitize > lshw.txt
and post the output to a pastebin.
inxi is also useful, but is less straightforward to use.
View PC info
You should see something like so:
!link
Try changing the Rendering backend and Latency options, I've found the OpenGL choices can cause stutter on Nvidia (using a 970GTX on 2x 3440x1440 monitors), see if Xrender helps, though it's CPU bound.
View PC info
Just a side note. since you are using KDE and nvidia. Me and kodatarule recently discovered weird thing with nvidia+kwin. Basically open your nvidia-settings, change the openGL quality option to performance or high performance... reboot your system and start the nvidia-settings at startup once to have it super smooth for whatever reason.
so if that makes it smooth for you also like it did for us, then add
nvidia-settings --load-config-only
to the startup
Last edited by Xpander on 24 October 2021 at 9:07 am UTC
https://pastebin.com/PEURGAHB
Thanks, I tried this yesterday, but it seems like there is something going on that causes system lag, and not only video lag. Programs take painful times to load, days slow down in Stellaris, and turns take forever in Civ 6.
On this suggestion, I tried to install nvidia-settings, but when I loaded the program after it simply showed a black box, so I uninstalled it again. In terminal it was saying that it could not retrieve system information. Any recommendations on this front?
View PC info
Looking at the output, I can only say that in my experience, the only thing that has ever caused system lag is if one or more storage devices was having trouble or failing.
Your SSD is somewhat middle-of the road, but here's some things you can think about checking to get more mileage:
How full is your SSD? The less that's on it, the faster it will be. 75% full seems to be the point at which performance starts being impacted.
Is its firmware up to date?
Do you have TRIM support enabled? If not, I'd enable it. Running fstrim once a week should help.
Have you set an IO Scheduler such as deadline or bfq? It can speed up traditional SSDs and HDDs. (Don't try it with an NVME SSD though. It can actually make those slower!
Any of these can lower latency and therefore reduce lag.
Setting noatime in the fstab for the SSDs can improve write endurance.
Have you run a S.M.A.R.T. test on the HDD? The last time I had one fail it slowed my mother's computer to a crawl and it wasn't even the main drive! But your WD Blue is fairly reliable, so that might not be it. You could also test the SSD and compare the results with kingston's attribute sheet.
If I think of anything else, I'll post it.
I am moving a couple of large games off of my SSD to my HDD, so we'll see if making it less full will help. I think this started before I moved a game on there that pushed it above half full, but it's worth a try.
Yes, I do updates more or less as they come out.
I did a trim on the SSD, and I think it helped somewhat. Though, I am still getting slowdown, visual glitches, and slow response to clicks when I have steam, firefox, and Discord open, not to mention a game like Baldur's Gate 3.
I am not sure what an IO Scheduler is or does, but I can give it a try!
I ran a smart test, but I am not really sure what to make of its output. I included it in a pastebin here:
https://pastebin.com/4VQavQcE
View PC info
I am pretty sure nvidia-settings should get installed when you install the nvidia-driver, how did you install the driver, did you use a repo?
For some reason it now appears in my application menu, where it did not before. Anyway, I did as you recommended. I will report back!
Edit: I am also getting audio stuttering when playing BG3. I am not sure if this gives any further hints to potential problems or not, but I thought I would mention it just in case.
Last edited by classl3ss on 24 October 2021 at 7:22 pm UTC
View PC info
System >> KSysGuard should help.
Note: Click on the 'CPU %' column and sort from Highest to Lowest.
Note Note: The 'System Load' tab is also very useful.
The problem could be 1 (or a combination) of 3 (or more) things: CPU is overloaded, lots of stuff is accessing the harddrives, or you're running out of RAM and the system is forced to use swap(harddrive).
Last edited by kit89 on 24 October 2021 at 7:19 pm UTC
I used to the top command, as it does a nice job of organizing not only the CPU % of each process, but overall CPU %. Here is the output when I am hearing audio stuttering:
https://pastebin.com/WCVCjx95
Last edited by classl3ss on 24 October 2021 at 7:35 pm UTC
View PC info
MiB Mem : 15987.7 total, 200.8 free, 8404.2 used, 7382.7 buff/cache
MiB Swap: 2048.0 total, 2015.5 free, 32.5 used. 6686.4 avail Mem
It looks like you're tapping into swap, you may have too many applications running for the amount of memory you have available.
As a reference here is my system:
MiB Mem : 32014.4 total, 16173.0 free, 6171.3 used, 9670.1 buff/cache
MiB Swap: 4767.0 total, 4767.0 free, 0.0 used. 24917.2 avail Mem
Note that I have 4767MB of swap available, and I have used 0.0.
If we can correlate your lag and swap activity we can determine if it's excessive memory consumption that's the problem.
Last edited by kit89 on 24 October 2021 at 7:52 pm UTC
That is odd, because I it was suddenly one day that I started running into this issue, without any chance in my computer habits. Could there be something going on terms of software that has changed my memory usage?
Or does RAM age such that I should just consider upgrading my RAM?
Right now I am using Corsair Vengeance 16GB (4x4 GB) 16000 MHZ.
Last edited by classl3ss on 24 October 2021 at 7:59 pm UTC
View PC info
It's not a hardware issue, it seems to be a software problem.
You can use:
top -o %MEM
to order processes by their memory usage. Let's see if anything stands out as an obvious culprit.
View PC info
With 16GB of RAM roughly 1% == 163MB
So bg3.exe is consuming roughly 1678.9MB (your previous top had bg3 consuming about 2.4GB).
GeckoMain and Web Content is related to Firefox, with all of them accumulated is 16.4% or 2.7GB
The processes that start with Cr such as CrBrowserMain and CrRenderMain are related to Chromium. From what I can tell there is about 8.8% or 1.5GB
Afterwards Steam, latte-dock, Signal, Dropbox, and Discord are contenders for heavy memory usage. Each of these applications spin off multiple child processes, so their actual memory usage is likely significantly higher.
If memory serves me right Signal, Dropbox, and Discord are not 'native' applications they are web applications running in their own copy of the Chromium Web Browser.
I recommend systemically closing each of the applications and finding out what processes disappear from top, then identify how much memory it frees up. After you've closed a bunch of them down, reopen (one at a time) and see how much memory each application consumes.
Also each Tab in a Web Browser creates its own process, for Firefox this is those Web Content processes. You'll want to get in the habit of closing unused tabs.
Side Note: If you want to kill a process via the command line you can use the PID (first column in top).
kill -9 <PID>
for example to kill bg3.exe in your last pastebin you could use:
kill -9 61823
Note this may not kill all child processes, such as wine!
View PC info
View PC info
Your HDD seems fine, nothing alarming.
The ArchWiki has a great section on the various SSD/HDD io schedulers. The same page also has a section called Improving system responsiveness under low-memory conditions.. It might help.