Bug 271995 - graphics/drm-510-kmod: performance suffers after S3 suspend/resume
Summary: graphics/drm-510-kmod: performance suffers after S3 suspend/resume
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL: https://github.com/freebsd/drm-kmod/i...
Keywords: needs-qa, performance
Depends on:
Blocks:
 
Reported: 2023-06-14 17:37 UTC by brtastic.dev
Modified: 2024-01-13 05:29 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brtastic.dev 2023-06-14 17:37:31 UTC
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.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-06-14 23:27:58 UTC
> 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)?
Comment 2 Oleksandr Kryvulia 2023-06-15 05:48:30 UTC
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
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2023-06-15 07:48:23 UTC
(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.
Comment 4 brtastic.dev 2023-06-25 05:10:08 UTC
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!