Bug 278170 - graphics/drm-kmod: suspend locking regression on Framework laptop
Summary: graphics/drm-kmod: suspend locking regression on Framework laptop
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: regression
Depends on:
Blocks: frameworklaptop
  Show dependency treegraph
 
Reported: 2024-04-04 16:06 UTC by mmatalka
Modified: 2024-04-30 10:46 UTC (History)
7 users (show)

See Also:
linimon: maintainer-feedback? (x11)


Attachments
Set-S3-suspend-type (1.03 KB, patch)
2024-04-05 06:46 UTC, Vladimir Kondratyev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mmatalka 2024-04-04 16:06:59 UTC
I'm on a Framework laptop uses 6.1-lts drm-kmod, and suspend/resume has been working but I compiled and installed main-n269104-41956c13f950 yesterday and suspend/resume is freezing.

What I experience is it drops down to a console view and just sits there and is unresponsive.  I have to force restart the laptop.

What information can I provide to help?
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2024-04-05 05:22:24 UTC
If it was working before it's unlikely to be drm fault then.
First thing to try will be to recompile drm-kmod to be sure that it's synced with your kernel.
Then bisect the kernel.
Comment 2 Vladimir Kondratyev freebsd_committer freebsd_triage 2024-04-05 06:46:18 UTC
Created attachment 249733 [details]
Set-S3-suspend-type

Test this patch
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2024-04-05 07:05:48 UTC
(In reply to Vladimir Kondratyev from comment #2)

The patch looks good but I don't think that's the problem OP is having as 6.1 worked before for them.
Comment 4 mmatalka 2024-04-05 11:49:08 UTC
Thank you for the incredibly fast response time.  I also tried to see if I had a boot environment for the working version but, alas, I do not. I deleted it before testing suspend.  I will test this patch and report back.
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2024-04-05 11:52:36 UTC
There was a report of some audio stack patches causing a regression with suspend-to-S3.  They are reverted in main now, so it might be worth trying to update.
Comment 6 mmatalka 2024-04-05 12:30:51 UTC
I will do that as well, thank you.
Comment 7 mmatalka 2024-04-05 14:50:20 UTC
Can confirm latest HEAD did not resolve the issue.  I'm trying the patch now.
Comment 8 mmatalka 2024-04-05 14:57:07 UTC
Just to confirm I'm doing everything right, I have been using 6.1-lts for some time.

I am pulling down the latest 15.0-CURRENT branch

FreeBSD:

make buildkernel buildworld
make installkernel
reboot
make installworld
etcupdate -F
reboot

drm-kmod:
make
make install
modify rc.config to load i915kms

reboot

Everything starts fine works.

Try to enter S3 and I get pulled into console view and it just sits there.

drm-kmod commit: 36ad244cd1446fd974189be7a7ab1a92989b8eeb
Comment 9 mmatalka 2024-04-05 14:57:08 UTC
Just to confirm I'm doing everything right, I have been using 6.1-lts for some time.

I am pulling down the latest 15.0-CURRENT branch

FreeBSD:

make buildkernel buildworld
make installkernel
reboot
make installworld
etcupdate -F
reboot

drm-kmod:
make
make install
modify rc.config to load i915kms

reboot

Everything starts fine works.

Try to enter S3 and I get pulled into console view and it just sits there.

drm-kmod commit: 36ad244cd1446fd974189be7a7ab1a92989b8eeb
Comment 10 mmatalka 2024-04-05 17:22:13 UTC
The patch did not resolve the issue.
Comment 11 Vladimir Kondratyev freebsd_committer freebsd_triage 2024-04-05 18:32:01 UTC
(In reply to mmatalka from comment #10)

> The patch did not resolve the issue.
It fixes S3 suspend on amdgpu rather than on i915kms
Comment 12 mmatalka 2024-04-05 21:29:52 UTC
Ah that makes sense.  Sorry, I was unclear about what hardware I'm running.
Comment 13 mmatalka 2024-04-09 17:49:57 UTC
Good news: the latest HEAD I compiled today, main-n269229-cce11997a052:, is working with suspend and resume (so far). Yay!
Comment 14 Ed Maste freebsd_committer freebsd_triage 2024-04-29 19:45:01 UTC
(In reply to mmatalka from comment #13)
This issue should be presumed resolved then?
Comment 15 Emmanuel Vadot freebsd_committer freebsd_triage 2024-04-30 05:37:21 UTC
Indeed
Comment 16 Emmanuel Vadot freebsd_committer freebsd_triage 2024-04-30 10:46:28 UTC
It's not "Overcome By Events", the bug was on drm but it wasn't drm.