When suspending/resuming the PC my graphics performance suffers until I reboot. This has happened since at the the 390 driver, likely earlier.415.1 but still happens in 415.18.
AMD Threadripper 1950X
32GB ram
nvidia 980ti
Here’s a practical test:
Fresh boot:
__GL_SYNC_TO_VBLANK=0 glxgears
104085 frames in 5.0 seconds = 20816.875 FPS
105471 frames in 5.0 seconds = 21094.119 FPS
105602 frames in 5.0 seconds = 21120.379 FPS
After suspend/resume:
__GL_SYNC_TO_VBLANK=0 glxgears
67730 frames in 5.0 seconds = 13545.928 FPS
68753 frames in 5.0 seconds = 13750.495 FPS
70471 frames in 5.0 seconds = 14094.160 FPS
I’ve lost ~30% 3d performance just by suspending/resuming the PC.
I don’t think it’s a KDE issue because if I restart the display manager (sudo systemctl restart sddm)
I still get poor performance:
__GL_SYNC_TO_VBLANK=0 glxgears
76633 frames in 5.0 seconds = 15326.591 FPS
80297 frames in 5.0 seconds = 16059.361 FPS
78971 frames in 5.0 seconds = 15793.507 FPS
76905 frames in 5.0 seconds = 15380.963 FPS
The performance is still poor compared to a fresh boot. Suspending seems to cause an issue on the hardware that’s only fixed with a reboot. nvidia-bug-report.log.gz (560 KB)
Nothing obvious besides you’re missing the acpid. Please install it, reboot and check if that fixes the issue. If not, suspend/resume, then put the gpu under load and create a new nvidia-bug-report.log.
I’m seeing similar performance drops when Xorg uses a lot of memory due to running Chrome in the background. Games are seeing a vast performance drop then. Quitting those memory hogs helps. It looks like the driver cannot migrate memory between system and VRAM (or doesn’t want to). You can use “nvidia-smi” to see which PID uses memory. Some applications may allocate memory through Xorg and not directly.
Is it possible that you are seeing less free VRAM after resume than before suspend? Compare with nvidia-smi before and after. Does performance return after you quit processes hogging memory?
BTW: Changing the settings for transparent hugepages in the kernel can make a big difference. Even with a lot of VRAM still available, the performance may degrade early when using “transparent_hugepage=always” instead of “…=madvise”, even resulting in memory allocation errors despite having a lot of VRAM and sysmem free.
The first segment is a fresh boot, the second is after a suspend/resume. No other programs running in the background other than OBS to do the recording and Lutris/Steam to launch the game. AS you can see the frames and frametimes are all over the pace after a suspend/resume.
This doesn’t just affect wine but as above with glxgears.
As for memory usage, after suspend the xorg process is 708mb, the same as before (Not bad considering I have 2x 3840x2160 monitors). Obviously as I open programs it increases. However, closing everything and running only a game has the same effect: Fine on boot, awful after resume.
I don’t believe I have transparent_hugepage set. At least accordng to
or setting clocksource=hpet as a kernel parameter so it’s chosen on startup has no effect. As far as I know this means TSC is never used. Despite tsc never being set, I have the same problem. Boot is fine, after suspend performance is worse despite both states now using hpet.
I’m not sure why after suspend is showing slightly higher here but they are in the same ballpark. In comparison graphics loses about 30% and has all kinds of frametime issues.
Actually looking at that there is a newer bios available but it just adds support for 2nd gen CPUs so I don’t think it will make much difference but I’ll try applying it and see if it helps.
I set tsc=unstable as a kernel parameter to disable it entirely (removing the warning), force hpet and with that done the difference between pre-suspend and post suspend is 8% in glxgears. I’ll try unigine-heaven and see if that reports any differences.
This has definitely improved the situation but it’s still rather annoying. In SkyrimSE at 4k under Wine, pre-suspend I’m pretty much locked at 60fps in most areas with occasional drops down to about 52. Post-suspend the fps is noticeably worse with 60pfs rarely reached with drops down to 42fps instead of 52fps pre-suspend.
If it helps, After suspend there are noticeable framerate dips when looking around that aren’t there on a fresh boot which makes me think it could be a vram problem. It doesn’t just happen with SkyrimSE but it’s definitely most pronounced there of the games I tried.
So with that said, it is perhaps a kwin issue. I’ll try a different desktop environment and see if I have the same problem.
You could run bandwidthTest from the cuda demos to check for that
[url]https://docs.nvidia.com/cuda/demo-suite/index.html[/url]
Though that would only show a symptom, not the reason.
Maybe check if there’s some aspm problem by turning it off using kernel parameter pcie_aspm=off
pcie_aspm=off makes no difference. I’ve attached a screenshot of the frametimes in skyrim.
Before suspend the line is flat and the frametimes are consistent. After suspend, the line is flat if i stat looking at the same point. If i move the mouse around so that the scene being rendered is different the times spike.
edit: I could try the nouveau driver but the performance is so poor I think I’d struggle to see the difference if there was an issue.