Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2024 21:00:16 +0200
From:      Joshua Rogers <megamansec@gmail.com>
To:        freebsd-acpi@freebsd.org
Subject:   Re: suspend/resume on MacbookPro11.4 without X
Message-ID:  <CA%2B17n5vNPhQUrkA5ndZmj523LbZBBzs=zFVrjdHvACrd0zjoaw@mail.gmail.com>
In-Reply-To: <E6D110A1-7058-4F7C-A7BC-9806604237C5@gmail.com>
References:  <E6D110A1-7058-4F7C-A7BC-9806604237C5@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000dba6fe061fa95685
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Ah, I see this is specifically mentioned at
https://docs.freebsd.org/en/books/handbook/config/index.html#acpi-overview:
"   In order for the suspend/resume functionality to work correctly the
graphics drivers must be loaded on the system."

So, I need to ensure that X is loaded before the system is ever suspended
(like the lid being closed). Is there any way to ensure that X is loaded
before hw.acpi.power_button_state or hw.acpi.lid_switch_state cause a
suspension?

On Wed, Aug 7, 2024 at 8:53=E2=80=AFPM Joshua Rogers <megamansec@gmail.com>=
 wrote:

> 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 wheth=
er
> it is 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
> keyboard is responsive but the mouse is not. I can continue some actions,
> but clearly only what is cached in memory. I don't know whether this is
> expected: I'm using ZFS with full disk encryption.
>
> 1B. No X, using debug.acpi.suspend_bounce=3D0:
> The screen does not turn back on: but everything else seems to work like
> beep, drive read/writing, keyboard, etc (I'm basically just typing in the
> blind).
>
>
> 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
> the disk works.
>
> ---
>
> For the non-X use cases, I've built the kernel with the following minimal
> configuration [config.txt]. A more minimal version may work, but I didn't
> bother to trim it down any further. The behavior exhibited by the
> suspension is the same as when built normally.
>
> 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 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 of the Macbook too:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit=
/?id=3D13cfc732160f
>  / https://bugzilla.kernel.org/show_bug.cgi?id=3D103211. I've attempted t=
o
> recreate the patch and it loads, but does not seem to do anything
> [asmc-patch.c.patch]. I have no idea if it is relevant or not.
>
> An initial HW_PROBE can be found here:
> https://bsd-hardware.info/?probe=3D6bade1eaf8
>
> Cheers,
> Joshua.
>

--000000000000dba6fe061fa95685
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Ah, I see this is specifically mentioned at <a href=
=3D"https://docs.freebsd.org/en/books/handbook/config/index.html#acpi-overv=
iew">https://docs.freebsd.org/en/books/handbook/config/index.html#acpi-over=
view</a>:</div><div>&quot;=C2=A0=C2=A0 In order for the suspend/resume func=
tionality to work correctly the graphics drivers must be loaded on the syst=
em.&quot;</div><div><br></div><div>So, I need to ensure that X is loaded be=
fore the system is ever suspended (like the lid being closed). Is there any=
 way to ensure that X is loaded before hw.acpi.power_button_state or hw.acp=
i.lid_switch_state cause a suspension?<br></div></div><br><div class=3D"gma=
il_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Aug 7, 2024 at 8:53=
=E2=80=AFPM Joshua Rogers &lt;<a href=3D"mailto:megamansec@gmail.com">megam=
ansec@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad=
ding-left:1ex"><div dir=3D"auto"><span style=3D"background-color:rgb(255,25=
5,255)">Hi all,</span><div dir=3D"ltr"><div><br></div><div>I&#39;m currentl=
y battling with a Macbook Pro 11.4, attempting to get all of its hardware s=
upported on FreeBSD. At the moment, I&#39;m investigating whether it is pos=
sible to get suspend/resume working at on 13.3-RELEASE-p4.</div><div><br></=
div><div>I&#39;ve exhibited a few different behaviors:</div><div><br></div>=
<div>Using the inbuilt SSD/NVMe (&quot;SM951 AHCI&quot;), I exhibit the fol=
lowing behaviour:</div><div><br></div><div>1A. No X, Using=C2=A0debug.acpi.=
suspend_bounce=3D1:</div><div>Successfully resumes, but the disk becomes un=
readable/unwritable. The keyboard is responsive but the mouse is not. I can=
 continue some actions, but clearly only what is cached in memory. I don&#3=
9;t know whether this is expected: I&#39;m using ZFS with full disk encrypt=
ion.=C2=A0</div><div><br></div><div>1B. No X, using debug.acpi.suspend_boun=
ce=3D0:</div><div>The screen does not turn back on: but everything else see=
ms to work like beep, drive read/writing, keyboard, etc (I&#39;m basically =
just typing in the blind).=C2=A0</div><div><br></div><div><br></div><div>2A=
. Using X and suspend_bounce=3D1:</div><div>The screen resumes but the disk=
 becomes unreadable writable. The keyboard is responsive but the mouse is n=
ot. The same as without X</div><div><br></div><div>2B. Using X and debug.ac=
pi.suspend_bounce=3D0:</div><div>Everything works as well as expected. Keyb=
oard and mouse work. Writing to the disk works.=C2=A0</div><div><br></div><=
div>---</div><div><br></div><div>For the non-X use cases, I&#39;ve built th=
e kernel with the following minimal configuration [config.txt]. A more mini=
mal version may work, but I didn&#39;t bother to trim it down any further. =
The behavior exhibited by the suspension is the same as when built normally=
.</div><div><br></div><div>At the moment, case 2B is fine: I use X most of =
the time, and I don&#39;t use suspend_bounce. But I would like to fiz the 1=
B case at least (no X). Are there any suggestions of how to debug this?</di=
v><div><br></div><div>FYI: It looks like the Linux kernel went through an i=
ssue with this version of the Macbook too:=C2=A0<a href=3D"https://git.kern=
el.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3D13cfc732160=
f" target=3D"_blank">https://git.kernel.org/pub/scm/linux/kernel/git/torval=
ds/linux.git/commit/?id=3D13cfc732160f</a>=C2=A0/=C2=A0<a href=3D"https://b=
ugzilla.kernel.org/show_bug.cgi?id=3D103211" target=3D"_blank">https://bugz=
illa.kernel.org/show_bug.cgi?id=3D103211</a>. I&#39;ve attempted to recreat=
e the patch and it loads, but does not seem to do anything [asmc-patch.c.pa=
tch]. I have no idea if it is relevant or not.</div><div><br></div><div>An =
initial HW_PROBE can be found here:=C2=A0<a href=3D"https://bsd-hardware.in=
fo/?probe=3D6bade1eaf8" target=3D"_blank">https://bsd-hardware.info/?probe=
=3D6bade1eaf8</a></div><div><br></div><div>Cheers,</div><div>Joshua.</div><=
/div><div dir=3D"ltr"></div></div></blockquote></div>

--000000000000dba6fe061fa95685--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B17n5vNPhQUrkA5ndZmj523LbZBBzs=zFVrjdHvACrd0zjoaw>