Check out our Monthly Survey Page to see what our users are running.
extreme system lag, perhaps because of NVIDIA 470.74 drivers?
Page: 1/2»
  Go to:
classl3ss Oct 23, 2021
Hello all!


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
redneckdrow Oct 23, 2021
Huh, haven't had that particular issue. It could be just about anything.


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.
kit89 Oct 24, 2021
You might want to checkout kde's compositor settings: System Settings >>> Display and Monitor >> Compositor.

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.
Xpander Oct 24, 2021
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.

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
classl3ss Oct 24, 2021
Thanks so much for getting this started! Here is the output:
https://pastebin.com/PEURGAHB
classl3ss Oct 24, 2021
You might want to checkout kde's compositor settings: System Settings >>> Display and Monitor >> Compositor.

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.

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.

so if that makes it smooth for you also like it did for us, then add
nvidia-settings --load-config-only
to the startup

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?
redneckdrow Oct 24, 2021
Thanks so much for getting this started! Here is the output:
https://pastebin.com/PEURGAHB

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.
classl3ss Oct 24, 2021
Thanks again for your help! I included answers to your questions below:

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.

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.

Is its firmware up to date?

Yes, I do updates more or less as they come out.

Do you have TRIM support enabled? If not, I'd enable it. Running fstrim once a week should help.

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.


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!

I am not sure what an IO Scheduler is or does, but I can give it a try!

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.

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
kit89 Oct 24, 2021
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?

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?
classl3ss Oct 24, 2021
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?

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!
classl3ss Oct 24, 2021
Okay, so I have done everything so far except use an IO Scheduler, and I am still running into the same issue. Do you think that it might be time to replace my HDD?

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
kit89 Oct 24, 2021
When you suffer from system lag what is your cpu consumption and memory usage like?

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
classl3ss Oct 24, 2021
When you suffer from system lag what is your cpu consumption and memory usage like?

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).

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
kit89 Oct 24, 2021
This looks interesting:

 
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
classl3ss Oct 24, 2021
This looks interesting:

 
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.

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
classl3ss Oct 24, 2021
Also, y'all are all great. Thank you so much for working with me on this! Hopefully we can find a solution :)
kit89 Oct 24, 2021
Or does RAM age such that I should just consider upgrading my RAM?

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.
classl3ss Oct 24, 2021
I did as you instructed. Here is the output: https://pastebin.com/HCC8uJRA
kit89 Oct 24, 2021
I did as you instructed. Here is the output: https://pastebin.com/HCC8uJRA

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!
kit89 Oct 24, 2021
To give an example of unexpected memory usage, I had Chrome open that spun off 30 processes, each process consumed around 50-150MB. Only when I closed all Chrome windows did it free up 4.5GB of my RAM.
redneckdrow Oct 24, 2021
Also, historically KDE4 had a lot of memory leaks. I haven't used Plasma 5 enough to comment, but it isn't exactly lightweight. But yeah, web browsers these days eat RAM like toddlers eat candy. I could wax poetic about the failings of modern web design for hours!

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.
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!
Login / Register