Jump to content

USB Sound Assertion - USB Audio Interface briefly stuttering occasionally

17 posts in this topic

Recommended Posts

Hi guys,


This is my first Hackintosh, designed to be used for music production, so having my audio stutter is a fairly serious issue!


i7 8700k

Asrock z370 Pro4

Focusrite 18i20v2 (have also tested with Focusrite 2i2, and Zoom H6) audio interface,

Samsung 960 M.2 (I also have a normal HDD in here as well)

I tested with High Sierra, but had the same problems in Sierra (which I installed on my spinning HDD).



It seems that sound engine is encountering some kind of error, and is having to restart itself periodically. These are the important lines from Console (I believe)-


USB Sound assertion (Resetting engine due to error returned in Read Handler) in /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleUSBAudio/AppleUSBAudio-311.9/AppleUSBAudioDevice.cpp at line 6182

^^ I assume that .cpp file is inaccessible? Would be interesting to see what is on line 6182! Looks like the audio streaming is messing itself up every now and then?


Core audiod - HALS_IOA1Engine.cpp:365:EndWriting:  HALS_IOA1Engine::EndWriting: got an error from the kernel trap, Error: 0xE00002D7


Core Audiod - HALB_AsyncLog.cpp:120:perform:  11:39:38.080572 thread 10d4: HALS_IOContext::IOWorkLoop_HandleOverload: Overload arg1: 64 arg2: 4527392 arg3: 4527426


Spotify - HALC_ProxyIOContext.cpp:1068:IOWorkLoop:  HALC_ProxyIOContext::IOWorkLoop: skipping cycle due to overload



Sometimes I also get a USB Sound Assertion claiming that "output fell behind". although i've just observed that this particular error msg also happens on my imac, so this is probably not hackintosh related.

USB Sound assertion (Output Fell Behind) in /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleUSBAudio/AppleUSBAudio-311.9/AppleUSBAudioDevice.cpp at line 6177


https://imgur.com/a/MZXVi(various screenshots of console)


I haven't noticed problems with onboard sound, which I briefly got working to test. I'm not interested in using onboard sound though. My intuition says that my mobos USB isn't playing nicely with OSX. Unfortunately theres nothing in the bios I can change (I can't force it to run as USB 2.0 for example, and there are no USB 2 ports on this mobo). Changing ports makes no difference.


I initially used a guide and EFI folder from a website, but today tried the "vanilla" method on Reddit, which seemed to install nicely, but hasn't fixed my USB Audio problems! I've tried fiddling with the USB options in clover but to no avail.


I've been trying to look into using RehabMans FakePCIID_XHCIMux.kext, but I'm a bit confused about if its doing anything (I put it in my clover kext folder, as well as in sys/lib/ext, as well as the FakePCIID.kext). Not sure what its really meant to do, or if I need to do more to make it work?


Interestingly, my iMac (which works well with USB audio, running Sierra), uses AppleUSBXHCILPTH as the Host Controller for USB 3.0 bus in System Information, whereas my hack is using AppleUSBXHCISPT. Is this a pertinent detail perhaps?


I'm not sure what else to try now! I've ordered a cheap USB 2.0 PCI card from Amazon which arrives on Tuesday, but this is a bit of a desperation attempt, I'm quite out of my depth with this issue! Any help would be massively appreciated.


​Interestingly, the error doesn't seem to occur as much if I don't touch the computer. I wonder if my mouse/keyboard is interfering with the USB Audio? I've tried unplugging everything other than the mouse/keyboard and USB interface but still get the problem.


Thanks so much! Apologies if there's more info I need to add, I will supply any information necessary!


​EDIT : Thought I'd also add that I updated the Bios to ver 1.60 (latest) from Asrock website, was hoping this would fix the problem but it hasn't.

Share this post

Link to post
Share on other sites

Thanks Madlon!




Here's the necessary files. This particular EFI is very basic (this is from my attempt at a Vanilla install). Thanks so much for your help!

extract original tables, press F4 key in clover boot screen, files generated in Clover/Acpi/Origin

Share this post

Link to post
Share on other sites


replace full folder, reboot



about Focusrite

put sample rate in 44, test, and back to 48 again

Share this post

Link to post
Share on other sites

Unfortunately still getting the error. Took quite a while until i got the first error, but sadly its still there-



USB Sound assertion (Resetting engine due to error returned in Read Handler) in /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleUSBAudio/AppleUSBAudio-311.9/AppleUSBAudioDevice.cpp at line 6182


HALS_IOA1Engine.cpp:365:EndWriting:  HALS_IOA1Engine::EndWriting: got an error from the kernel trap, Error: 0xE00002D7


IOAudioEngineUserClient[<private>] - AUDIO OFFLINE. online=0. state=2. loopCount=138, lastLoopTime=-1864838656


Any ideas? Thanks!

Share this post

Link to post
Share on other sites

The cheap USB 2 PCI card has yielded some interesting results... I tested with the Scarlett 2i2 (which draws its power from the USB). With just the 2i2 plugged in to the USB 2.0 card, it worked (although i think the same errors were present), but more importantly, the sound would gradually disort until it faded away. This would happen quicker if i ran logic as well as spotify and had them both playing. Changing sample rate or closing logic would "reset" sound to normal... I should test this with a card that doesn't require power.


More interestingly, if i plug both my keyboard and mouse into the new card, and ONLY have the audio interface plugged in to the mobo, we seem to get no errors! I think this probably means that my keyboard/mouse are interrupting the audio device when they share the same USB 3.0 bus (i.e the motherboard)?


Anyway, i'll keep an eye on the console, and if i don't get an error then i have found a solution, however, this is a pretty bad solution if it means i can't plug in anything else to the mobos USB!


I have a gigabyte z370 mobo arriving tomorrow to test with, and i'll perform some more tests in the meantime to see if i can find out where the error is coming from... But does any of this make any sense or help discovering where the problem is?


NEW IOREG - https://drive.google.com/open?id=16s1UKL5E0dlqtIdrk_PBbBSRyU6tD57h



Share this post

Link to post
Share on other sites

Can no longer seem to reproduce the original error... even though i have plugged everything back into the mobo?!


I had to move my GPU to another slot to install the USB pci card. I discovered that my GPU should have been in the new slot as its 16x, and the other is 4x - and to add to that, i have a wifi card in PCIE5, which would have meant my GPU was running at 2x (asrock z370 pro4 manual states this). Could this have been the problem all along?! Maybe my GPU was causing the problem? Or maybe it was causing a bottleneck? Does this sound likely?

Share this post

Link to post
Share on other sites

u put GPU in x16 slot and solve?


if u use GPU in other slot(x8, x4) u loose many performance


check, ur GPU stay in RP05, is very rare in serie 100/200/300

MaLd0n 2018-01-24 às 22.56.05.png


the common device is PEG0/PEGP

Share this post

Link to post
Share on other sites

Wow i think this is solved. Now that i've moved the GFX card to the correct PCIE slot, its now in PEG0 in ioreg (i have no idea what this is, but its the correct way?).


If this is fixed i will be so happy! How ridiculous that the $5 usb card fixed it by accident - because i had to move the GFX card to fit the new USB card in the case! This means my GFX card was running at 2x, not 16x which must have caused the errors! I have no idea why it affects the USB audio only. It didn't seem to have a problem with onboard audio... Also, I don't think a slow GFX card should affect audio? But If its fixed i won't complain!


Thank you so much for your help Mald0n, I'll update this thread if i have any more problems, but i think it might be solved! I'll keep an eye on my console.


EDIT - I get a USB Sound assertion if I plug an external HDD into the cases top USB 2.0 ports, but not the 3.0 (its a fractal r4 case). I don't get an assertion plugging into the any of the other USB ports (including the USB 2.0 PCI card at the back)... This doesn't feel rock solid... but as long as i don't get assertions randomly while using the machine i don't really mind about this.. I'll keep this updated with my findings if there are more problems.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By ITzTravelInTime
      Hi guys i am a small developer, i really like to use my sound blaster cards on my machines and i love also coding, so when i find the source code for the kx audio driver on git hub and then Eugene, the creator of kx audio driver decided to no longer maintain the project, i decided to start working on a mod of this driver. 
      With my mod, created starting from the sources of the last version of kx audio driver, and also by using apple developer documentation for pci and audio drivers as reference, i am working to achieve 2 things mainly: get all the cards supported by the driver to work with all the recent versions os macOS and add support for other cards that are not officially supported by the driver that works or could, but needs to be more properly supported.
      This driver is made to support cards based on the E-mu 10k1, 10k2 and similars (like what is used by audigy rx and audigy 4 cards).
      Supported cards are:
       - most of the sound blaster live!, live! 5.1 and live! 5.1 digital series
       - sound blaster 512
       - sound blaster 256
       - other creative and e-mu sound cards based on the 10k1 chip (cards with the ES1370/ES1371/ES1372/ES1373 chips are not supported)
       - sound blaster Audigy series (1 st gen)
       - sound blaster Audigy 2  and audigy 2 zs series
       - E-MU cards based on the 10k2 sound chip
       - Some Audigy 4 cards (SB0610 only) and the audigy 4 pro
       - Sound blaster Audigy RX (sb0155)
       - other creative and e-mu cards based on the (10k2, 10k2,5 and CA10300 based cards)
      NOT supported cards:
       - Any ISA Sound card
       - ES1370/ES1371/ES1372/ES1373 based sound cards
       - CMI8738/CMI8788 based cards
       - Any CA0106 based card and cards with similar architectures (like sound blaster live! 24 bit, sound blaster audigy SE SB0570, audigy LS and similars, but audigy SA is supported)
       - Any sound blaster x-fi (some of them works on macOS using a modified version of voodoo hda)
       - Any sound blaster recon3D
       - Any sound blaster Z/ZS/ZX and similar series
       - Any sound blaster AE5 series
      In the time being the things i have modded or added with this mod are:
      - increased the simple buffer frames number with different values for emu10k1 based cards and emu10k2 based cards (including recent audigy 4 and rx) to reduce and all the audio cracking issues and possibly fixing all of them on a lot of cards
      - added a more proper support for the pci express sound blaster audigy rx (which basically is an audigy 4 with a pcie bridge chip) 
      - added more fancy names for the cards in the settings and other menus (so the name will be, for example, SB live! 5.1 SB0060 instead of kx SB0060 [e880] witch was shown in the original driver)
      - added support to sample rate changing and added lots of sample rates (from 8 khz to 176,4 khz) to accomodate any possible usecase (note that 10k1 sound cards are limited up to 48khz sample rate, and 10k2 based cards are limited to 176,4 khz because of issues getting 192 khz to work, for now the driver goes up to 176,4 khz for such cards) 
      - added boot args to manage the driver:
      Boot args to use with the kx audio driver mod: -kx_disable or -kxdisable or -kxoff This will prevent the driver from doing any initialization work, so the driver is basically disabled, use it to boot your ssytem in case the driver is giving you issues and kernel panics while you are trying to boot/using your system, so you are able to remove this driver or replace it with another version of it or to do some truble shooting. -kx_debug or -kxdebug or -kxspec Will show more debug info about the card, mainly the i/o port address and the kind of bus that it uses -kx_exp_deb or -kx_beta or -kxbeta Will enable experimental and probably not working or unstable features like showing inputs for the card or 192 khz sampling rate, use it only for testing and debug purposes, this may likely cause instability and problems in the everyday usage! Use it at your own risk! -kx_original or -kxoriginal This will basically turn off almost all the mods of this mod, so the driver will come to work as it was before modding it, this can be usefoul as a "safe mode" like feture to have a working driver in case of problems with features of the mod, so using this means no crsking issues improvements, only 48 khz sample rate and only features of the non-modded kx audio driver for mac os x  
      - created a script file to use with the driver for installing the driver and also to load/unload, update, repolace it and it's libraries.
      What i'd like to implement but i don't know how to do:
       - I'd like mainly to add a more proper support to the pci bridge chip of the audigy rx,
       - have audio inputs working,
       - fix the support when using more than one card, to get all the cards shown in the settings and other menus,
       - have the gameport/midi port of older cards to be used in mac os as a midi in/out
      If other developers would like to join and help me, you can, and also an hand from other people with testing and feedback will be nice.
      link for the kext only (if you have clover put it in [your clover efi folder]/clover/kexts/[your macOS version]/ so it will not be deleted when updating macOS):
               - download from the downloads section:          kX Audio Driver Mod by ITzTravelInTime 1.01                                                                                    - external download:                                      https://dl.dropboxus...Driver.kext.zip   link for the installer pack (the best way to install it, but you have to reinstall it when you upgrade macOS, remeber to fix kext permitions and rebuild the kernelcache if you want to remove the kext from it's install directory without using the unistall feature of the provvided script):              - download:                                                   https://dl.dropboxus...aller pack.zip   Source code from Git Hub:          -  github repo:                                               https://github.com/ITzTravelInTime/kx-audio-driver   NOTE: Some system because of some problems with the HPET may need to use FixHPET in clover and to install the kext in /System/Library/Extensions or to do other kind of hpet mods to run the driver properly, but only on some systems, most systems should not require it  

    • By rio2
      How to make AppleHDAController load on Ryzen boards?
      Rename(/add) your audio controller to your DSDT/SSDT as HDEF Add a _DSM method to your HDEF device with layout id 1 Patch the AppleHDAController binary, because it has a static table containing the supported PCI Vendor/DeviceID pairs and it also checks the VendorID against known values. As an example I provide a dif file and patched 10.13.3 binary, but if you want to I can patch the binary for other versions.  
      After AppleHDAController loads to actually get sound working you need to patch AppleHDA.kext for the codec on your board. First I tried to use Lilu+AppleALC for this task, but for some reason it refused to work. (I might look into it later why) But for the time being it was easier to use toleda's cloverALC script for that, but to make it work I had to change(/remove) the specified location of the HDEF device from the script. And for some reason it also required me to mount the EFI partition manually.
      Change this:
      if [[ $(cat /tmp/HDEF.txt | grep -c "HDEF@1") != 0 ]]; then Into this:
      if [[ $(cat /tmp/HDEF.txt | grep -c "HDEF") != 0 ]]; then  
    • By LarryKu
      Hi everyone,
      I am new, I hope I am posting in the correct forum.
      My specs:
      Processor: Core i5 6500 Skylake 3.2ghz
      Mobo: Gigabyte h170-d3h
      M2SSD: WD Black 256gb PCIe (Mac OSx)
      SSD: Samsung 860 Evo (WIndows 10)
      HDD: WD Blue 1TB
      GPU: Radeon RX 480
      Monitor: BenQ RL2460 24"

      I was able to install High Sierra on a new m2 drive, that I added to the above configuration with windows 10 already installed.
      I had a few issues during install, including the monitor turning off at boot screen.

      Unfortunately, this persists even now. It turns off at about 60% of the progress bar, and to turn it on again I have to unplug/plug back my hdmi.
      Additionally, while all of the usb ports worked during install and while running it out of the clover I had on the usb stick, only the rear ones appear to work now.
      The audio doesn't work either, though I added the correct patch according to my mobo

      Lastly, my other drives are not recognized in the bios anymore. They run fine from boot override but they don't show up in the boot priority (while multiple entries of mac OS do, and they seem to increase in number at every reboot)

      Thanks in advance for the help
    • By ITzTravelInTime
      This driver is a mod of the popular kx audio driver for mac os x, the project goal is to still maintaining it for the future releases of mac os and to include as much cards as possible and to get all the features of the cards to work.
      Currently the only features not supported are audio inputs and integrated midi and synth capabilitues of the cards, and some minor things like creative remote controllers or software controlled volume gears on creative external drives and bays)
      It supports most the sound blaster live! series cards, the sound blaster PCI 512, most of the audigy (emu 10k2 based) series, audigy 1, audigy 2, audigy 2 zs, audigy 4 (SB0610), audigy 4 pro, audigy 5 and audigy rx (sb1550) and some e-mu edsp audio cards with all the recent versions of mac os, tested to work with mac os yosemite, el capitan, sierra and high sierra on intel based machines from socket 775 to 1151 (including enthusiast platforms like x58, x79, x99, x299) and also confirmed to work on mac pros.
      reference topic:
      Kx audio driver mod [sound blaster live!, audigy 1/2/4/RX emu edsp]
    • By sect0r5
      Hello guys I need help for tuning my system for better working possibilities.
      What works:
      Sleep/Wake Audio Ethernet App Store  
      CS:GO not working (other Steam games are OK) Bad GPU performance 40 fps on OSX Cinebench vs 85 fps on Windows Cinebench Big audio latency when using line input      //edit : problem is gone  Slow start of Viber Desktop, OBS and some web pages  //edit : OBS is slow on native MacBook too Sometime random mouse freezings            Huge lags on latest NVidiaWeb drivers(158, 159) Sometimes can't awake and stuck on black screen after restart   //edit : now is alright. magic! Sometimes sound start crackling when watching online video     //edit  : magically gone edit : she come again  
      It's happens on a both Kernel's :
      Shanee 13.3.3
      Clover 4392
      What info i can provide for better results?
      With best regards, Stan.
      Send me stanMacs-Pro.zip