Hi everyone. With the help of patches from Gregory Norton and Joshua Stein, I've got 8.0-current running on a MacBook8,1. However, one thing that doesn't work is suspend/resume. If I run `zzz` or close the lid, the computer apparently successfully goes to sleep, but is unresponsive to any wake events including pressing the power button, keys on the keyboard, the trackpad button, or opening the lid, forcing me to hard power off the machine.
I'm willing to get my hands dirty hacking the kernel to try to fix this, but I've reached the limits of my own imagination in trying to gather more information about what's happening, and I was hoping to get some advice on more things to try. I've tried booting a pristine 8.0-current kernel (and then driving the computer remotely via ssh since the keyboard has no driver), and I see the same sleep behavior, so I don't think the problem is solely the fault of the patches I've applied. The patches in question are: https://marc.info/?l=openbsd-tech&m=178118755792445&w=2 https://marc.info/?l=openbsd-tech&m=176365665219942&w=2 I've tried a couple undirected experiments already that didn't pan out, including: - Having the kernel answer no to _OSI("Darwin") ACPI calls - Moving the invocation of `acpi_enable_wakegpes` before `_PTS` in case the wake GPEs weren't getting enabled I've also built the kernel with ACPI_DEBUG enabled. The last thing that makes it to /var/log/messages is the `_TTS` method invocation, followed by `uhub0: disconnected`. I'm guessing that the disk queue goes quiet shortly after, so any further messages are simply getting lost, but I'm not sure how to tell, since the display is already off at this point, and the machine has no serial ports to send console output to. Is there a way to keep the display output active during suspend, or at least delay its deactivation to the last possible moment, in order to attempt to capture more debug info? I'm also curious if there are any tricks to narrow down where in the suspend/resume cycle it's getting stuck. It's getting far enough to power down the display, keyboard backlight, and other observable devices, but it's hard to tell whether it's not waking up because it got stuck in the final stages of entering sleep, if it's asleep but there are somehow no active GPEs that can wake it, or if it is resuming but getting stuck early in the resume process. Thank you all for any advice you're able to provide! I'll provide my dmesg below: OpenBSD 8.0-beta (GENERIC.MP) #1: Wed Aug 5 21:54:03 PDT 2026 [email protected]:/home/joe/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8469352448 (8077MB) avail mem = 8190115840 (7810MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x8afad000 (40 entries) bios0: vendor Apple Inc. version "MB81.88Z.0164.B09.1509021747" date 09/02/2015 bios0: Apple Inc. MacBook8,1 efi0 at bios0: UEFI 1.1 acpi0 at bios0: ACPI 5.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT MCFG DMAR acpi0: wakeup devices PEG0(S3) EC__(S3) HDEF(S3) RP01(S3) RP03(S4) ARPT(S4) RP04(S4) RP05(S3) SPIT(S3) XHC1(S3) ADP1(S3) LID0(S3) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) M-5Y31 CPU @ 0.90GHz, 800.04 MHz, 06-3d-04, patch 0000002f cpu0: cpuid 1 edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> ecx=77fafbbf<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND> cpu0: cpuid 6 eax=77<SENSOR,ARAT,PTS> ecx=9<EFFFREQ> cpu0: cpuid 7.0 ebx=21c27ab<FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT> edx=9c000600<SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD> cpu0: cpuid a vers=3, gp=4, gpwidth=48, ff=3, ffwidth=48 cpu0: cpuid d.1 eax=1<XSAVEOPT> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> ecx=121<LAHF,ABM,3DNOWP> cpu0: cpuid 80000007 edx=100<ITSC> cpu0: MELTDOWN cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache cpu0: smt 0, core 0, package 0, type P mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 100MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Core(TM) M-5Y31 CPU @ 0.90GHz, 800.03 MHz, 06-3d-04, patch 0000002f cpu1: smt 0, core 1, package 0, type P cpu2 at mainbus0: apid 1 (application processor) cpu2: Intel(R) Core(TM) M-5Y31 CPU @ 0.90GHz, 800.02 MHz, 06-3d-04, patch 0000002f cpu2: smt 1, core 0, package 0, type SP cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Core(TM) M-5Y31 CPU @ 0.90GHz, 800.02 MHz, 06-3d-04, patch 0000002f cpu3: smt 1, core 1, package 0, type SP ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins acpiec0 at acpi0 acpimcfg0 at acpi0 acpimcfg0: addr 0xe0000000, bus 0-52 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG0) acpiprt2 at acpi0: bus 4 (RP01) acpiprt3 at acpi0: bus 1 (RP03) acpiprt4 at acpi0: bus 2 (RP04) acpiprt5 at acpi0: bus 3 (RP05) acpisbs0 at acpi0: SBS0 model "bq20z451" serial 323 type LION oem "ifixit" acpipci0 at acpi0 PCI0: 0x00000004 0x00000011 0x00000001 acpicmos0 at acpi0 asmc0 at acpi0: SMC_ (smc-huronriver) addr 0x300/0x20: rev 2.25f625, 620 keys "ACPI0008" at acpi0 not configured "ACPI0001" at acpi0 not configured "APP000D" at acpi0 not configured "BCM2E7C" at acpi0 not configured acpiac0 at acpi0: AC unit offline acpibtn0 at acpi0: LID0(wakeup) acpibtn1 at acpi0: PWRB abl0 at acpi0: PNLF (backlight) acpibtn2 at acpi0: SLPB acpicpu0 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpivideo0 at acpi0: IGPU acpivout0 at acpivideo0: DD01 cpu0: using VERW MDS workaround (except on vmm entry) cpu0: Enhanced SpeedStep 800 MHz: speeds: 1101, 1100, 1000, 900, 800, 700, 600, 500 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09 inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5300" rev 0x09 drm0 at inteldrm0 inteldrm0: msi, BROADWELL, gen 8 azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi azalia0: No codecs found xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi, xHCI 1.0 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 "Intel 9 Series DMA" rev 0x03 at pci0 dev 21 function 0 not configured vendor "Intel", unknown product 0x9ce2 (class serial bus unknown subclass 0x80, rev 0x03) at pci0 dev 21 function 2 not configured ispi0 at pci0 dev 21 function 4 "Intel 9 Series SPI" rev 0x03: apic 2 int 21 aplhidev0 at ispi0 aplkbd0 at aplhidev0: 8 variable keys, 6 key codes wskbd0 at aplkbd0: console keyboard aplms0 at aplhidev0 wsmouse0 at aplms0 mux 0 vendor "Intel", unknown product 0x9ce3 (class communications subclass serial, rev 0x03) at pci0 dev 21 function 5 not configured "Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x03: msi azalia1: codecs: Cirrus Logic CS4208 audio0 at azalia1 ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3: msi pci1 at ppb0 bus 4 ppb1 at pci0 dev 28 function 2 "Intel 9 Series PCIE" rev 0xe3: msi pci2 at ppb1 bus 1 bwfm0 at pci2 dev 0 function 0 "Broadcom BCM4350" rev 0x05: msi ppb2 at pci0 dev 28 function 3 "Intel 9 Series PCIE" rev 0xe3: msi pci3 at ppb2 bus 2 "Broadcom BCM15700A2" rev 0x00 at pci3 dev 0 function 0 not configured ppb3 at pci0 dev 28 function 4 "Intel 9 Series PCIE" rev 0xe3: msi pci4 at ppb3 bus 3 nvme0 at pci4 dev 0 function 0 "Apple NVMe" rev 0x01: msi, NVMe 1.0 nvme0: APPLE SSD AP0256H, firmware 5.844.01, serial C025346005CFV5LAN scsibus1 at nvme0: 2 targets, initiator 0 sd0 at scsibus1 targ 1 lun 0: <NVMe, APPLE SSD AP0256, 5.84> sd0: 239372MB, 4096 bytes/sector, 61279344 sectors pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03 ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 18 iic0 at ichiic0 pchtemp0 at pci0 dev 31 function 6 "Intel 9 Series Thermal" rev 0x03 isa0 at pcib0 isadma0 at isa0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vmm0 at mainbus0: VMX/EPT efifb at mainbus0 not configured bwfm0: restrict all mbufs to low memory vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> sd1: 239111MB, 4096 bytes/sector, 61212649 sectors root on sd1a (bbf934100be78b8d.a) swap on sd1b dump on sd1b inteldrm0: 2304x1440, 32bpp wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) bwfm0: address a8:66:7f:1e:13:e3

