0

I have an issue with my MacBook Air M2 (2022) that results in kernel panics that I can't fix without your help. Few more facts that we should consider to be on the same page:

  1. In January 2023 I got caught by heavy rain with my brand new MacBook Air in Asia so as a result:

    • A small amount of liquid damaged the screen
    • A small amount of liquid got inside near an ESC button area and USB-C ports
  2. I talked with Apple Center but due to water damage there is no way for Apple to fix damaged parts only so they suggested replacing almost everything which means it costs about 95% of a brand-new laptop

    • I declined this solution because by the time the laptop runs successfully without any errors
    • The only thing that logically required a replacement at that time was a lid: screen because it had that common "dark areas" for water damage in there and a webcam that tried to start but apparently can't
    • Apple Diagnostic report: camera issue, with a code like NDC00x from Apple Diagnostics reference codes + one of the guys from Apple center said that there was an issue with a wrong frame rate
  3. 6 months later: The screen seems ok and doesn't bother me: it still reminds me that it was damaged but it works, all the "dark dots" have gone away, so screen health is about 95%

    • One day I had a few kernel panics that I managed to debug perfectly well - thanks to my developer background. I realized that it was a "time of the day specific issue" so I turned off screen dimming and night shift feature and it worked. The webcam doesn't work. It tries to turn it on but can't, only the green LED is working.
  4. A month ago:

    • Something new happened one day when I opened the lid. After that laptop tried to load but a purple screen occurred.
    • Sometimes I notice that if I run Apple Diagnostics from Recovery Mode and then try to boot into Safe Mode, it loads perfectly. Works for a few days but then something happens again. And if I repeat the previous scenario then it helps again
  5. A week ago I tried to debug the issue, and reproduced it a few times when I tried to use a webcam but for now the scenario from above doesn't work as before. So when I try to boot into OS/safe mode - it ends in a purple screen and then reboots.

    • I tried to install Ventura, Sonoma, and Monterey, but it doesn't help
    • I tried to clear some caches from the recovery OS, and turn Panic Medic on - it helped a month ago but not today
  6. God bless Asahi Linux - It runs perfectly well. I mean that despite some driver issues that is a question of time - the laptop is working and nothing crashes.

    • It is usable for me so if nothing works to fix booting into macOS - I'll use it

Things I'm trying to mix up together and find a solution:

  • I think that if Asahi Linux doesn't crash then it is probably "not a real hardware issue". I mean if there were something critical for boot and it was failing to start then Asahi Linux won't boot too
  • Something fails in the last stage of booting to macOS: sometimes I can close the lid during boot with a progress bar and open it a bit later - I see a login screen for a second and then it turns into a purple screen
  • Something in the macOS is trying to access the camera or some sensors right before showing the login screen
  • If I manage to disable this behaviour then macOS will boot successfully
  • I don't think that the camera is crucial for macOS to boot or that it requires a complete hardware setup to boot
  • I have a few panic reports, and most of them have a message like AOP panic - no pulse . some of these log files have a backtrace with processes and threads, but every time it reports that panicked thread was something like this RTBuddyCrashReportEndpoint(AOP)

Questions for the community:

  • Is there a way to configure macOS to ignore some hardware? (tried to remove some kexts but macOS restores them after reboot). I want to disable the Apple camera, for example
  • Are there ways or tools to test potential issues with hardware on Linux?
  • Is there something I should try to debug or do that I missed?
  • Is there a config file in the system that can be related to cameras or sensors?
agarza
  • 2,274
yTko
  • 3
  • 2
  • There's almost certainly some sort of hardware failure as a result of the water damage. It's curious that it doesn't manifest in Asahi, but that's most likely due to limitations in Asahi's control of the hardware -- which may improve in new versions. Water damage usually shortens the life of hardware. Chances are that failures will increase over time. – benwiggy Nov 03 '23 at 14:18
  • Yep, I think the same way about Asahi and what will happen in the future yet I think that is a bit stupid to fail at boot just because light sensor damaged for example. So probably my kernel panic will be fixed in a future macos updates but I just want to try fix it manually by disabling some os features (via kext removing for example) or deregistering hardware @benwiggy – yTko Nov 03 '23 at 22:50
  • It is unlikely that a future macOS will fix your problem. I meant that future versions of Asahi may have better drivers, which ironically will cause panics on your broken Mac. – benwiggy Nov 04 '23 at 09:33
  • You have a hardware issue and your board needs to be serviced. – Allan Nov 05 '23 at 08:05
  • @Allan i've mentioned it at the start - due to useless of service this question is not about what should I do with water damage. It's about finding pure software solution and macOS configuring – yTko Nov 05 '23 at 14:10
  • There are companies that specialize in board level repair that’s significantly less expensive than replacement. There is no software that addresses physical damage and will fix your machine – Allan Nov 05 '23 at 15:13
  • @Allan I got your point on the solution and the price of it but I still can't understand why do you think that your point is enough to close the topic and mark it as a duplicate Moreover, marcan answered that one of the possible solutions is to rebuild kernelcache

    So it is probably better to let the community decide instead of believing in your own opinion only, right?

    – yTko Nov 05 '23 at 16:36

1 Answers1

1

AOP is unused in Asahi so far, that's why it doesn't matter. And AOP is in charge of the ambient light sensor, which is right next to the camera, which is almost certainly damaged. So everything makes perfect sense there. macOS in general does not have any settings for this kind of stuff, hidden or otherwise, and Apple writes their drivers to panic the whole system if anything "impossible" happens. So there isn't much you can do, at least nothing easy, other than getting the camera/light sensor board replaced (which is probably what got damaged).

In principle you could build a custom kernelcache for macOS with certain kexts removed. For that you need the KDK and kmutil. But you'll have to keep doing that for every update and it's likely to completely break the update process at some point if your hardware is in trouble, since you can't change the kernel that gets used for updates and recoveryOS. So really, none of this is a particularly sensible solution to the hardware issues.

In the future we will likely support AOP, although our MO isn't to panic the whole system when individual coprocessors fail like that, so it probably won't make anything worse.

marcan
  • 729
  • Thanks @marcan for your reply as a maintainer of Asahi - it can't be better :)

    Last question, probably out of topic a bit: i noticed that the purple screen has gone but it still can't boot into macOS. I installed Sonoma 14.1 manually from Recovery OS, it rebooted once installer finished his work but then it goes to a loop. I tried to find any DiagnosticReport and I can't - last one is about 4 days ago. It seems like macOS even can't boot to a stage when it is ready to log something.

    Is my guess correct? Can it be related to any issue with partition table? Next step is DFU? :)

    – yTko Nov 05 '23 at 13:38
  • Yeah, I think if you have hardware issues it's entirely possible it panics before it can even log diagnostics. I think there's some mechanism for logging kernel panics and picking them up on the next boot, but you need to actually be able to boot to macOS for that. DFU is likely to end up in the same problem if this is all root caused by the hardware issue. You'll need to get the hardware fixed, most likely. – marcan Nov 06 '23 at 14:08
  • Installed macOS to another partition and it logs.. it is same panic as before but it is exist at least. Also noted that there is panic string with rtkit task list. It faults on power rtkit task but there is also voicetrigger task which is also AOP related thing. So probably if there is way to disable everything in macOS that depends on AOP - it will boot, haha @marcan – yTko Nov 06 '23 at 16:43