Ryzen 3500x |msi b450m mortar max|oc0.57|catalina 10.15.4

wodeyaocai1

New member
May 4, 2020
8
9
3
---------------------------------------
Model: iMacPro1,1

CPU: 6-Core Ryzen 3500x, 3.6 GHz

Graphics: SAPPHIRE Radeon RX 560, 4 GB

Memory Module: P0 CHANNEL A/DIMM 1, 8 GB, DDR4, 2667 MHz, Samsung

Memory Module: P0 CHANNEL B/DIMM 1, 8 GB, DDR4, 2667 MHz, Samsung

PCI Card: BCM4360 802.11ac Wireless Network Adapter

Serial ATA Device: OCZ-ARC100, 120.03 GB

Serial ATA Device: SAMSUNG SSD 830 Series, 128.04 GB

Serial ATA Device: APPLE HDD HTS541010A9E662, 1 TB

MOUSE: APPLE MM2 / LOGITECH M186

USB Device: Lenovo Low Profile USB Keyboard

USB Device: USB Receiver

USB Device: Sirius USB2.0 Camera

USB Device: BRCM20702 Hub
---------------------------------------------
Kexts:
AppleALC, Lilu, VirtualSMC, WhateverGreen, AppleMCEReporterDisabler, SMCAMDProcessor, AMD-USB-MAP,BT4LEContinuityFixup,realtekrtl8111,VoodooHDA,AirportBrcmFixup

Drivers:
ApfsDriverLoader, VBoxHfs, OpenCanopy, OpenRuntime

ACPI:
SSDT-EC-USBX-AMD.aml
---------------------------------------------
Working
WIFI, BLUETOOTH, AIRDROP, HANDOFF, CONTINUITY, FACETIME(with voodoohda audio), IMESSAGE,

SLEEP works with conditions:
1,usb mouse attached to ports on PTXH usb controller and setup automatically logout ->sytem preferences->security&privacy->firewall->advanced
2, apple mm2 mouse setup automatically logout and uncheck "allow buluetooth devices to wake this computer" ->bluetooth preferences->advanced

Not working
microphone
wake with black screen until you tap keyboard or mouse, it means one tap wake , and the second tap light the screen.(fixed with arg "darkwake=0" to config.plist)
won't wake when attach mouse usb receiver on XHC0 controller usb ports.(fixed)
it seems that usb mapping and change XHC0 to XHCI makes no effects on sleep.
---------------------------------------------
appreciation for helping to remedy sleep and/or wake-black-screen.
__________________________________________________________________________________
update:

1590251110988.png
sleeps works with XHC0 :
match attributes under iopowermanagement of XHC0 with the ones of PTXH, use amd usb map.kext.
for my build match the first three or the total six both works. see the image above.
 

Attachments

Last edited:
  • Like
Reactions: philipstonybi

JontySR

New member
May 9, 2020
1
0
1
I'm having exactly the same issue on the same mobo, even with the USBs correctly mapped. It's so frustrating that I can't use those XHC ports!
 

wodeyaocai1

New member
May 4, 2020
8
9
3
For the wake-black-screen try https://github.com/acidanthera/HibernationFixup with boot arg -hbfx-disable-patch-pci
I could improve sleep by just disabling the problematic XHC0 controller for good in the BIOS (AMD PBS -> FCH Common Options -> XCHI Controller 0 to disabled)
thank you very much for your suggestions.
i have tried many times of hibernationfixup with no success. i even tried conbinations of hibernationfixup with usbmaping\change hdmi cable to dp cable\clean reinstall. no way effects.
on my mobo, there's no options to disable xchi controller. and also i still want to keep the possibility to use these ports.

i would do more quest.

it seems that the wake of the first tap of keyboard or mouse is a fake one, when i don't tap the second time, my build takes only 1 minute or so to sleep again.
 

Aluveitie

Active member
May 2, 2020
217
49
28
Sometimes when I got black screen on wake up a press to the power button worked.
 

jon555

New member
May 2, 2020
1
0
1
Can you explain it a little more broadly, I am Spanish and I hardly understand it.
The only thing that fails me is sleep with usb, it restarts.
 

wodeyaocai1

New member
May 4, 2020
8
9
3
Can you explain it a little more broadly, I am Spanish and I hardly understand it.
The only thing that fails me is sleep with usb, it restarts.
I DONT KNOW WHETHER THE FOLLOWING STATEMENT HELPS , JUST TAKE IT AS A REFERENCE:

