acidanthera / bugtracker

Acidanthera Bugtracker
383 stars 44 forks source link

"HD3000: IGPU memory corruption errata" in config.plist is useless (solution inside) #2315

Closed ubihazard closed 1 year ago

ubihazard commented 1 year ago

OpenCore config.plist ships with the following section in UEFI\ReservedMemory:

      <dict>
        <key>Address</key>
        <integer>268435456</integer>
        <key>Comment</key>
        <string>HD3000: IGPU memory corruption errata</string>
        <key>Enabled</key>
        <false/>
        <key>Size</key>
        <integer>268435456</integer>
        <key>Type</key>
        <string>Reserved</string>
      </dict>

There is no documentation on this part and even the official guide explicitly states that:

Use of this quirk is not covered in this guide

I have no idea where this "fix" comes from (does it apply only to real Macs?) and what is technical explanation behind it, but I'm fairly certain it's just an instance of placebo effect.

The reason behind HD 3000 graphical artifacts is an EC (embedded controller) corruption caused by incompatible writes to it, – "incompatible" in a sense that macOS doesn't like them. This can be caused by: booting another OS (and it writes to EC to control the CPU fan, for example) or using fan reset EFI patches to adjust the fan curve.

I discovered it accidentally while working on my ProBook 4530s. It has been known in the past that performing an EC reset helps to eliminate HD 3000 graphical glitches for some time. But nobody seemed to figure out what causes them to return eventually. Here is someone suggesting that booting another OS caused glitches to return. After performing an EC reset and getting rid of Linux live USB, I was surprised to find out that graphical artifacts were indeed gone. Some time later I compiled OpenCore with additional EFI drivers because I needed one to get my Wi-Fi card to work, and another one, HP fan reset, was basically a part of it until I separated both modules in two (BIOS fan reset and Wi-Fi whitelist hack). This is what helped to isolate the issue: the BIOS fan reset module writes to EC and of course it didn't take long for graphical artifacts to return. At this point, being confident already that writes to EC is the cause, I disabled the fan reset EFI patch in my config.plist, performed an EC reset again, and boom – glitches were gone.

It's been a couple of weeks already and I thoroughly tested the system. I have ran Unigine Heaven benchmark several times and even installed ioquake to test it during actual gameplay. YouTube HD videos, macOS UI – all show no sign of graphical artifacts.

TL;DR: Intel HD 3000 graphical issues are caused by writes to EC outside of macOS that leave it in a bad state (for macOS) and the solution is to eliminate all such writes and perform an EC reset. The "HD3000: IGPU memory corruption errata" UEFI quirk should be removed from OpenCore config.plist distribution, – unless somebody can explain what it actually does and how it is still needed.

ubihazard commented 1 year ago

Opened a separate issue with Dortania guide.