Closed wojciech-kulik closed 6 months ago
I'm getting this issue as well. Thanks for your script, I had been resorting to reinstalling Blackhole every time it disappeared. I am also on a 14-inch M1 Pro MacBook.
Just adding my two cents that I'm getting the same issue on my MacBook Air M1 (2020) with Monterey 12.1
Thanks for the script, it also did the trick for me!
BlackHole2ch.v0.3.0.pkg.zip Can you try this version and see if it makes any difference.
@devinroth I'm using version from brew. Why 0.3.0 is not available there?
I ran the package but the installation failed (twice). It didn't give me any details though so I can't say anymore. Cheers!
From: Devin Roth @.> Sent: Wednesday, February 2, 2022 9:48 PM To: ExistentialAudio/BlackHole @.> Cc: Wirkes Shane @.>; Comment @.> Subject: Re: [ExistentialAudio/BlackHole] [BUG] Blackhole keeps disappearing (Issue #524)
BlackHole2ch.v0.3.0.pkg.ziphttps://github.com/ExistentialAudio/BlackHole/files/7989561/BlackHole2ch.v0.3.0.pkg.zip Can you try this version and see if it makes any difference.
— Reply to this email directly, view it on GitHubhttps://github.com/ExistentialAudio/BlackHole/issues/524#issuecomment-1028298925, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACKDD63JWO33L45TYTFQU4DUZGDBDANCNFSM5MJQ426Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
I'm also seeing blackhole disappear. I can see it's listed under the devices I created but is disabled. It's unclear how to turn it back on again without reinstalling.
Just release v0.4.0. Should solve this but reopen if you continue to run into issues.
Hi. I'm also getting this issue with the release v0.4.0. MacOS Monterey.
Same issue on macos m1 12.6.1. blackhole-2ch and 16ch (i have both) .v0.4.0. reinstalling with home brew makes it reappear.
I get the exact same behaviour as described above (M1 MBA, macOS Ventura, v0.5.0). @devinroth, could you please reopen this issue?
Sure. But I need details. How to reproduce? Any relevant information from Console (logs, crash reports) anything that contains BlackHole.
Thank you for the prompt response. It has happened again but I see no records in Console. There is nothing in logs/crash reports with key words Existential Audio nor BlackHole. If I do a clean install, should it log anything? I will do that to start clean and I would also use this opportunity to test my ability to find relevant logs.
Other than that, what I can think of: I am using BlackHole in multi-output device config, the other output device being a Focusrite audio interface connected to my HP monitor via USB. I am connecting my MBA to the monitor via USB C, so the monitor serves as a dock and gets disconnected (both while MBA is active and while it's sleeping) often. Do you think the connection/disconnection scenarios are worth testing on my side? Or maybe asking others that haven't specified what machines they're using whether they have this issue on MacBooks or whether anyone has it on a desktop Mac as well?
I guess anything you can tell me at this point will help. As you stated I don’t have a whole lot of information to go on.
I’m going to build an app that will scan core audio to see if anything interesting pops up. I’ll keep you updated on that.
Devin On Jun 10, 2023 at 11:08 AM -0700, kovac254 @.***>, wrote:
Thank you for the prompt response. It has happened again but I see no records in Console. There is nothing in logs/crash reports with key words Existential Audio nor BlackHole. If I do a clean install, should it log anything? I will do that to start clean and I would also use this opportunity to test my ability to find relevant logs. Other than that, what I can think of: I am using BlackHole in multi-output device config, the other output device being a Focusrite audio interface connected to my HP monitor via USB. I am connecting my MBA to the monitor via USB C, so the monitor serves as a dock and gets disconnected (both while MBA is active and while it's sleeping) often. Do you think the connection/disconnection scenarios are worth testing on my side? Or maybe asking others that haven't specified what machines they're using whether they have this issue on MacBooks or whether anyone has it on a desktop Mac as well? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
While doing some work on cubeb-coreaudio-rs I've observed this issue on github actions, which uses Blackhole.
The setup is as follows:
Removing A (simulating a device being unplugged) seems to bring down D too. What's more is that we seem to be able to enumerate A still, although we cannot read its UID.
Having one AudioUnit with input from A and another AudioUnit with output from D works.
By removing BlackHole I assume you’re rebooting CoreAudio too. That definitely doesn’t simulate removing a device and is going to cause all sorts of problems with your tests.
Devin On Oct 13, 2023 at 7:00 AM -0700, Andreas Pehrson @.***>, wrote:
While doing some work on cubeb-coreaudio-rs I've observed this issue on github actions, which uses Blackhole. The setup is as follows:
• A BlackHole2ch virtual device D • An aggregate device A (not private) with input D • An aggregate device B (private) with input from A and output from D • An HALOutput AudioUnit with input and output from B
Removing A (simulating a device being unplugged) seems to bring down D too. What's more is that we seem to be able to enumerate A still, although we cannot read its UID. Having one AudioUnit with input from A and another AudioUnit with output from D works. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
We don't remove BlackHole. We destroy the aggregate device on top of BlackHole.
Got it. I just was confused with how you said “A BlackHole”. Lol.
I’ll take a look but if the issue is the aggregate device there’s nothing I can do about that. Aggregates are full of bugs.
Devin On Oct 13, 2023 at 7:43 AM -0700, Andreas Pehrson @.***>, wrote:
We don't remove BlackHole. We destroy the aggregate device on top of BlackHole. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
@Pehrsons could you give me the core audio errors/warnings from Console when this happens. On another topic, there's a better way to test adding remove an audio device that doesn't include buggy aggregate devices. Use BlackHole but simulate adding and removing an audio device by setting kAudioBoxPropertyAcquired.
And I recommend not using Aggregates at all since they've only ever caused me problems. Apple unfortunately doesn't seem to care about fixing them.
Unfortunately I've only been able to hit this on Github Actions (where I suppose the biggest difference to my machines is that there's no hardware device to fall back to), and afaik I cannot access any sort of system logs there. I'll try a bit harder locally to see if I can get lucky.
We're seeing similar things re aggregates sadly, thanks for the advice!
I also tried to reproduce on my computer without any luck. The main difference was I didn’t use a hidden aggregate. I’ll try again when I have more time.
Devin On Oct 16, 2023 at 3:04 AM -0700, Andreas Pehrson @.***>, wrote:
Unfortunately I've only been able to hit this on Github Actions (where I suppose the biggest difference to my machines is that there's no hardware device to fall back to), and afaik I cannot access any sort of system logs there. I'll try a bit harder locally to see if I can get lucky. We're seeing similar things re aggregates sadly, thanks for the advice! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Also had / have this issue several times - from brew version - always have to reinstall. Without device aggregation
Any crash logs in terminal?
Devin On Dec 18, 2023 at 12:31 AM -0800, robmimi @.***>, wrote:
Also had / have this issue several times - from brew version - always have to reinstall. Without device aggregation — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
I too have noticed that BlackHole audio devices disappearing while my MacBook sleeps and then wakes up.
Other virtual audio drivers (VB-Cable and SoundDesk) continue to work.
What crash reports do you see?
Are you able to reproduce this?
Devin On Mar 4, 2024 at 7:03 AM -0800, JChin @ Ria Health @.***>, wrote:
I too have noticed that BlackHole audio devices disappearing while my MacBook sleeps and then wakes up. Other virtual audio drivers (VB-Cable and SoundDesk) continue to work. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
No crash reports that I can see. It silently disappears and we only notice that the input (in my case) disappeared and defaulted to the built-in mic.
This happens after the Mac has been idle. Duration is random. Sometimes after a lunch break, sometimes overnight.
NOTE: this has been happening for months now. We thought it was an OS issue, a hardware (USB) issue, and we've tried upgrading all of those without luck. It was recently that I noticed it was only the BlackHole driver that was the common issue and pretty much see it across apps (seen it disappear from Chrome browser, mostly, and sometimes also from OBS)
I haven’t had this happen to me. But if it happens to you regularly then it’s good news, I can have you do a bunch of testing if you’re willing so we can figure this out.
Devin On Mar 4, 2024 at 8:04 AM -0800, JChin @ Ria Health @.***>, wrote:
NOTE: this has been happening for months now. We thought it was an OS issue, a hardware (USB) issue, and we've tried upgrading all of those without luck. It was recently that I noticed it was only the BlackHole driver that was the common issue and pretty much see it across apps (seen it disappear from Chrome browser, mostly, and sometimes also from OBS) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Sure. Glad to help. Let me know what you want me to try.
By the way, I have the issue right now. Blackhole 2ch is not available in Chrome or Google Meet. I have not restarted the Chrome browser or coreaudiod. Blackhole 2ch is still seen in Audio MIDI Setup and OBS, and Zoom.
LadioCast still sees Blackhole devices
AudioPick (Chrome extension) does not see Blackhole (except for the system device, see Audio MIDI setup screenshot).
So it looks like the ones that "disappear" are the ones that are not configured as a system
One more thing I noticed ... the Format for BlackHole changed from 48,000 Hz to 44,100 Hz.
Interesting thing ... the BlackHole 16ch, which is set as default system output was not affected.
Only the other 2 BlackHole devices.
See the attached screencast (no audio).
https://github.com/ExistentialAudio/BlackHole/assets/105073363/62c06254-7afd-4d9f-9b6f-3501a4a7a3e5
in Terminal,
sudo /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod;
WITHOUT restarting Chrome, bought the BlackHole devices back to life within Chrome
Can you search for coreaudiod in console and try to reproduce. I would like to know what the logs are.
Devin On Mar 4, 2024 at 12:15 PM -0800, JChin @ Ria Health @.***>, wrote:
in Terminal, sudo /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod; WITHOUT restarting Chrome, bought the BlackHole devices back to life within Chrome — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
As I've said before I don't know how to reproduce it on demand. It just happens when the MacBook is idle. And how do I get logs from console? I've never done that before.
Open Console (it’s an app, you can find it via Spotlight search). In Console under search type coreaudiod and then press the play button to start. Leave it running and when the issue happens again, stop and send me all the messages. You can select all and copy and paste using keyboard commands.
Devin On Mar 4, 2024 at 12:53 PM -0800, JChin @ Ria Health @.***>, wrote:
As I've said before I don't know how to reproduce it on demand. It just happens when the MacBook is idle. And how do I get logs from console? I've never done that before. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
I am not sure when it crashed, but overnight, the BlackHole drivers are missing again from Chrome:
Here are the console logs, as best I can get:
default 09:21:36.962945-0500 coreaudiod HALC_IOContext_PauseIO(271)
default 09:21:36.970536-0500 coreaudiod HALC_ProxyIOContext::PauseIO: -> 0 0 id:271 called from
Audio MIDI Setup still shows the BlackHole devices BUT it is at 44.100 Hz again for BlackHole 2ch and 64ch. The 16ch one is still on 48,000 Hz
Manually setting them back to 48,000 Hz does not make them show up in Chrome.
I have to run this command in Terminal:
sudo /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod;
before they show up in Chrome again (no need to restart Chrome).
I’m confused.
So they are always in Audio Midi Setup but they disappear from Chrome?
Devin On Mar 6, 2024 at 6:31 AM -0800, JChin @ Ria Health @.***>, wrote:
Audio MIDI Setup still shows the BlackHole devices BUT it is at 44.100 Hz again for BlackHole 2ch and 64ch. The 16ch one is still on 48,000 Hz Manually setting them back to 48,000 Hz does not make them show up in Chrome. I have to run this command in Terminal: sudo /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod; before they show up in Chrome again (no need to restart Chrome). — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Almost always. I would say 95% of the time it is still in Audio MIDI Setup, BUT the bit format would have always changed to 44,100 Hz (different from all the other devices which stays at 48,000 Hz).
What website are you using in Chrome?
Any relevant steps to help reproduce? Everything helps.
Devin On Mar 6, 2024 at 2:21 PM -0800, JChin @ Ria Health @.***>, wrote:
Almost always. I would say 95% of the time it is still in Audio MIDI Setup, BUT the bit format would have always changed to 44,100 Hz (different from all the other devices which stays at 48,000 Hz). — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
I have about 6-8 Chrome windows open with about 50-80 tabs each. So a ton of websites open. And yes I use up almost all 16GB of RAM on this M1 Pro.
The easiest way for me to notice that BlackHole disappeared from Chrome is either when I use meet.google.com or music.youtube.com and my chosen input/output audio channel is not working.
Using the AudioPick extension also shows me what devices are available, and BlackHole disappears from there at the same time. Those are the only common element.s
I have not been able to make the BlackHole devices disappear on command. Even putting the laptop to "sleep" for a minute doesn't do it. But I do notice that over the last several weeks, whenever it "sleeps" (plugged in so it actually wakes up intermittently to check messages) overnight, there is a very good chance that in the morning, the BlackHole devices are not in Chrome and the "format" has changed to 44100 Hz, to mismatch the rest of the system, which is at 48000 Hz.
I believe I've sent you all the screenshots in previous comments, along with the one manual fix. This is the "best" I have. If I come across anything else, I will post it here.
By the way, VB-Cable and SoundDesk Virtual Cable, do not "disappear" or change their format Hz when the BlackHole virtual device does. Not sure if that helps.
FYI. I have tried to reproduce the issue on-demand without much luck. Manually putting the MacBook to sleep for 5 minutes did not make the device disappear. Tried for an hour, it did not disappear.
However, the 2 "non-system" (meaning not designated as default audio output) Blackhole devices will disappear from Chrome each morning when I wake up the MacBook after it has been plugged-in (connected to power) and "asleep" overnight; and the audio format for those 2 "non-system" BlackHole devices changed by itself from 48000 Hz to 44100 Hz. I think the "disappearing from Chrome" issue is caused by some code in the driver that is flipping the format to 44100 Hz which causes it to disappear from Chrome until coreaudiod is restarted.
NOTE: a similar issue happens if I, using Audio MIDI Setup, manually flip the format of any audio device to 44100 Hz, all audio output stops; and then the audio mixer LadioCast needs to be restarted before any audio is heard on speakers or headsets (this is expected because of the mismatch in format bitrate), or we put the format back to 48000 Hz in Audio MIDI Setup.
I hope this helps point in the direction of finding the bug.
You might be on to something. I don’t remember but it’s possible that the sample rate is not being saved after restarting core audio. BlackHole isn’t changing sample rates automatically but maybe when core audio is reset from a restart or from sleep the sample rate reverts to 44.1.
Chrome should really be able to handle changing sample rates. I will look into what happens in BlackHole but I also recommend filling a bug report with Chrome. Are you able to reproduce this issue with other audio devices by changing sample rates?
Devin On Mar 8, 2024 at 7:00 AM -0800, JChin @ Ria Health @.***>, wrote:
FYI. I have tried to reproduce the issue on-demand without much luck. Manually putting the MacBook to sleep for 5 minutes did not make the device disappear. Tried for an hour, it did not disappear. However, the 2 "non-system" (meaning not designated as default audio output) Blackhole devices will disappear from Chrome each morning when I wake up the MacBook after it has been plugged-in (connected to power) and "asleep" overnight; and the audio format for those 2 "non-system" BlackHole devices changed by itself from 48000 Hz to 44100 Hz. I think the "disappearing from Chrome" issue is caused by some code in the driver that is flipping the format to 44100 Hz which causes it to disappear from Chrome until coreaudiod is restarted. NOTE: a similar issue happens if I, using Audio MIDI Setup, manually flip the format of any audio device to 44100 Hz, all audio output stops; and then the audio mixer LadioCast needs to be restarted before any audio is heard on speakers or headsets (this is expected because of the mismatch in format bitrate), or we put the format back to 48000 Hz in Audio MIDI Setup. I hope this helps point in the direction of finding the bug. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
It only happens with BlachHole, not any of the other virtual audio devices.
And I have sent a bug report to Google, their support responded by telling me to report the issue to AudioPick and BlackHole, which is why I ended up here.
lol. It’s always someone else’s fault.
Devin On Mar 8, 2024 at 8:45 AM -0800, JChin @ Ria Health @.***>, wrote:
And I have sent a bug report to Google, their support responded by telling me to report the issue to AudioPick and BlackHole, which is why I ended up here. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Devin, Over the weekend, I changed my default system audio (mic, speaker, alerts) to all non-BlackHole devices. And this morning I noticed that "BlackHole 16ch" was still working but the 2ch and 16ch ones were not (they "disappeared" and the format in Audio MIDI Setup went to 44100 Hz, just like it did every night). I am wondering if the pkg that you have for those 2 are somehow "incorrect". Can you recreate them and send me updated ones to try? Or if you have another configuration (32ch?) that you want me to try, send it to me. At least now, I know how to "restart" BlackHole without restarting the computer or Chrome.
Hi,
I'm using latest blackhole-2ch installed via brew (blackhole-2ch: 0.2.10) on macOS 12.1, MacBook Pro (14-inch, 2021), M1 Pro.
Unfortunately, the blackhole audio device keeps disappearing after some time. Only my script to restart audio helps:
It might be related to Xcode and/or simulator, because I'm using blackhole to redirect input/output from the simulator. Without the blackhole I'm often hearing some strange crackles caused by the simulator, that's why I installed the blackhole.
Could you check this?