ExistentialAudio / BlackHole

BlackHole is a modern macOS audio loopback driver that allows applications to pass audio to other applications with zero additional latency.
GNU General Public License v3.0
15.15k stars 588 forks source link

Blackhole sample rate keeps changing. #524

Closed wojciech-kulik closed 6 months ago

wojciech-kulik commented 2 years ago

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:

sudo kill -9 `ps ax|grep 'coreaudio[a-z]' | awk '{print $1}'`

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?

quantumgolem commented 2 years 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.

swirkes commented 2 years ago

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!

devinroth commented 2 years ago

BlackHole2ch.v0.3.0.pkg.zip Can you try this version and see if it makes any difference.

wojciech-kulik commented 2 years ago

@devinroth I'm using version from brew. Why 0.3.0 is not available there?

swirkes commented 2 years ago

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: @.***>

stewartknapman commented 2 years ago
Screen Shot 2022-06-08 at 3 55 50 PM

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.

devinroth commented 2 years ago

Just release v0.4.0. Should solve this but reopen if you continue to run into issues.

JamesDuncanRobertson commented 1 year ago

Hi. I'm also getting this issue with the release v0.4.0. MacOS Monterey.

michelcrypt4d4mus commented 1 year ago

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.

kovac254 commented 1 year ago

I get the exact same behaviour as described above (M1 MBA, macOS Ventura, v0.5.0). @devinroth, could you please reopen this issue?

devinroth commented 1 year ago

Sure. But I need details. How to reproduce? Any relevant information from Console (logs, crash reports) anything that contains BlackHole.

kovac254 commented 1 year ago

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?

devinroth commented 1 year ago

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: @.***>

Pehrsons commented 1 year ago

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.

devinroth commented 1 year ago

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: @.***>

Pehrsons commented 1 year ago

We don't remove BlackHole. We destroy the aggregate device on top of BlackHole.

devinroth commented 1 year ago

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: @.***>

devinroth commented 1 year ago

@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.

Pehrsons commented 1 year ago

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!

devinroth commented 1 year ago

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: @.***>

robmimi commented 10 months ago

Also had / have this issue several times - from brew version - always have to reinstall. Without device aggregation

devinroth commented 10 months ago

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: @.***>

jchin-ria commented 7 months ago

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.

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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.

jchin-ria commented 7 months ago

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)

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

Sure. Glad to help. Let me know what you want me to try.

jchin-ria commented 7 months ago

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.

jchin-ria commented 7 months ago

LadioCast still sees Blackhole devices

AudioPick (Chrome extension) does not see Blackhole (except for the system device, see Audio MIDI setup screenshot). 2024-03-04_114210_Monosnap 2024-03-04_113948_Audio Devices

jchin-ria commented 7 months ago

So it looks like the ones that "disappear" are the ones that are not configured as a system

Screen Shot 2024-03-04 at 11 46 31 AM
jchin-ria commented 7 months ago

One more thing I noticed ... the Format for BlackHole changed from 48,000 Hz to 44,100 Hz.

image

jchin-ria commented 7 months ago

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

jchin-ria commented 7 months ago

in Terminal, sudo /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod;

