Contribute
Register

[Not Solved] Audio skips randomly? [Realtek ALC887]

Joined
Jul 11, 2016
Messages
5
Motherboard
Gigabyte GA-B250M-DS3H
CPU
Intel Core i5-7500
Graphics
AMD Radeon RX 460 2GB
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hello all!

I've been at this issue for a few weeks now, and have gotten nowhere after trying and applying various things. Basically, what happens is whenever I play audio, it will skip randomly. I've tried to find a rhyme or reason to it by peeking in Console.app when it happens, but have come up mostly empty handed. It does not occur under Windows or Ubuntu, so I know for sure it isn't my hardware. Currently running 10.13.3 using Clover + AppleALC + Lilu in EFI with audio layout 7 set and no custom DSDT. Hardware I'm using is listed in profile, output from black.dragon74's gen_debug tool is attached below as well.

Here's a list of everything I've tried so far:
  • To note, I started with and had settled on audio layout ID 7 and noticed the skips without any of the following steps applied. I did try 1-3 without any of these steps and still had it.
  • I found a video showing how they got audio working with ALC887. They chose 11 as the layout ID, which looks to be the most "correct" one to use since it pretty much exactly corresponds to the audio ports on my mobo. Sadly this did not work.
  • I then thought it had something to do with the audio IDs I have set. Some guidance from elsewhere suggested trying every supported audio ID until I arrive at one which solves it. I tested each one by playing a single album and went through each and tried every supported layout ID. Sadly, the stuttering happened on every single one.
  • I had Console.app at just the right moment and saw a bunch of output relating to AppleHDAEngineInput. Based on this and some other output, I took a guess and tried checking FixHDA under ACPI/Fixes, set it back to 7 and did my little test. Still happened.
  • More guidance elsewhere suggested trying some IRQ related patches: FixIPIC, FixHPET, FixRTC, and FixTMR. The line of thought was these may be messing with things -- audio being one of them -- and checking them should fix it. The skips still occurred with these checked, and adding FixHDA did nothing as well.
  • I even checked AFGLowPowerState since the Clover documentation states it helps with audio crackles. No go there, either.
  • I even tried toleda's cloverALC script, which I was unable to get working. Probably due to some stuff I had done previously, but meh. Plus it led to an unbootable system. No amount of disabling or reenabling patches or deleting kexts (particularly AppleALC) got it. Gold star I tried.
  • I keep remembering things: the speakers I use are some AmazonBasics USB powered speakers, which is plugged into one of the USB ports in the back. Thinking something might've been fighting with it, I have plugged the USB cord into a power brick to ensure it's not power-related. Still get the skips. I am keeping the USB plugged into the power brick for now.
  • I had installed macOS to a 7200 rpm hard drive while debugging a separate, but since fixed, issue. While not hopeful, I figured it may have been the literal slowness of the hard drive causing it, so I reinstalled the operating system to an SSD (an OCZ Agility 3) and reused my custom SMBIOS information (set to iMac18,2). Still experienced the skips, but hey, at least things aren't *near* as slow anymore, haha.
  • More guidance elsewhere had me check audio in an alternate non-Windows environment to make sure it wasn't my hardware. I created an Ubuntu Live USB and played some .ogg files for about 30-45 mins, with no skips to be heard anywhere. At least I now know it's something with macOS.
  • Forgot to mention: I noticed in Audio MIDI Setup.app that the volume goes down and back up again when the skips occur. I also tried playing around with the sampling rates, but got nowhere. This is where I've officially run out of ideas.
  • I decided to take out CodecCommander.kext in the /EFI/Clover/kexts/other folder after doing a little more reading on it. Did not fix the skips here.
  • Did a little more research since posting this thread and found a post where a person's PCIe WiFi adapter was the culprit -- in their case, it hadn't been seated correctly. They had to make some slight modifications to the mounting bracket and the adapter itself, but once those were done, the skips went. Since I have a BCM94360CS2 + PCIe adapter setup, I went in and reseated the card, making sure everything was pressed down firmly. Even replaced one of the antennae after seeing a HAIR lodged in the connector hole! Sadly, though, this did not fix things.
    • As an addendum to this, I decided to play around a bit with my config.plist. Knowing I'd lose audio, I disabled the HDAS to HDEF patch and rebooted. Lost audio as expected, so I reenabled the patch and rebooted again. Got audio back but WiFi began acting wonky. The next reboot fixes WiFi permanently. The fact one initially affects the other makes me wonder if there's some interplay between the BCM card and audio happening. Hard to say right now.
  • Some searching showed some people having the same problem, except with ALC898 and a different motherboard. In it, people mention these skips happening when plugged into the green audio output, yet going away when plugging the speakers into their case's headphone port. While I can confirm the skips go away with the speakers plugged into the headphone jack, this is not an elegant solution by any means. This is made more frustrating by the fact the green port works just fine under non-macOS environments. Very odd.
  • I figured I'd hook up my ground loop isolator to the green port and see what happens when playing audio with the speaker plugged into it. Still got the drop outs. It was a long shot anyway.
I'm pretty sure my SMBIOS is set correctly since the iMac18,2 definition uses my CPU. I also don't know if my graphics setup is throwing something off either: the ig-platform-id is set to 0x5912003 for connectorless, with Inject Intel checked and the IntelGFX value set to 0x59128086 for KBL. I would not be sure what else to set these to if these are the incorrect values.

I am not afraid to generate and patch a custom DSDT if it comes to that.

