PC hang after waking from sleep, cause known, but no solution

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
So after 2 years i finally have some time to fix sleep/wake on my x570 crosshair hero 8 wifi (problem: the case continues run after sleep)
method:
i disable all usb ports of the board, and only left 2 ports for mouse and keyboard
i got a very promising result at this point: PC went to sleep and wake smoothly

problem came in place when i started enabling my bluetooth internal usb port
problem:
PC went to sleep and wake smoothly in first round
second round sleep ok, but when i press keyboard to call it to wake up, motherboard code change to C6 and PC hangs

right now i dont know what to do next, i will attach my efi and praying for help
thanks for reading

--UPDATE VIDEO OF C6 code: https://forum.amd-osx.com/index.php...p-cause-known-but-no-solution.2653/post-17684
 

Attachments

  • EFI.zip
    10.3 MB · Views: 5
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Intel or Broadcom:
Have you removed the Intel WiFi/Bluetooth card that came pre-loaded in your motherboard?
Are you using a native Apple/Broadcom WiFi/Bluetooth card or the Intel card?

If you are using the Intel card that came with the motherboard, then you need to add a few kexts/injectors.

  • Itlwm.kext or Airportitlwm.kext (not both) for Intel WiFi
  • IntelBluetoothFirmware.kext
  • IntelBluetoothInjector.kext (not required if running MacOS Monterey)
  • BlueToolFixup.kext (from Acidanthera's BrcmPatchRam repository) - required if running MacOS Monterey
USBMap.kext:
Looking at the Info.plist in your USBMap.kext I find it hard to understand the comments you have added when describing which port you are activating.

This is a screenshot showing the rear I/O plate (backplate) from the ASUS ROG Crosshair VIII Hero (WiFi) motherboard.

Screenshot 2022-03-20 at 17.58.40.png Rear I/O plate on Asus Rog Crosshair 8 Hero WiFi board.

As you can see the USB ports are in 4 x rows. 2 x rows of 4 ports and 2 x rows of 2 ports.

Can you explain which ports are identified with the following 'comments'
iMacPro1,1-SHCI controller
  1. HS01 - backport top3 2nd - USB Type 3
  2. HS02 - backport top3 1st - USB Type 3
  3. HS03 - backport top4 2nd - USB Type 3
  4. HS04 - backport top4 usb-c - USB Type 3 - should be USB Type 10
  5. SS02 - backport top4 usb-c - USB Type 3 - should be USB Type 10
iMacPro1,1-XHC0 controller
  1. HS04 - native Mac bluetooth - USB Type 225 (Internal)
    • Which of the two motherboard USB2 header ports along the bottom of the board does this connect to?
    • Or is this from the Built-in WiFi/BT connector?
Here is an image of the Motherboard layout, with the USB header ports highlighted.

Screenshot 2022-03-20 at 18.12.00.png Motherboard layout with USB headers highlighted

iMacPro1,1-XHC2 controller
  1. HS01 - back port top1 2nd - USB Type 3
  2. HS02 - back port top1 1st - USB Type 3
  3. HS03 - backport top2 2nd - USB Type 3
  4. HS04 - backport top2 1st - USB Type 3
The only port I know the location of is the Type-C port on the rear I/O plate - it is in Row 4 port 1.

Can you clarify which port you mean with your descriptions.

Header Ports:
Do you have any Front Case ports connected to the motherboard? As there are these internal headers:
  • 2 x USB2 Internal Header ports and
  • 1 x USB Type-C header port available on the motherboard.
You could possibly have 2 x Type-C ports incorrectly identified, plus up to 4 x USB2 Internal Header ports (255) (even inf disabled) in your USBMap.kext.

USB Power:
Your system is lacking a USB power SSDT, as the only SSDT you are using is one fo the EC device. The USBMap.kext is also lacking any USB power Information so you should add a standalone SSDT-USBX.aml to your /EFI/OC/ACPI folder along with a corresponding entry in your config.plist for the SSDT.

I would also question whether the SSDT-EC.aml in your OC setup was looking in the correct place for the EC device. As your SSDT-EC.aml has entries for an EC0 and an EC device. You shouldn't need both if this is a custom SSDT created from your system DSDT.aml and Corpnewt's SSDTTime python script.
 

DarkSilentSC

Active member
AMD OS X Member
Joined
Jun 4, 2021
Messages
121
I would also suggest re-building USBMap by first creating and applying USBX-RHUB.aml to reset and regenerate all USB port list, just to eliminate some doubts. Then create a dummy USBMap.kext and start discovering ports and map out which ports are which. Make sure to add USB BT device as 255.
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
Intel or Broadcom:
Are you using a native Apple/Broadcom WiFi/Bluetooth card or the Intel card?
i Edhawk, my deeply thanks for your answer, here is more info about my system
i am using native macos bluetooth/wifi card: wifi/Bt: BCM94360CS2

Can you explain which ports are identified with the following 'comments'
sorry for my dumb naming pattern, but here's the idea :D
Screenshot 2022-03-20 at 17.58.40.png

Which of the two motherboard USB2 header ports along the bottom of the board does this connect to?
Screen Shot 2022-03-21 at 08.28.31.png
it connects to usb2 header 1 as i circle
Do you have any Front Case ports connected to the motherboard? As there are these internal headers:
yes, i am using nzxt h500 case, and i plug front case into this port

Screen Shot 2022-03-21 at 08.34.03.png

Your system is lacking a USB power SSDT, as the only SSDT you are using is one fo the EC device. The USBMap.kext is also lacking any USB power Information so you should add a standalone SSDT-USBX.aml to your /EFI/OC/ACPI folder along with a corresponding entry in your config.plist for the SSDT.
i thought that without this i cannot even make sleep work with only two ports of keyboard and mouse at the first place right?
the problem just came in when i enable the
- HS04 - native Mac bluetooth - USB Type 225 (Internal) port​
so should i concentrate into fixing that port?
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
I would also suggest re-building USBMap by first creating and applying USBX-RHUB.aml to reset and regenerate all USB port list, just to eliminate some doubts. Then create a dummy USBMap.kext and start discovering ports and map out which ports are which. Make sure to add USB BT device as 255.
i tried, but still same result
 

Attachments

  • IMG_0015.MOV.zip
    43.8 MB · Views: 7

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
i tried, but still same result
I noticed you are using a Broadcom chipset for WiFi & Bluetooth. In which case after your USB is fixed you'll need to use these Broadcom based kexts (only):

AirportBrcmFixup (for WiFi - Release version)

&

BrcmBluetoothInjector.kext
BrcmFirmwareData.kext
BrcmPatchRAM3.kext

from > https://github.com/acidanthera/BrcmPatchRAM/releases
(download Release version)

plus add quirk in Opencore:
enable ExtendBTFeatureFlags
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
I noticed you are using a Broadcom chipset for WiFi & Bluetooth. In which case after your USB is fixed you'll need to use these Broadcom based kexts (only):

AirportBrcmFixup (for WiFi - Release version)


&



from > https://github.com/acidanthera/BrcmPatchRAM/releases
(download Release version)

plus add quirk in Opencore:
good day sir, thanks for replying in,
i tried but still problem exists
1648904630112.png


1648904701507.png
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
good day sir, thanks for replying in,
i tried but still problem exists
View attachment 5549


View attachment 5550
I just noticed that you mentioned you used a macOS native Bluetooth card.
In that case you shouldn't need the BRCM drivers at all because macOS should detect it if is it true (technically speaking).
Try to disable it and see what comes up (disable Bluetooth drivers only in config.plist but keep AirportBRCM WiFi driver active).

Btw you should know the BRCM drivers from the link I sent you only support non-native BRCM cards. This is mentioned on the
site's main page.
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
I just noticed that you mentioned you used a macOS native Bluetooth card.
In that case you shouldn't need the BRCM drivers at all because macOS should detect it if is it true (technically speaking).
Try to disable it and see what comes up (disable Bluetooth drivers only in config.plist but keep AirportBRCM WiFi driver active).

Btw you should know the BRCM drivers from the link I sent you only support non-native BRCM cards. This is mentioned on the
site's main page.
sir i just tried but still no luck
same C6 code
1648999321003.png
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
sir i just tried but still no luck
same C6 code
View attachment 5570
In that case you may need to employ BlueToolFixup.kext as well as BrcmPatchRAM3.kext
both from the repository here > https://github.com/acidanthera/BrcmPatchRAM

As described by the Github:

'BlueToolFixup.kext
Required for macOS 12 or newer, as in macOS 12 Apple has changed parts of the Bluetooth stack from kernel-space to user-space as detailed in here and here. Requires Lilu 1.5.4+'

and

'Consequently to have the native BT driver load for the device (BroadcomBluetoothHostControllerUSBTransport) we inject using a plist with a slightly lower IOProbeScore than BrcmPatchRAM3 so it doesn't probe before the firmware upload.

The BrcmBluetoothInjector.kext is a codeless kernel extension which injects the BT hardware data using a plist; it does not contain a firmware uploader. You might also want to try this kext if you wish to see if your device will work without a firmware uploader.

Do not use BrcmPatchRAM or BrcmPatchRAM2 with this kext.'


There is a guide here on those who use both kexts using Broadcom cards and has shown it works
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
@Middleman
Good day sir, i just tried as you suggest:

1. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext

enable ExtendBTFeatureFlags
→ still C6 code (at 2nd round of sleep)

2. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext
BrcmBluetoothInjector.kext
enable ExtendBTFeatureFlags
→ System wakes right after sleep first round
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
@Middleman
Good day sir, i just tried as you suggest:

1. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext

enable ExtendBTFeatureFlags
→ still C6 code (at 2nd round of sleep)

2. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext
BrcmBluetoothInjector.kext
enable ExtendBTFeatureFlags
→ System wakes right after sleep first round
Okay in that case try disabling ExtendBTFeatureFlags and try rebooting.

And if that fails, try to install BrcmBluetoothFirmware.kext and test again.
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
And if that fails, try to install BrcmBluetoothFirmware.kext and test again.
hi did you mean one of these two?
BrcmFirmwareData.kext
BrcmFirmwareRepo.kext

i tried this method and got some different result (donno improvement or not haha)

1. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext
disabling ExtendBTFeatureFlags

i got AA code and a red light indicator (PC hangs not wake up)
after that i can not even boot pc up (hit power btn and pc instant shut down, had to clear BIOS to make it normal again)
1649390536277.jpeg
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
hi did you mean one of these two?
BrcmFirmwareData.kext
BrcmFirmwareRepo.kext

i tried this method and got some different result (donno improvement or not haha)

1. Add
BlueToolFixup.kext
BrcmPatchRAM3.kext
disabling ExtendBTFeatureFlags

i got AA code and a red light indicator (PC hangs not wake up)
after that i can not even boot pc up (hit power btn and pc instant shut down, had to clear BIOS to make it normal again)
View attachment 5611
Oh dear.

Well I've done some digging since you posted and from what I understand, Bluetoolfixup should NOT be used (because it is for non-native Broadcom chipsets).
As abenraj from the Acidanthera bugtracker thread says:

'BlueToolFixup was developed as a workaround to improve bluetooth compatibilities, solely, for non-native Broadcom chipsets when coupled with macOS 12. It's not designed to be used with genuine Apple Airport cards as these cards work as intended natively out-of-box and are not affected by the changes in macOS 12's bluetooth stack.'

So what you should have installed and enabled (for native) is:

BrcmFirmwareData.kext 2.6.1
BrcmPatchRAM3.kext 2.6.1

That's it. It should work. If it doesn't wait until the next macOS update.
 

tung_opeth

Member
AMD OS X Member
Joined
May 10, 2020
Messages
30
Oh dear.

Well I've done some digging since you posted and from what I understand, Bluetoolfixup should NOT be used (because it is for non-native Broadcom chipsets).
As abenraj from the Acidanthera bugtracker thread says:

'BlueToolFixup was developed as a workaround to improve bluetooth compatibilities, solely, for non-native Broadcom chipsets when coupled with macOS 12. It's not designed to be used with genuine Apple Airport cards as these cards work as intended natively out-of-box and are not affected by the changes in macOS 12's bluetooth stack.'

So what you should have installed and enabled (for native) is:

BrcmFirmwareData.kext 2.6.1
BrcmPatchRAM3.kext 2.6.1
hmmm, still c6 code haunting me lol
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.