I am testing this by running some 2D/3D graphical apps, and they all seem to behave the same. Reproducing on Thinkpad T480. Right after booting, I get good performance from those apps and htop readings are not out of the ordinary. After S3 suspend and resume, things get different. Applications show much lower performance, some becoming unusable, and htop shows up to 800% CPU usage. I'm running dwm on X11 modesetting with latest drm-kmod installed from ports. Tried resetting Xorg / powerd after resuming, but didn't help. /var/log/messages and /var/log/Xorg.0.log show no new errors after resuming.
> some 2D/3D graphical apps, Can you name one? And the exact version, please. > Thinkpad T480 What's the graphics hardware? > top shows up to 800% CPU usage. For which process(es)?
It is not caused by suspend-resume but a switching vt terminal. Try to set kern.vt.suspendswitch=0, see for details https://github.com/freebsd/drm-kmod/issues/175
(In reply to Graham Perrin from comment #1) > Can you name one? And the exact version, please. For example, the latest version of Stellarium, 23.1 stops working -- it hangs on start while eating all available CPU cycles after VT switch (which is likely the trigger, not going in and out of S3) as I've reported earlier: https://github.com/Stellarium/stellarium/issues/3145. Previous versions are immune to this bug. > What's the graphics hardware? Looking at the issue linked in comment #2 it can happen on both AMD and Intel, e.g. UHD Graphics 620 (Kaby Lake GT2) in my case.
I've got UHD Graphics 620. But anyway, what Oleksandr Kryvulia said is true, there is no longer an issue after configuring kern.vt.suspendswitch=0. Thank you!