Other than all this, I and my other peeps have run out of ideas for possible fixes. I'm hoping you guys can help with this; any and all assistance is appreciated.


Thanks in advance.
 

Attachments

  • debug_31119.zip
    3.5 MB · Views: 56
Last edited:
Joined
Jun 3, 2013
Messages
19
Motherboard
GA-Z87X-UD5H
CPU
i7 4770k
Graphics
EVGA GTX 770
Mac
Classic Mac
Mobile Phone
I've been encountering this issue for a while with ALC898 - the audio works fine and it will randomly stutter in and out. I wish I had a solution for you, however I've been pretty much stumped too!
 
Joined
Jul 11, 2016
Messages
5
Motherboard
Gigabyte GA-B250M-DS3H
CPU
Intel Core i5-7500
Graphics
AMD Radeon RX 460 2GB
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
I've been encountering this issue for a while with ALC898 - the audio works fine and it will randomly stutter in and out. I wish I had a solution for you, however I've been pretty much stumped too!

The biggest mysteries for me:
a) It's interesting that these skips don't happen in a Linux environment. I wonder if it's driver related.
b) I wonder why the skips go away with the speakers plugged into the headphone port. Really stumped with this.

Someone did suggest to me that CodecCommander is to be installed in either S/L/E or L/E. I'm going to try this and see if we get any improvements.
EDIT: This didn't work. Onto DSDT patching.

If this doesn't work, I'm going to see about generating and patching a DSDT. These are the only things I've yet to try. Hopefully it's one of these two.
 
Last edited:
Joined
Jul 11, 2016
Messages
5
Motherboard
Gigabyte GA-B250M-DS3H
CPU
Intel Core i5-7500
Graphics
AMD Radeon RX 460 2GB
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
I have an update! I ended up not making and patching a DSDT, just as a preface.

So I actually found a good deal on a 27 inch monitor. Since it happened to support HDMI, I figured I'd see if forgoing the onboard audio would eliminate the skips entirely. With an HDMI cable plugged into my graphics card's HDMI slot, I set up the new monitor and moved the 3.5mm cable from the green port on my motherboard to the headphone port in the back of the monitor, downloaded HDMIAudio.kext and placed it in E/C/k/o. Initially, when I started playing audio, I got skips after several minutes. I was about to flip tables.

But then I made a revelation: I realized the HDAS to HDEF patch was still enabled. I wondered what would happen if I went in and disabled it. Well, I did, and the skips went away at the expense of losing the other audio outputs.

It's interesting the skips occurred through the HDMI port on my graphics card. That gives me an idea. I'll report back with my findings.

EDIT: Given the skips occur when HDAS to HDEF is enabled on the graphics card's HDMI port, I wondered if the graphics card wasn't seated correctly. I decided to go in and reseat the graphics card, hoping that would alleviate the issue. Sadly, it does not. The quest continues.
 
Last edited:
Joined
Jul 11, 2016
Messages
5
Motherboard
Gigabyte GA-B250M-DS3H
CPU
Intel Core i5-7500
Graphics
AMD Radeon RX 460 2GB
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Last update for any future readers: I FIXED IT!!!!

As a last ditch effort, I decided to forgo the AppleALC + Lilu combo and try out toleda's cloverALC script again. I had bad luck with getting this method to work the last two times since it resulted in a non-bootable OS. I decided to try again -- this time using MultiBeast to install the appropriate items. Lo and behold, after playing albums for almost an hour, the skips have gone! Truly music to my ears. :p

I can only guess the patches added to the config.plist help eliminate the skips in a way the AppleALC + Lilu combo do not. At least on my specific hardware, anyway.

toleda, if you read this, thank you so much for making your tool. I can't even begin to explain how grateful I am for it after nearly 1.5 to 2 months of troubleshooting this issue. I now have a fully working hackintosh!

EDIT: While toleda's script did help out *significantly*, the skips still popped up after several hours of playback. I also noticed the problem happening in GarageBand, too, proving to be more severe than playback alone. Not only that, but several times I tried to record audio, the computer would stop recording on its own -- almost as though it was fighting with something.

I did more reading on some of the ACPI fixes in Clover, and found some which the wiki recommended and/or suggested weren't bad things to have checked. I decided to check 3 things: FixSBUS, FixUSB, and DeleteUnused. The last two make the most sense since a) I wondered if there was a USB-related conflict, and b) DeleteUnused, well, deletes devices not being used from the DSDT. FixSBUS I chose because the wiki said "meh, it's won't hurt to have this checked."

After restarting and playing back music for several hours, I have not heard a single skip since. Given this, I feel my hunch is correct. I'll give it a week and report back if I get any skipping.

EDIT 2: Sadly, this issue is not solved as I once thought. What I have noticed, however, is that this issue occurs only when using the computer after it has woken from sleep. If I restart and don't put it to sleep, the skips don't occur.

Thinking there is a hardware conflict *somewhere*, I created a custom SSDT for my computer's USB ports to eliminate the need for the port limit patch. While that now puts me under the 15-port limit, it did not eliminate the skipping problem. Sad face.

The quest continues... again.
 
Last edited:
Joined
Feb 25, 2011
Messages
2
Motherboard
Gigabyte GA-Z87-UD3H
CPU
Intel Core i7 4770K
Graphics
MSI Geforce GTX770 2GB
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hello, i came across your post after having the same issue with my ALC898. This was after i installed Cataline with AppleALC+Lilu.

However, it seems to be fixed with Layout 1 and disabled "Reset HDA" in Clover. After rebooting, im listening without stutters for 8 hours now.
 
Top