Jump to content

How can I disable audio output from GPU?


8 posts in this topic

Recommended Posts

I'm on a dual-GPU setup and I have multiple monitors which all are visible in my Sound pane (HDMI & DisplayPort). I wish to disable the audio output from the GPU but so far I haven't been able to accomplish that. My theory is that due to so many audio output devices, the coreaudiod process gets overwhelmed and introduces audio skipping.

 

image.png.cac784d0b28be086d86c3298a6214835.png

 

Here is the output I'm receiving by running some commands in the terminal:

$ kextstat | grep -E "AppleGFXHDA"
Executing: /usr/bin/kmutil showloaded
No variant specified, falling back to release
  157    0 0xffffff7f94a3f000 0x5f000    0x5f000    com.apple.driver.AppleGFXHDA (340.1) 7A6F73EC-B35A-323F-97F5-AF0945D70BF1 <154 120 115 18 9 8 7 6 3 1>
    
$ ioreg -p IODeviceTree -n GFX0 -r |grep "acpi-path"
  |   "acpi-path" = "IOACPIPlane:/_SB/PC00@0/GFX0@20000"
    
$ gfxutil | grep HDAU
03:00.1 1002:ab28 /PC00@0/PEG1@1/PEGP@0/pci-bridge@0/HDAU@0,1 = PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x1)
07:00.1 1002:ab28 /PC00@0/RP21@1B/PXSX@0/pci-bridge@0/HDAU@0,1 = PciRoot(0x0)/Pci(0x1B,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x1)

So the AppleGFXHDA kext is loaded and there are two HDAU interfaces from my two GPUs (obviously).

 

I  tried to add under Kernel -> Block the following:

Identifier: com.apple.driver.AppleGFXHDA

Strategy: Disable

 

After that, gfxutil | grep HDAU returns nothing but all my monitors are still present in the Sound pane and if I choose any of them the sound is processed normally, therefore they are not disabled at all. I then followed this guide but the kext is still loading. I understand that it can only be blocked via SSDT, but I'm not sure how to do that and most of what I read addresses one GPU, not two.

 

I have attached here my EFI, ioreg output and the ACPI dump from SSDTtime via Windows (booted from boot manager, not OC).

 

If someone could make me the necessary SSDT to disable the audio output from my GPUs I would highly appreciate it! Also, any suggestion of improvement for my EFI is more than welcome!

 

Thanks a lot in advance! 🙏🏻

efi.7z Hack-MacPro7,1.ioreg.7z ACPI.7z

Link to comment
Share on other sites

Because of this, it seems, at least that is what is reported from other users as well, that coreaudiod gets overwhelmed when there are too many audio outputs and may affect audio devices (especially those connected via USB), resulting in audio skipping. I read this topic and tried to accomplish that with SSDT, but I wasn't able to make it work, especially since I have two GPUs, it was unclear to me how to properly make the SSDT (or SSDTs) disable audio output from GPU completely. I also noticed that the audio skipping happens more often when GPUs are used more, so I lean toward the theory that disabling the GFXHDA driver might help reduce the audio cuts.

Link to comment
Share on other sites

@Slice, once again, it seems that you are correct on that matter. I was reading many reports on Reddit and other sources, and some reported that the audiocored might get overloaded if there are many audio outputs. I wasn't sure if they were all drawing power just by their existence or if they had to be enabled to draw power and overload the coreaudiod. So I checked the load when they were all available and removed almost all of them, and the audiocored load was the same in each case. So, that topic may have no value in my particular case, but, I might have found the source of the problem, I'm testing still, but, it seems that connecting my UPS via USB was causing the problem (not yet sure).

Link to comment
Share on other sites

The algorithm is follow:

A player produces audio stream using coreaudio libraries. The library sends the stream to chosen audio driver.

The audio driver has a switch between different outputs and sends the stream to chosen output.

Where is the overload?

Overload will be if you play simultaneously several players because audio stream decoding is very heavy task for CPU.

  • Like 1
Link to comment
Share on other sites

Thank you very much @Slice for the clarification! It is more clear to me now! My initial thought (and based on a few things that I read here and there), was that audio is distributed in parallel to all available sound sources and the selected sound source is the one that you will hear. Still, the audio stream is distributed in all audio outputs. Therefore, since I have 5 monitors + my Focusrite USB audio interface + my Rodecaster Duo + the motherboard internal audio (via USB) + the case's front panel. So, I was starting to think that I overwhelmed my system with too many audio outputs, but I only used one. After your clarification now I can understand that the audio is only distributed to the audio source that you have selected and the other outputs are skipped to not load the CPU, correct?

Link to comment
Share on other sites

 Share

×
×
  • Create New...