Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2024 20:52:52 +0200
From:      Joshua Rogers <megamansec@gmail.com>
To:        freebsd-acpi@freebsd.org
Subject:   suspend/resume on MacbookPro11.4 without X
Message-ID:  <E6D110A1-7058-4F7C-A7BC-9806604237C5@gmail.com>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-57DFA965-297F-430B-AE8F-92518238D541
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi all,

I'm currently battling with a Macbook Pro 11.4, attempting to get all of its=
 hardware supported on FreeBSD. At the moment, I'm investigating whether it i=
s possible to get suspend/resume working at on 13.3-RELEASE-p4.

I've exhibited a few different behaviors:

Using the inbuilt SSD/NVMe ("SM951 AHCI"), I exhibit the following behaviour=
:

1A. No X, Using debug.acpi.suspend_bounce=3D1:
Successfully resumes, but the disk becomes unreadable/unwritable. The keyboa=
rd is responsive but the mouse is not. I can continue some actions, but clea=
rly only what is cached in memory. I don't know whether this is expected: I'=
m using ZFS with full disk encryption.=20

1B. No X, using debug.acpi.suspend_bounce=3D0:
The screen does not turn back on: but everything else seems to work like bee=
p, drive read/writing, keyboard, etc (I'm basically just typing in the blind=
).=20


2A. Using X and suspend_bounce=3D1:
The screen resumes but the disk becomes unreadable writable. The keyboard is=
 responsive but the mouse is not. The same as without X

2B. Using X and debug.acpi.suspend_bounce=3D0:
Everything works as well as expected. Keyboard and mouse work. Writing to th=
e disk works.=20

---

For the non-X use cases, I've built the kernel with the following minimal co=
nfiguration [config.txt]. A more minimal version may work, but I didn't both=
er to trim it down any further. The behavior exhibited by the suspension is t=
he same as when built normally.

At the moment, case 2B is fine: I use X most of the time, and I don't use su=
spend_bounce. But I would like to fiz the 1B case at least (no X). Are there=
 any suggestions of how to debug this?

FYI: It looks like the Linux kernel went through an issue with this version o=
f the Macbook too: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/=
linux.git/commit/?id=3D13cfc732160f / https://bugzilla.kernel.org/show_bug.c=
gi?id=3D103211. I've attempted to recreate the patch and it loads, but does n=
ot seem to do anything [asmc-patch.c.patch]. I have no idea if it is relevan=
t or not.

An initial HW_PROBE can be found here: https://bsd-hardware.info/?probe=3D6b=
ade1eaf8

Cheers,
Joshua.

--Apple-Mail-57DFA965-297F-430B-AE8F-92518238D541
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><span style=3D"-webkit-text-size-adjust: au=
to; background-color: rgb(255, 255, 255);">Hi all,</span><div dir=3D"ltr" st=
yle=3D"-webkit-text-size-adjust: auto;"><div><br></div><div>I'm currently ba=
ttling with a Macbook Pro 11.4, attempting to get all of its hardware suppor=
ted on FreeBSD. At the moment, I'm investigating whether it is possible to g=
et suspend/resume working at on 13.3-RELEASE-p4.</div><div><br></div><div>I'=
ve exhibited a few different behaviors:</div><div><br></div><div>Using the i=
nbuilt SSD/NVMe ("SM951 AHCI"), I exhibit the following behaviour:</div><div=
><br></div><div>1A. No X, Using&nbsp;debug.acpi.suspend_bounce=3D1:</div><di=
v>Successfully resumes, but the disk becomes unreadable/unwritable. The keyb=
oard is responsive but the mouse is not. I can continue some actions, but cl=
early only what is cached in memory. I don't know whether this is expected: I=
'm using ZFS with full disk encryption.&nbsp;</div><div><br></div><div>1B. N=
o X, using debug.acpi.suspend_bounce=3D0:</div><div>The screen does not turn=
 back on: but everything else seems to work like beep, drive read/writing, k=
eyboard, etc (I'm basically just typing in the blind).&nbsp;</div><div><br><=
/div><div><br></div><div>2A. Using X and suspend_bounce=3D1:</div><div>The s=
creen resumes but the disk becomes unreadable writable. The keyboard is resp=
onsive but the mouse is not. The same as without X</div><div><br></div><div>=
2B. Using X and debug.acpi.suspend_bounce=3D0:</div><div>Everything works as=
 well as expected. Keyboard and mouse work. Writing to the disk works.&nbsp;=
</div><div><br></div><div>---</div><div><br></div><div>For the non-X use cas=
es, I've built the kernel with the following minimal configuration [config.t=
xt]. A more minimal version may work, but I didn't bother to trim it down an=
y further. The behavior exhibited by the suspension is the same as when buil=
t normally.</div><div><br></div><div>At the moment, case 2B is fine: I use X=
 most of the time, and I don't use suspend_bounce. But I would like to fiz t=
he 1B case at least (no X). Are there any suggestions of how to debug this?<=
/div><div><br></div><div>FYI: It looks like the Linux kernel went through an=
 issue with this version of the Macbook too:&nbsp;<a href=3D"https://git.ker=
nel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3D13cfc732160=
f">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit=
/?id=3D13cfc732160f</a>&nbsp;/&nbsp;<a href=3D"https://bugzilla.kernel.org/s=
how_bug.cgi?id=3D103211">https://bugzilla.kernel.org/show_bug.cgi?id=3D10321=
1</a>. I've attempted to recreate the patch and it loads, but does not seem t=
o do anything [asmc-patch.c.patch]. I have no idea if it is relevant or not.=
</div><div><br></div><div>An initial HW_PROBE can be found here:&nbsp;<a hre=
f=3D"https://bsd-hardware.info/?probe=3D6bade1eaf8">https://bsd-hardware.inf=
o/?probe=3D6bade1eaf8</a></div><div><br></div><div>Cheers,</div><div>Joshua.=
</div></div><div dir=3D"ltr"></div></body></html>=

--Apple-Mail-57DFA965-297F-430B-AE8F-92518238D541--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E6D110A1-7058-4F7C-A7BC-9806604237C5>