Fix shutdown issue

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Answers to your questions:
  1. Which of the Ports are associated with the 4 x Physical USB2 ports on the rear I/O plate?
    I've put the USB 2.0 stick in all the 4 physical USB2 ports and in all 4 scenarios it will be visible for port 16 (the one i've set as internal since it seems an USB2.0 hub)

  1. The ITE hub how is that identified, i.e which physical port are you connecting a USB Device to when it is discovered?
    ITE Device (8595) is visible from the start, even when I don't connect any USB device. I have the feeling it is the RGB controller which I don't use at all.

    As a test I disabled it in a testing USBMap.kext (without further configuration) and all the usb ports working just fine (tested after a reboot with this test kext ofcourse), so I think I can disable it.
 
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
Then change the Port 16 to USB2 (0), it is not an internal port, but rather a USB2 hub that serves 4 x physical ports.

Yes, you can probably disable the ITE device.
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Then change the Port 16 to USB2 (0), it is not an internal port, but rather a USB2 hub that serves 4 x physical ports.

Yes, you can probably disable the ITE device.
Do I need to change both USB 2.0 hub ports (port 6 and port 16) to port type 0 (so also the one which has a bluetooth device connected according to the mapping tool) ?
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
No idea, as it is not really clear which port is being identified in the USBMap screenshot.

I have attached screenshots of your Motherboard layout and the Rear I/O plate, with each USB port or header given a clear identifier. Can you use these identifiers and annotate which port is being identified when you insert a USB Device.

Also can us use a USB2 pen drive, rather than the read/write flash drive you are currently using. Just humour me.

Screenshot 2022-02-11 at 19.35.20.png Motherboard layout with Headers identified

Screenshot 2022-02-11 at 19.35.43.png Rear I/O plate with ports identified

Blank screenshots for you to use when annotating the ports as they are identified. It is very easy to add text to these images using Preview app.

Screenshot 2022-02-11 at 19.51.24.png Screenshot 2022-02-11 at 19.51.45.png
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Here an overview of the ports


Screenshot 2022-02-11 at 19.51.45.png

Screenshot 2022-02-11 at 19.51.24.png


New created mapping:

The Devices I used to identify the ports are:
  • USB 3.0 USB stick (name = Ultra)
  • USB 2.0 USB stick (name = Disk)
  • USB-C cable connected Samsung Portable SSD T5 (name = Portable SSD T5)
  • USB-C cable connected phone (name = Mi 9T Pro)
Screenshot 2022-02-12 at 17.28.54.png
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
Port 6 needs to be changed to 255 (internal), as the two front case USB2 ports and Bluetooth module are served by the two internal header ports.

Other than that one change the rest looks really good(y)
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Thanks, I just changed it. Unfortunately, I still facing a restart after shutting down the system.

This is the port configuration I currently have:
Screenshot 2022-02-13 at 07.37.34.png


After adding the kext to my OC folder and config.plist file and doing a reboot, I see this when I open Hackintool and clear+refresh the list:
Screenshot 2022-02-13 at 10.54.14.png

At this stage I only have connected an usb mouse and usb keyboard to one of the USB2 hubs.


