News for hackers. Stuff that matters.
Re:M4 MacBook Pro by unsupp0rted on Wednesday October 30, 2024 @12:13PM (#41996815)
I have a 16" M1 Pro with 16 gigs of ram, and it regularly struggles under the "load" of Firebase emulator.

You can tell not because the system temp rises, but because suddenly Spotify audio begins to pop, constantly and irregularly.

It took me a year to figure out that the system audio popping wasn't hardware and indeed wasn't software, except in the sense that memory (or CPU?) pressure seems to be the culprit.

Re:M4 MacBook Pro by maxioatic on Wednesday October 30, 2024 @12:30PM (#41997048)
I have a 14" M1 Max with 32gb of ram for work, and it does that popping noise every once it a while too! I've always wondered what was causing it.
Re:M4 MacBook Pro by SSLy on Wednesday October 30, 2024 @01:02PM (#41997531)
Im relatively surprised modern Macs have same buffer underrun issue I had on intel laptops with pulseaudio 7+ years back.
Re:M4 MacBook Pro by silvr on Wednesday October 30, 2024 @01:49PM (#41998129)
Whoa! I've been so annoyed by this for years, so interesting that you figured it out. It's the kind of inelegance in design that would have had Steve Jobs yelling at everyone to fix, just ruins immersion in music and had no obvious way to fix.
Re:M4 MacBook Pro by astrange on Wednesday October 30, 2024 @06:37PM (#42001273)
That sounds like an app issue, it might be doing non-realtime-safe operations on a realtime thread. But generally speaking, if you have an issue, use feedback assistant.
Re:M4 MacBook Pro by drozycki on Thursday October 31, 2024 @01:11AM (#42003682)
It happens in Safari and Music.app. I find that Airpods exacerbate the issue too.
Re:M4 MacBook Pro by zaptrem on Wednesday October 30, 2024 @02:08PM (#41998356)
This happens whenever I load up one of our PyTorch models on my M1 MBP 16gb too. I also hate the part where if the model (or any other set of programs) uses too much RAM the whole system will sometimes straight up hang and then crash due to kernel watchdog timeout instead of just killing the offender.
Re:M4 MacBook Pro by astrange on Wednesday October 30, 2024 @06:36PM (#42001264)
There is an API `proc_setpcontrol` which absolutely noone uses which does the thing you want.

It definitely gets unstable in those situations, but you probably don't want your scripts randomly OOM killed either.

Re:M4 MacBook Pro by zaptrem on Wednesday October 30, 2024 @08:04PM (#42002023)
Sorry what is the thing I want in this case? No stuttering or no crashing?
Re:M4 MacBook Pro by astrange on Wednesday October 30, 2024 @08:46PM (#42002274)
Killing the process instead of affecting (or crashing) the rest of the system.
Re:M4 MacBook Pro by zaptrem on Friday November 01, 2024 @01:37AM (#42014346)
This is almost completely undocumented outside of this HN post (check Google). Can you tell us more about what this does and how it is intended to be used? Thanks!
Re:M4 MacBook Pro by saagarjha on Thursday October 31, 2024 @12:19AM (#42003467)
> There is an API `proc_setpcontrol` which absolutely noone

Gee, I wonder why.

  $ man proc_setpcontrol
  No manual entry for proc_setpcontrol
Re:M4 MacBook Pro by duped on Wednesday October 30, 2024 @02:34PM (#41998641)
This kind of sounds like someone is abusing perf cores and high priority threading in your stack. iirc, on MacOS audio workgroup threads are supposed to be scheduled with the highest (real time) priority on p cores, which shouldn't have issues under load, unless someone else is trying to compete at the same priority.
Re:M4 MacBook Pro by unsupp0rted on Wednesday October 30, 2024 @04:30PM (#41999897)
There is some discussion online on whether this happens when you have a Rosetta app running in the background somewhere (say a util you got via Homebrew, for example).

Even when I remove all "Intel" type apps in activity monitor, I still experience the issue though.

Re:M4 MacBook Pro by FuckButtons on Wednesday October 30, 2024 @09:34PM (#42002528)
I’ve had something similar happen as a bug when I was using a python sound device and calling numpy functions inside its stream callback. Took me a long time to figure out that numpy subroutines that drop the GIL would cause the audio stream to stall.
Re:M4 MacBook Pro by pier25 on Thursday October 31, 2024 @01:17AM (#42003707)
I hear popping when Chrome opens a big image or something similar. I always assumed it was a Chrome issue.