Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| misc:acpi_patch [2025/04/25 23:13] – rqm | misc:acpi_patch [2025/10/29 22:26] (current) – h3artbl33d | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| Booting the stock installer or kernel will cause the boot procedure to hang quite early on, usually after identifying the hard disks: | Booting the stock installer or kernel will cause the boot procedure to hang quite early on, usually after identifying the hard disks: | ||
| - | INSERT PHOTO | + | {{ : |
| As @brynet@bsd.network pointed out, it is caused by "some kind of regression that triggers a weird ACPI firmware bug on this machine." | As @brynet@bsd.network pointed out, it is caused by "some kind of regression that triggers a weird ACPI firmware bug on this machine." | ||
| Line 14: | Line 14: | ||
| ===== Affected Models ===== | ===== Affected Models ===== | ||
| * [[:A1502]] Early 2015 Macbook Pro | * [[:A1502]] Early 2015 Macbook Pro | ||
| - | * Maybe others? | + | * [[:A1466]] Macbook Air ([[https:// |
| + | * [[:A1465]] Early 2015 Macbook Air ([[https:// | ||
| + | |||
| + | ==== 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' | ||
| + | |||
| + | https:// | ||
| ==== Patch to fix the ACPI bug ==== | ==== Patch to fix the ACPI bug ==== | ||
| - | < | + | **Download links:** |
| - | Index: sys/ | + | * For OpenBSD 7.7 {{ :misc: |
| - | =================================================================== | + | * For OpenBSD 7.8 {{ :misc:macbook-acpi-patch-78.tar.gz |macbook-acpi-patch-78.tar.gz}} |
| - | RCS file: / | + | |
| - | diff -u -p -u -r1.444 acpi.c | + | |
| - | --- sys/ | + | |
| - | +++ sys/ | + | |
| - | @@ -823,8 +823,8 @@ acpi_pci_set_powerstate(pci_chipset_tag_ | + | |
| - | } | + | |
| - | # | + | |
| - | + | ||
| - | - if (state == ACPI_STATE_D0 && pre) | + | |
| - | - aml_evalname(sc, | + | |
| - | +// if (state == ACPI_STATE_D0 && pre) | + | |
| - | +// | + | |
| - | } | + | |
| - | + | ||
| - | int | + | |
| - | </ | + | |
| ==== How to patch ==== | ==== How to patch ==== | ||
| Line 48: | Line 39: | ||
| * If going the " | * If going the " | ||
| - | === The Slow Boot Way === | + | === I. The Slow Boot Way === |
| Waiting out the slow boot times is probably a little bit easier, and it doesn' | Waiting out the slow boot times is probably a little bit easier, and it doesn' | ||
| Line 89: | Line 80: | ||
| == 4. Compiling == | == 4. Compiling == | ||
| + | Follow the '' | ||
| + | As root, first, change directories to the appropriate directory in ''/ | ||
| + | < | ||
| + | $ doas -s | ||
| + | # cd / | ||
| + | </ | ||
| + | |||
| + | Then proceed as the manual suggests, with root privileges - otherwise "make install" | ||
| + | < | ||
| + | # make obj | ||
| + | # make config | ||
| + | # make && make install | ||
| + | </ | ||
| + | |||
| + | After you reboot, the new kernel should be the one in use. It will be easy to tell whether the patch worked, because if your system boots " | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ===== Updating the patched system ===== | ||
| + | If you want to avoid having to wait 2+ hours again TWICE everytime you have to update your system, there is, fortunately, | ||
| + | |||
| + | The below will be a walkthrough that follows '' | ||
| + | |||
| + | ==== 0. Preparation ==== | ||
| + | === 0.a. READ UP. Seriously. === | ||
| + | Read through the [[https:// | ||
| + | |||
| + | === 0.b. Preparation === | ||
| + | Follow the " | ||
| + | |||
| + | ==== 1. Get the upgrade files ==== | ||
| + | Fetch the updates and move them to a new location. When you run '' | ||
| + | < | ||
| + | # sysupgrade -ns | ||
| + | # mkdir /usr/update | ||
| + | # mv / | ||
| + | # rm / | ||
| + | </ | ||
| + | **NB**: On '' | ||
| + | |||
| + | ==== 2. Update the source tree ==== | ||
| + | Follow the **Anonymous CVS** guides for updating the source tree to the latest version. | ||
| + | ☛ **ASIDE** - What to do if acpi.c changes drastically and the patch doesn' | ||
| + | < | ||
| + | $ cd / | ||
| + | $ cvs update -C acpi.c | ||
| + | </ | ||
| + | CVS will tell you where it stashed the previous file, it usually starts with " | ||
| + | |||
| + | To update the source tree on '' | ||
| + | < | ||
| + | $ cd /usr/src | ||
| + | $ cvs -q up -Pd -A | ||
| + | </ | ||
| + | **NB**: On '' | ||
| + | |||
| + | ==== 3. Re-compile the GENERIC.MP Kernel ==== | ||
| + | See above, but run ''# | ||
| + | < | ||
| + | # cd / | ||
| + | # make clean | ||
| + | # make obj | ||
| + | # make config | ||
| + | # make | ||
| + | </ | ||
| + | Your newly compiled kernel file, '' | ||
| + | |||
| + | Now we have: | ||
| + | * The latest update files stored away safely | ||
| + | * The latest kernel, compiled with our own patch | ||
| + | |||
| + | So it is time to move on to the installation. | ||
| + | |||
| + | ==== 4. Manual installation ==== | ||
| + | This follows closely the official [[https:// | ||
| + | |||
| + | === 4.a. Make sure you have done all the preparation in the official guide === | ||
| + | Did you? | ||
| + | |||
| + | === 4.b Install the newly compiled kernel === | ||
| + | We did not run '' | ||
| + | < | ||
| + | # cd /usr/update | ||
| + | # ln -f /bsd /obsd | ||
| + | # cp / | ||
| + | # cp bsd.rd / | ||
| + | # 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 | ||
| + | </ | ||
| + | |||
| + | === 4.c follow the rest of the Manual Install Process === | ||
| + | Follow closely the linked manual installation guide, and continue the process: Enable KARL; Install new userland. Reboot. Run MAKEDEV, | ||
| + | |||
| + | DONE! | ||
| + | |||