How does my sleep work

With fresh installation, my build ’s sleep behaves like this:

1、click apple icon->sleep, sleep works with immediate wake-up;

2、keep energy saver as default, sleeps works automatically with immediate wake-up;

the above two issues can be fixed by uncheck “allow bluetooth devices to wake this computer”(system preferences->bluetooth->advanced).

If you use usb mouse/keboard, you won’t encounter these two issues. You may confront:

1、sleeps works well either by “click to sleep” or by “system automatic sleep”, but when you tap your IO device to wake up your computer, you have to tap at least twice(either mouse or keyboard). When you tap only once , it falls asleep in 1 or 2 minutes.

To fix this you can add “darkwake=0” to you config.plist(NVRAM->add->7c*****->bootargs)

All the above conditions based on no usb device connect to XHC0 usb controller.

------------------------
If there is usb devices connect to XHC0 usb controller, you computer may sleep but with issue:

1、screen turned off, system fan keeps spinning, system falls to panic(no wake up, only way is to push power button to restart)

To fix this issue, do the following steps:

1、check IOPowerManagement of XHC0, compare the differences of the attributes(CapabilityFlags and the other four) to PTXH;

2、if there are differences, match XHC0 to PTXH, by AMD-USB-MAP.kext.

****Software used: IORegistryExplorer, Xcode or Propertree,
****0x8000 is hex,so you have to alter it to 32756 in decimal
XHC0.jpg
 

Attachments

barrrrt

New member
May 19, 2020
29
5
3
Unplugging all USB devices is no option for me.

Because of the x570 Mainboards have always 3 Mantisse Controller (like the XHC...) I edited my usb kext like you said.
But I have the same error like before.
Screen goes black, after a while the fans spin and little later I get a kernel panic.

1590660817170.png

1590660839266.png

1590660855860.png

1590660874424.png

Update:
I reverted the changes back.

After checking the ioregistryexplorer I can see that the settings are standard for the EHC0 Controller:
(screen with a vanilla usb kext file).
1590661135102.png
Maybe choosing the new cheaper 500er chipsets would be a better choice for Hackintoshs? x570 and 3 XHC Controller seem very problematic :/
 
Last edited:

wodeyaocai1

New member
May 4, 2020
8
9
3
Unplugging all USB devices is no option for me.

Because of the x570 Mainboards have always 3 Mantisse Controller (like the XHC...) I edited my usb kext like you said.
But I have the same error like before.
Screen goes black, after a while the fans spin and little later I get a kernel panic.
....
Update:
I reverted the changes back.
....
After checking the ioregistryexplorer I can see that the settings are standard for the EHC0 Controller:
(screen with a vanilla usb kext file).
......
Maybe choosing the new cheaper 500er chipsets would be a better choice for Hackintoshs? x570 and 3 XHC Controller seem very problematic :/
something i did not explain clearly:
B450M MORTAR MAX HAS TWo usb hub, XHC0 and PTXH.
system panic happens when there are usb devices connected to ports under XHC0, the same usb devices connected to ports under PTXH do not cause system panic when sleep.
WHEN I CHECK IOPowerMangement, i found that the attributes numbers are not the same under XHC0 and PTXH, the six attributes under XHCO are 0x10000,2,2,0,0,3 while they are 0x8000,3,3,0,0,3 under PTXH. so i make the XHC0 the same with PTXH.

0x8000 suits for B450M MORTAR MAX, you have to find out the one for you motherboard.
-----------------------

MAY you can try connect a use device to one of your usb hub and check if sleep works, is it does ,then you can confirm the right attributes of your usb hub (xhc0,xhc,xhci) IOPowerMangement. if not try another usb hub.
 
  • Like
Reactions: Aluveitie

barrrrt

New member
May 19, 2020
29
5
3
I updated my last post and mentioned, that all my XHC controllers (all are Matisse Controller) have already the settings as DEFAULT.
I did not have to change anything.

When I am right, 2 Matisse controller are set from the CPU and 1 controller is the onboard controller. All are the same.
Only when no USB device is connected, sleep works yet.
 

Aluveitie

Active member
May 2, 2020
217
49
28
@barrrrt I believe the CPU has 1 controller and the X570 chipset two (as wodeyaocai1 has issues with the same Ryzen 3000 series XHC on the B450 beside the onboard PTXH).
 
  • Like
Reactions: barrrrt