From what I found in the readme file at: https://github.com/corpnewt/USBMap is this:
- Can map USB 2 HUBs (requires the HUB's parent port uses type 255)

Does this mean I need to set both hubs to port type 255? Instead of one the current situation where i've set 0 for one of the usb2 hubs

Another strange thing I see is that the names of the ports are changed from prtxx to HSxx and SSxx. Is this normal using this mapping tool?


PS. I also uploaded the kext file.
 

Attachments

  • USBMap.kext.zip
    1.4 KB · Views: 3
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
No, do not set both as Internal (255). Only HS06 on the XHC1 controller needs to be set as internal. The other should be set as type USB2 (0).

Yes the port name changes are normal.

That USB configuration looks good to me. I would stick with it and not change anything.

What that means is you have a companion issue that is causing the shutdown problem, which is as yet unknown.

Can you post a copy of your IOReg, so I can see what is being activated in your system. Use the copy of IORegistryExplorer attached below. Do not use a newer version as they tend to corrupt the IOReg file.

Installation
1, Open Downloads/IORegistryExplorer-SLRID_v10.6.3
2. Drag IORegistryExplorer to Applications Folder

How to Make a Copy of IOReg (Note 1)
1. IORegistryExplorer/File/Save a Copy As…. (no extension required)
2. Open file to verify (Note 2)
3. Attach to post (Note 3)

Notes
1. An IOReg.txt is not useful. It is not a "Copy of IOReg." Do not attach .txt files.
2. IOReg must open the file. If TextEdit opens, See Note 1.
2. If the web site will not accept the file, compress it (Finder/Compress ... )
 

Attachments

  • IORegistryExplorer-SLRID_v10.6.3.zip
    254.5 KB · Views: 3

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
In the meanwhile (before you answered) I already tried something else.

I found another XHC.aml version for an almost similar motherboard (https://forum.amd-osx.com/index.php...nterey-beta-opencore-0-7-4-efi.1344/post-6972) which has different names for all the 3 XHC controllers. I thought maybe that could help but unfortunately it had no effect on the shutdown issue.

The current situation on my machine (I recreated the mapping to ensure it is still correct). I hope it does not matter, otherwise I will revert back to the situation in my previous post.

This is the current situation:
Screenshot 2022-02-13 at 19.17.00.png

Screenshot 2022-02-13 at 19.20.04.png


Outcome is the same, only difference is that none of the controllers have the same name.

PS. I attached the export you requested (filename: MacPro.zip).
I also added the current USBMap and XHC.aml in case it is relevant.
 

Attachments

  • USBMap.kext.zip
    2.2 KB · Views: 1
  • SSDT-XHC.aml.zip
    1 KB · Views: 0
  • MacPro.zip
    905 KB · Views: 2

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Ah before I forget (maybe it is relevant), there is a known hardware issue with the motherboard I have (Gigabyte Aorus Ultra x570) that the internal WIFI/bluetooth disappears and is not accessible when you enable ERP in the BIOS (also in Windows and other operating systems).
More info about this:
www.reddit.com/r/gigabyte/comments/cz5n2s/x570_aorus_ultra_and_x570_aorus_pro_wifi_enabling/

Because of this issue and the fact that the Intel AX200 WIFI chip was very unstable with itlwm.kext, I decided to buy a separate wifi/bluetooth module that works out of the box in MacOS (Fenvi BCM94360NG). This one is connected using a PCI adapter. Probably you will see this device in the export I uploaded in my previous post.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
As far as the USB port mapping is concerned it all looks good to me. Everything is matching up and shown in the IOReg you provided, in line with the settings above. I think it is the finished article.

WiFi/BT cards:

Have you physically removed the Intel WiFi/BT card and replaced it with the Broadcom card? As the Broadcom WiFi/BT card is the only one that shows in your IOReg

Screenshot 2022-02-13 at 20.46.17.png Broadcom WiFi controller

Screenshot 2022-02-13 at 20.46.51.png Broadcom BT controller/USB connection
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
Can you post a copy of your System DSDT.aml so I can check something regarding your EC controller and USB power settings.

You can use Hackintool > Utilities > Dump ACPI tool to download (Dump) your ACPI tables to a folder on your Desktop. The DSDT will be among the ACPI tables. Just compress the folder you create (as the place to save the tables) when going through the Hackintool wizard.
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
No, the internal Intel WIFI/BT card is still in place. It is just not accessible at all when ERP is turned on in BIOS (the same is true in Windows).
I turned on ERP because otherwise my keyboard backlight will flicker all the time when the PC is shutdown.

I attached the ACPI dump.
 

Attachments

  • ACPI_Dump.zip
    168.4 KB · Views: 2

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
Can you remove the Intel Card?

If it is disabled and you are not using it, all it will do is cause conflicts in macOS.

I will look at the ACPI dump tomorrow.
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
I took me a few hours but I succeeded. The Intel WIFI/bluetooth card is removed.

Evidence ;):

Before:1644959253891.jpg

After:
1644959297456.jpg


The bad news is, it didn't solve the shutdown issue.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
I used your DSDT.aml and corpnewt's SSDTTime python script to create this SSDT-EC.aml for your system.

It should be added to your /OC/ACPI folder and a corresponding entry added to your config.plist.

If I recall correctly the list of SSDT's you provided previously didn't include an SSDT-EC.aml.
 

Attachments

  • SSDT-EC.aml.zip
    313 bytes · Views: 7

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
@Edhawk thanks again for all the time you take to help me. Really appreciate it.

I tried the SSDT-EC.aml you provided but unfortunately it does not fix the issue. The machine still restarts after a shutdown.

I tried two configurations:

Configuration 1:

Config file:
Screenshot 2022-02-17 at 15.31.08.png

Corresponding files:
Screenshot 2022-02-17 at 15.30.39.png


Configuration 2:


Config file:
Screenshot 2022-02-17 at 16.59.31.png

Corresponding files:
Screenshot 2022-02-17 at 19.27.40.png

The SSDT-XHC.aml is for both configurations the same since I am sure this one is correct. The other aml files I am not sure of so therefore I've tested both scenarios.


The aml files in the first configuration I got from AudioGod: https://forum.amd-osx.com/index.php...ig-sur-monterey-beta-opencore-0-7-4-efi.1344/

The aml file in the second configuration (SSDT-EC-USBX-DESKTOP.aml) I found in the OpenCore documentation: https://dortania.github.io/Getting-Started-With-ACPI/ssdt-platform.html

The result is the same for both configurations.

Any other idea or suggestion I could try myself?

PS. I don't want to disable ERP in bios because like I said my keyboard backlight will flicker in that case when my PC is shutdown.
For Windows it all works fine so I would assume there must be a solution to fix this for MacOS.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,348
I'm not sure what else to suggest, if I am honest.
 

stefancosd

New member
AMD OS X Member
Joined
Dec 19, 2021
Messages
26
Never mind. I will continue search for a solution.
Thanks for all your help. At least I now understand how to properly map USB ports myself.
 
Back
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.