WITHOUT restarting Chrome, bought the BlackHole devices back to life within Chrome

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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.

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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 default 09:21:36.970819-0500 coreaudiod HALC_ProxyIOContext::PauseIO: <- 0 1 id:271 default 09:21:36.982083-0500 coreaudiod CAReportingClient.mm:480 stopping ( 50629074485297 ) default 09:21:36.982357-0500 coreaudiod CAReportingClient.mm:508 message { "session_duration" = "1469.303508996964"; }: ( 50629074485297 ) default 09:21:37.001292-0500 coreaudiod IO Stopped Context 4928 after 70517248 frames. default 09:21:37.001389-0500 coreaudiod HALS_IOContext_Legacy_Impl::IOThreadEntry: 4928 10AC41A1-0000-0000-091F-0104B53C2278_00000021 (10AC41A1-0000-0000-091F-0104B53C2278_00000021): stopping with error 0 default 09:21:37.001390-0500 coreaudiod HALB_PowerAssertion::Release: releasing power assertion ID 34656 of type '' with name: '' on behalf of 36793 default 09:21:37.011884-0500 powerd Process coreaudiod.11788 TurnedOff PreventUserIdleSystemSleep "com.apple.audio.10AC41A1-0000-0000-091F-0104B53C2278_00000021.context.preventuseridlesleep" age:00:24:29 id:4295001952 [System: PrevIdle DeclUser kDisp] default 09:21:37.024663-0500 coreaudiod [NodeFormatConverter.cpp:61 rtaid::NodeFormatConverter:0x1186558c0] AudioConverterNew succeeded with incoming format 2 ch, 48000 Hz, Float32, interleaved and outgoing format 2 ch, 48000 Hz, Float32, deinterleaved default 09:21:37.064487-0500 coreaudiod [Detector.cpp:47 rtaid::Detector:0x149c07fd0] initialized with error = 0 default 09:21:37.065243-0500 coreaudiod [Detector.cpp:85 rtaid::Detector:0x149c07fd0] Node |35|Output|36 with nodeID 36 already present, replacing it default 09:21:37.065356-0500 coreaudiod [Detector.cpp:119 rtaid::Detector:0x149c07fd0] Created node |35|Output|36 with nodeID 36 - reporting period = 10.000000, sample rate = 48000.000000 default 09:21:37.066104-0500 coreaudiod [NodeFormatConverter.cpp:61 rtaid::NodeFormatConverter:0x149fb2110] AudioConverterNew succeeded with incoming format 2 ch, 48000 Hz, Float32, interleaved and outgoing format 2 ch, 48000 Hz, Float32, deinterleaved default 09:21:37.066256-0500 coreaudiod [Detector.cpp:47 rtaid::Detector:0x149c07fd0] initialized with error = 0 default 09:21:37.067698-0500 coreaudiod HALC_IOContext_ResumeIO(271) default 09:21:37.067763-0500 coreaudiod HALC_ProxyIOContext::ResumeIO: -> 0 1 id:271 called from default 09:21:37.067775-0500 coreaudiod HALC_ProxyIOContext::ResumeIO: <- 0 0 id:271 default 09:21:37.068083-0500 coreaudiod =================================== default 09:21:37.069034-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: --->>> default 09:21:37.069053-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dIn ' --->>> default 09:21:37.069447-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dIn ' --->>> default 09:21:37.069504-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' --->>> default 09:21:37.069657-0500 coreaudiod HALS_IOContext_Legacy_Impl::IOThreadEntry: 4928 10AC41A1-0000-0000-091F-0104B53C2278_00000021 (10AC41A1-0000-0000-091F-0104B53C2278_00000021): starting default 09:21:37.073091-0500 coreaudiod HALB_PowerAssertion::Take: taking power assertion ID 34656 of type '' with name: '' on behalf of 36793 default 09:21:37.069767-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.074982-0500 coreaudiod CAReportingClient.mm:544 serviceName 9: 50629074485297 default 09:21:37.075546-0500 coreaudiod CAReportingClient.mm:448 starting ( 50629074485297 ) default 09:21:37.075829-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.075869-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.078958-0500 coreaudiod CAReportingClient.mm:508 message { "device_is_aggregate" = 0; "input_num_tap_streams" = 0; "input_scalar_volume" = "1.000000"; "io_buffer_size" = 256; message = StartHardware; "output_avail_phys_formats" = "{ [24/48000/2 lpcm], [20/48000/2 lpcm], [16/48000/2 lpcm] }"; "output_avail_virt_formats" = "{ [32/48000/2 lpcm] }"; "output_bits_per_channel" = 32; "output_bytes_per_frame" = 8; "output_bytes_per_packet" = 8; "output_channels_per_frame" = 2; "output_device_source_list" = Unknown; "output_device_transport_list" = DisplayPort; "output_device_uid_list" = "8_021"; "output_format_id" = lpcm; "output_frames_per_packet" = 1; "output_num_tap_streams" = 0; "output_scalar_volume" = "1.000000"; "sample_rate" = 48000; }: ( 50629074485297 ) default 09:21:37.086222-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' | found preferred[0] 4845: 'SoundDeskCableS_UID'/'' default 09:21:37.086462-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' <<<--- default 09:21:37.086563-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dIn ' <<<--- default 09:21:37.086611-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dIn ' <<<--- default 09:21:37.086632-0500 coreaudiod ----------------------------------- default 09:21:37.086654-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dOut' --->>> default 09:21:37.086674-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dOut' --->>> default 09:21:37.086761-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' --->>> default 09:21:37.092190-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' | found preferred[0] 4647: 'BlackHole16ch_UID'/'' default 09:21:37.092209-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' <<<--- default 09:21:37.092225-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dOut' <<<--- default 09:21:37.092235-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dOut' <<<--- default 09:21:37.092247-0500 coreaudiod ----------------------------------- default 09:21:37.092263-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'sOut' --->>> default 09:21:37.092272-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'sOut' --->>> default 09:21:37.092320-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' --->>> default 09:21:37.097173-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' | found preferred[0] 183: 'BuiltInSpeakerDevice'/'ispk' default 09:21:37.097207-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' <<<--- default 09:21:37.097217-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'sOut' <<<--- default 09:21:37.097223-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'sOut' <<<--- default 09:21:37.097230-0500 coreaudiod ----------------------------------- default 09:21:37.097239-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'shrd' --->>> default 09:21:37.097332-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'shrd' --->>> default 09:21:37.097362-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' --->>> default 09:21:37.098700-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' | found preferred[0] 4647: 'BlackHole16ch_UID'/'' default 09:21:37.098807-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' <<<--- default 09:21:37.098815-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'shrd' <<<--- default 09:21:37.098824-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'shrd' <<<--- default 09:21:37.098851-0500 coreaudiod ----------------------------------- default 09:21:37.098902-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: <<<--- default 09:21:37.098936-0500 coreaudiod =================================== default 09:21:37.103004-0500 coreaudiod CAReportingClient.mm:467 transaction completed 50629074485297 default 09:21:37.169444-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.169706-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.170142-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.270515-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.270968-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.271272-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.309859-0500 coreaudiod HALB_MachPort::ReceiveMessage: mach_msg() returned error 0x10004003: '(ipc/rcv) timed out' default 09:21:37.322763-0500 coreaudiod HALC_IOContext_PauseIO(271) default 09:21:37.322822-0500 coreaudiod HALC_ProxyIOContext::PauseIO: -> 0 0 id:271 called from default 09:21:37.322834-0500 coreaudiod HALC_ProxyIOContext::PauseIO: <- 0 1 id:271 default 09:21:37.324722-0500 coreaudiod CAReportingClient.mm:480 stopping ( 50629074485297 ) default 09:21:37.324769-0500 coreaudiod CAReportingClient.mm:508 message { "session_duration" = "0.2491919994354248"; }: ( 50629074485297 ) default 09:21:37.339374-0500 coreaudiod IO Stopped Context 4928 after 512 frames. default 09:21:37.339550-0500 coreaudiod HALS_IOContext_Legacy_Impl::IOThreadEntry: 4928 10AC41A1-0000-0000-091F-0104B53C2278_00000021 (10AC41A1-0000-0000-091F-0104B53C2278_00000021): stopping with error 0 default 09:21:37.339575-0500 coreaudiod HALB_PowerAssertion::Release: releasing power assertion ID 34656 of type '' with name: '' on behalf of 36793 default 09:21:37.342197-0500 coreaudiod [NodeFormatConverter.cpp:61 rtaid::NodeFormatConverter:0x149fb2110] AudioConverterNew succeeded with incoming format 2 ch, 48000 Hz, Float32, interleaved and outgoing format 2 ch, 48000 Hz, Float32, deinterleaved default 09:21:37.342798-0500 coreaudiod [Detector.cpp:47 rtaid::Detector:0x149c07fd0] initialized with error = 0 default 09:21:37.342914-0500 coreaudiod [Detector.cpp:85 rtaid::Detector:0x149c07fd0] Node |35|Output|36 with nodeID 36 already present, replacing it default 09:21:37.343636-0500 coreaudiod [Detector.cpp:119 rtaid::Detector:0x149c07fd0] Created node |35|Output|36 with nodeID 36 - reporting period = 10.000000, sample rate = 48000.000000 default 09:21:37.344326-0500 coreaudiod [NodeFormatConverter.cpp:61 rtaid::NodeFormatConverter:0x149db3150] AudioConverterNew succeeded with incoming format 2 ch, 48000 Hz, Float32, interleaved and outgoing format 2 ch, 48000 Hz, Float32, deinterleaved default 09:21:37.344624-0500 coreaudiod [Detector.cpp:47 rtaid::Detector:0x149c07fd0] initialized with error = 0 default 09:21:37.345206-0500 coreaudiod HALC_IOContext_ResumeIO(271) default 09:21:37.345252-0500 coreaudiod HALC_ProxyIOContext::ResumeIO: -> 0 1 id:271 called from default 09:21:37.345271-0500 coreaudiod HALC_ProxyIOContext::ResumeIO: <- 0 0 id:271 default 09:21:37.345501-0500 coreaudiod =================================== default 09:21:37.345593-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: --->>> default 09:21:37.345702-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dIn ' --->>> default 09:21:37.345757-0500 coreaudiod HALS_IOContext_Legacy_Impl::IOThreadEntry: 4928 10AC41A1-0000-0000-091F-0104B53C2278_00000021 (10AC41A1-0000-0000-091F-0104B53C2278_00000021): starting default 09:21:37.345721-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dIn ' --->>> default 09:21:37.345858-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.345865-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' --->>> default 09:21:37.346002-0500 coreaudiod CAReportingClient.mm:544 serviceName 9: 50629074485297 default 09:21:37.346076-0500 coreaudiod HALB_PowerAssertion::Take: taking power assertion ID 34656 of type '' with name: '' on behalf of 36793 default 09:21:37.346208-0500 coreaudiod CAReportingClient.mm:448 starting ( 50629074485297 ) default 09:21:37.346450-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.346524-0500 coreaudiod HALS_Device::_GetCombinedVolumeScalar: client 4927 (pid 36793) is not present and has a combined volume scalar is 1.000000 default 09:21:37.346756-0500 coreaudiod CAReportingClient.mm:508 message { "device_is_aggregate" = 0; "input_num_tap_streams" = 0; "input_scalar_volume" = "1.000000"; "io_buffer_size" = 256; message = StartHardware; "output_avail_phys_formats" = "{ [24/48000/2 lpcm], [20/48000/2 lpcm], [16/48000/2 lpcm] }"; "output_avail_virt_formats" = "{ [32/48000/2 lpcm] }"; "output_bits_per_channel" = 32; "output_bytes_per_frame" = 8; "output_bytes_per_packet" = 8; "output_channels_per_frame" = 2; "output_device_source_list" = Unknown; "output_device_transport_list" = DisplayPort; "output_device_uid_list" = "8_021"; "output_format_id" = lpcm; "output_frames_per_packet" = 1; "output_num_tap_streams" = 0; "output_scalar_volume" = "1.000000"; "sample_rate" = 48000; }: ( 50629074485297 ) default 09:21:37.358994-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' | found preferred[0] 4845: 'SoundDeskCableS_UID'/'' default 09:21:37.359015-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dIn ' <<<--- default 09:21:37.359025-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dIn ' <<<--- default 09:21:37.359033-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dIn ' <<<--- default 09:21:37.359040-0500 coreaudiod ----------------------------------- default 09:21:37.359047-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dOut' --->>> default 09:21:37.359055-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dOut' --->>> default 09:21:37.359170-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' --->>> default 09:21:37.360778-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' | found preferred[0] 4647: 'BlackHole16ch_UID'/'' default 09:21:37.360800-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'dOut' <<<--- default 09:21:37.360810-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'dOut' <<<--- default 09:21:37.360816-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'dOut' <<<--- default 09:21:37.360824-0500 coreaudiod ----------------------------------- default 09:21:37.360833-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'sOut' --->>> default 09:21:37.360873-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'sOut' --->>> default 09:21:37.361011-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' --->>> default 09:21:37.361287-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' | found preferred[0] 183: 'BuiltInSpeakerDevice'/'ispk' default 09:21:37.361301-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'sOut' <<<--- default 09:21:37.361315-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'sOut' <<<--- default 09:21:37.361365-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'sOut' <<<--- default 09:21:37.361442-0500 coreaudiod ----------------------------------- default 09:21:37.361454-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'shrd' --->>> default 09:21:37.361471-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'shrd' --->>> default 09:21:37.361525-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' --->>> default 09:21:37.362725-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' | found preferred[0] 4647: 'BlackHole16ch_UID'/'' default 09:21:37.362739-0500 coreaudiod HALS_DefaultDeviceManager::FindPreferredDefaultDevice: 'shrd' <<<--- default 09:21:37.362749-0500 coreaudiod HALS_DefaultDeviceManager::UpdateDefaultDevice: 'shrd' <<<--- default 09:21:37.362756-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: 'shrd' <<<--- default 09:21:37.362762-0500 coreaudiod ----------------------------------- default 09:21:37.362770-0500 coreaudiod HALS_DefaultDeviceManager::CheckForChanges: <<<--- default 09:21:37.362776-0500 coreaudiod =================================== default 09:21:37.363670-0500 coreaudiod CAReportingClient.mm:467 transaction completed 50629074485297 default 09:21:37.372168-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.373176-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.373188-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.473243-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.473797-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.474229-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.574403-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.574376-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.574857-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.681662-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.683254-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.683557-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.796679-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.798058-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.813007-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.898612-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.898730-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:37.913439-0500 coreaudiod Object_GroupPropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.999814-0500 coreaudiod Object_GroupPropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.999814-0500 coreaudiod Object_GroupPropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.015341-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.100701-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.101044-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.116223-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.201607-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.201607-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.216603-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.302018-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.302725-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.327963-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.404853-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004 default 09:21:38.405956-0500 coreaudiod Object_PropertyListener mach message unsuccessful: 0x10000004

jchin-ria commented 7 months ago

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).

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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).

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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.

image

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.

jchin-ria commented 7 months ago

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.

jchin-ria commented 7 months ago

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.

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

It only happens with BlachHole, not any of the other virtual audio devices.

jchin-ria commented 7 months ago

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.

devinroth commented 7 months ago

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: @.***>

jchin-ria commented 7 months ago

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.