Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
misc:acpi_patch [2025/06/28 22:17] – tweaks 92.40.32.213misc:acpi_patch [2025/12/13 12:10] (current) rqm
Line 1: Line 1:
 ====== The Dreaded ACPI Timeout Bug ====== ====== The Dreaded ACPI Timeout Bug ======
 +
 +----
 +===== ⚠️ IMPORTANT =====
 +
 +As of  Sun Nov 23 19:56:24 2025 this bug has been [[https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/acpi/dsdt.c?ipk=o-qnntKcxllUqcGWG9W-C-riLyb0POvhyp3hLhnaFy4|fixed in OpenBSD 7.8-current]], and so it will be fixed in the OpenBSD 7.9-stable release.  
 +
 +Therefore **THE LAST OpenBSD 7.8-stable build [[https://mirror.openbsdonapple.wiki/pub/OpenBSD/7.8/amd64/|provided on our mirror]] with the below ACPI patch will be the one built on 2025-12-07,** incorporating OpenBSD 7.8 errata patches no. 001-011.
 +
 +**USERS AFFECTED BY THIS ARE ADVISED TO UPGRADE TO 7.8-current by grabbing a [[https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/|snapshot installer]] or running** `sysupgrade -s`, and when it is released in 2026, upgrade to OpenBSD 7.9.
 +----
 +
 +===== The ACPI bug =====
  
 Some models can experience really, really long boot times with OpenBSD. This bug has been known for a while and seems to have appeared around OpenBSD 7.6. It has [[https://bsd.network/@brynet/114322673716285788|featured]] [[https://old.reddit.com/r/openbsd/comments/1ixz0bn/macbook_2015/|in]] [[https://marc.info/?l=openbsd-bugs&m=173855804823166&w=2|a lot of]] [[https://marc.info/?l=openbsd-misc&m=174438934730598&w=2|discussions]], and resolving it caused so much unbridled joy that it prompted the creation of this entire wiki. Some models can experience really, really long boot times with OpenBSD. This bug has been known for a while and seems to have appeared around OpenBSD 7.6. It has [[https://bsd.network/@brynet/114322673716285788|featured]] [[https://old.reddit.com/r/openbsd/comments/1ixz0bn/macbook_2015/|in]] [[https://marc.info/?l=openbsd-bugs&m=173855804823166&w=2|a lot of]] [[https://marc.info/?l=openbsd-misc&m=174438934730598&w=2|discussions]], and resolving it caused so much unbridled joy that it prompted the creation of this entire wiki.
 +
  
 ===== The Symptoms ===== ===== The Symptoms =====
Line 14: Line 27:
 ===== Affected Models ===== ===== Affected Models =====
   * [[:A1502]] Early 2015 Macbook Pro   * [[:A1502]] Early 2015 Macbook Pro
-  * Maybe others?+  * [[:A1466]] Macbook Air ([[https://marc.info/?l=openbsd-misc&m=176103403030425&w=2|reported on misc@)]] 
 +  * [[:A1465]] Early 2015 Macbook Air ([[https://marc.info/?l=openbsd-misc&m=176115553125606&w=2|reported on misc@]]) 
 + 
 +==== Lazy way to fix the ACPI bug ==== 
 + 
 +We've prepared a custom image that contains the ACPI patch. If you trust us enough (hint: you shouldn't) then you may grab the installer and sets here: 
 + 
 +https://mirror.openbsdonapple.wiki/pub/OpenBSD/7.8/amd64/
  
 ==== Patch to fix the ACPI bug ==== ==== Patch to fix the ACPI bug ====
  
-<code> +**Download links:** 
-Index: sys/dev/acpi/acpi.+  * For OpenBSD 7.7 {{ :misc:macbook-acpi-patch-77.tar.gz |macbook-acpi-patch-77.tar.gz}} 
-=================================================================== +  * For OpenBSD 7.8 {{ :misc:macbook-acpi-patch-78.tar.gz |macbook-acpi-patch-78.tar.gz}}
-RCS file/cvs/src/sys/dev/acpi/acpi.c,v +
-diff --p -u -r1.444 acpi.+
---- sys/dev/acpi/acpi.c 24 Mar 2025 09:53:20 -0000 1.444 +
-+++ sys/dev/acpi/acpi.c 20 Apr 2025 19:45:13 -0000 +
-@@ -823,8 +823,8 @@ acpi_pci_set_powerstate(pci_chipset_tag_ +
-  } +
- #endif /* NACPIPWRRES > 0 */ +
-  +
-- if (state == ACPI_STATE_D0 && pre) +
-- aml_evalname(sc, pdev->node, "_PS0", 0, NULL, NULL); +
-+// if (state == ACPI_STATE_D0 && pre) +
-+// aml_evalname(sc, pdev->node, "_PS0", 0, NULL, NULL); +
- } +
-  +
- int +
-</code>+
  
 ==== How to patch ==== ==== How to patch ====
Line 159: Line 163:
  
 Now we have: Now we have:
-The latest update files stored away safely +  * The latest update files stored away safely  
-The latest kernel, compiled with our own patch+  The latest kernel, compiled with our own patch
  
 So it is time to move on to the installation. So it is time to move on to the installation.
Line 177: Line 181:
 # cp /usr/obj/sys/arch/amd64/compile/GENERIC.MP/bsd.gdb /nbsd && mv /nbsd /bsd # cp /usr/obj/sys/arch/amd64/compile/GENERIC.MP/bsd.gdb /nbsd && mv /nbsd /bsd
 # cp bsd.rd / # cp bsd.rd /
-# cp bsd /bsd.sp # You might not even have this file, relatively safe to skip this last one+# cp bsd /bsd.sp # You might not even have this file, relatively safe to skip this last one if you do not intend to run in single-processor mode
 </code> </code>