I'm not a coder but I came across a finding I like to share here as it maybe can be helpful for someone.
My main computer is a hp Elitedesk G5 I7 9gen with Intel integrated graphics. I run 13-Stable on it and there was no way to make
resume from S3 work. I really tried hard with all sort of tricks in the bios or otherwise. Resume only crashed the machine.
So just always shut it down the last few months.
Time passing by and I decided to treat myself and replace my old 24" 1k monitor with a new shinny 27" 2k one. After that graphics
was not doing well. Stuttering firefox and other issues and I thought replace Intel integrated with a real graphics card. As I'm not
a gamer at all I went with a cheap Nvidia GT 1030. Just a basic card.
This fixed my graphics issues very nice but I also had a very nice side effect. Using the Nvidia graphics driver instead of i915kms fixed
the resume issue. Suspend/Resume now works very well, just as it should do. No fiddling around, just out of the box.
But I tested further as I thought there can be more to it:
I have access to 4 more FreeBSD machines and I compared.
Dell Optiplex 7040 I5 6gen Intel integrated graphics: Resume crashes the machine
Dell Optiplex 7060 I5 8gen Intel integrated graphics: Resume crashes the machine
hp machine I5 6gen AMD graphics: Suspend/Resume works fine out of the box
hp thin client AMD cpu and graphics: Suspend/Resume works fine out of the box.
All of them on 13.0 Release.
Is it a random? I wanted to know.
For a test I replaced the 2 x Dell Optiplex Intel integrated graphics with my Nvidia 1030 card and of course while doing this
replaced i915kms with the Nvidia driver. Result both Optiplex Suspend/Resume without any problem.
This tells me that the problem is within i915kms as amdgpu and nvidia-driver playing well with FreeBSD suspend/resume.
At least for me. May be someone else has the option to double check.
Hope this can help someone.