Jump to content

Audio Stuttering and Memory Management


  • Please log in to reply
10 replies to this topic

#1
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
UPDATE: it turns out memory management is NOT the culprit. Disabling HT helps, but not absolutely. There seems to be a bug with the Lion OS!!

I've built this hackintosh box for audio production purposes, mainly.

I've been having audio stuttering/crackling problems on 10.7.2.

This happens in DAW's and audio players. At first I thought it was a bug in TC Electronic drivers but now I think it's something else.

I saw that sometimes right after login the audio programs work, but after some time the crackling begins. I've noticed that stuttering tends to happen when there is a Page in/out activity in the memory system.

As you know, Lion has one of the stupidest virtual memory schemes in the world, and constantly swaps even when there are gigabytes of available memory.

I've noticed that this doesn't create much of a problem on my macbook pro. But on the hackintosh, it causes serious problems. Even when there is a slight swapping going on, the audio can stutter, crackle and pop like crazy.

I'm now testing my hypothesis, and I think there is a correlation. This happens severely using Live because my project uses a lot of memory, in which case my 6GB system goes above >3GB Active memory, and because of the 0.5GB of Wired and 1.7GB Inactive Memory the system prefers to keep, I can't use my DAW properly. Constant audio problems prevent me from working on any non-trivial project.

Some of the simpler projects I have on Logic work fine. It's when I load the large Ableton Live projects I see this problem. You probably won't see it on simple test projects, I could open a virus ti track and play it live. No problem. When I open a large project, audio starts to crackle and virus goes out of sync. I can't edit anything.

Any suggestions? Can my claim be true? If that's true, this should be a serious problem for many audio pros using Hackintosh. I suspect that this might be due to an unfortunate interaction between the Hackintosh SATA drivers and the kernel. Or maybe disk drives aren't fast enough, you need SSD. Somehow, the kernel seems to suffer latency processing the page faults and loses realtime ability.

What can I do to make CoreAudio regain its real-time behavior? Is the only solution to downgrade to Snow Leopard? Could it be some other reason? How can I find out?

Suggestions most welcome. Please help!

malfunct

PS: The CPU is not maxed out in any project, Live shows about 50% CPU load. The stuttering does happen when I play the test tone in Live. It's interesting how more snappy my other Snow Leopard installation that I use as a rescue system feels. :/

#2
BALDY_MAN

BALDY_MAN

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 269 posts
  • Gender:Male
  • Location:uk
you seem to know your stuff from your post but please make a signiture
without seeing your Hackintosh specs knowone can help you

#3
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
Well, I've updated my sig. :)


After the crackling started, when I quit Live, the crackling stops.

Now I can play music on Clementine, Activity Monitor shows 2.1 GB free memory, and only 40 MB swap used. Things are snappy when this is the case. It's when the system is about to go out of free memory that this happens. There wasn't any spike in CPU use.

Another bit of info, I'm using MacPro5,1 identifier.

#4
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
I disabled swap. Crackling continues when I use Live. There is lots of Free memory and no page ins/outs at the present. Strange.

What else could it be?

#5
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
It could be the single core overloading. System Info shows 8 cores, but I have 4, so I'm going to try turning off hyperthreading next.

http://www.logicproh...php?f=5&t=88835

#6
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,892 posts
  • Gender:Male
Malfunct, why don't you simply upgrade to Mountain Lion? I also work with multimedia, and most things that work with Lion will work with Mountain Lion too. And, believe me, with far better performance than both Lion and Snow Leopard.

Best regards!

P.S.: And yes, turn off hyperthreading. You don't need these 8 "cores" indeed.

#7
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts

@theconnactic:

Hello there. Because there are numerous reports about Mountain Lion having a severe audio stuttering problem. I suspect it's the same one I'm having, therefore I predict nothing will help.

Are you seeing *any* audio stuttering? There was absolutely NO audio stuttering in Snow Leopard.

I did turn off hyperthreading. I turned off the dynamic pager. There is still stuttering.

I am going to now test with Snow Leopard using the latest TC Electronic drivers, and see if there is stuttering there. It's really strange. I get stuttering even when I'm scrolling a web page. It's driving me crazy. There is no way I can produce music with such a terrible bug.



#8
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts

Here is some more for info:

 

I'm trying out iTunes playback, setting iTunes and coreaudiod to realtime priority with renice. Stuttering diminishes to some extent, I think there is still some stuttering but this might be a temporary solution to those who experience it.

UPDATE: stuttering still occurs if I open a few tabs in chrome. Terrible bug. I think this is an OS bug. 



#9
bcobco

bcobco

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 142 posts
  • Gender:Male
  • Location:Argentina
audio performance also bad here..
as a workaround, i use JACK. http://www.jackosx.com/
you can give a try, results are inmediate!
ps dont forget to check the "hog mode" option

#10
malfunct

malfunct

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts

Whoa bcobco thanks for the heads up. I use Jack on Linux, it works better than OS X native driver even without the realtime kernel. :)



#11
jamiethemorris

jamiethemorris

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 421 posts
  • Gender:Male
  • Location:San Rafael, CA

I had a weird audio issue when I was using Clover as my bootloader, it sounded like a sample rate mismatch sort of thing. Kind of a garbling sound. It did this in any DAW and the only way to fix was to switch the latency a bunch of times until it stopped doing it. When I switched back to Chameleon it worked fine. Have you tried another audio interface or the built-in sound card? This definitely sounds like something is reporting the clock wrong, I don't think it has anything to do with the drive. 

 

Basically, I see a few potential issues:

-Lion doesn't like your firewire card. Is your Konnect going into a firewire port on the mobo or into your card?

-The CPU or memory frequency somehow being reported wrong (This is mostly just a wild guess)

-Your rig doesn't work well with the Konnect's driver

 

Also, besides just disabling HT I would also disable C1E, C3/C6, EIST, and turbo boost in the bios. Personally, though, I find that hyperthreading is beneficial in my DAW usage (even in Logic, with it's infamous single core overload issue).

 

I would start with trying to go directly out of the internal sound card and see if it still gives you the stuttering problem.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy