You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect Default Desktop Audio device (picks up microphone instead) on profile change or application start #3211
Operating system and version:
Ubuntu Server 18.04 Bionic Beaver
OBS Studio version:
25.0.8 64 bit
Expected Behavior
Upon application start or settings profile change, the default sound device for "Desktop Audio" should be, well, desktop audio on Linux.
Current Behavior
Even while leaving the Device on "Default", the effect of this setting is not necessarily consistent across application and computer restarts.
Upon application start or profile change, microphone input is improperly picked up instead of Desktop Audio in the audio mixer, and the expected ;desktop audio' is almost completely inaudible.
(I couldn't get a log file, but I have two example videos that demonstrate the issue):
On Ubuntu Bionic Beaver 18.04 bit and OBS 25.0.8 64
Plug in an analog audio device
Plug in a USB microphone (USB PnP Audio Device, in my case a FIFINE Studio Condenser T669)
(unknown) have one or more USB microphones and/or audio output devices plugged in after
Start, Restart, or switch profiles on OBS and begin streaming
(unknown) order of steps 4 and 5 or if this is a factor
Successful Reproduction of Issue:
Microphone audio will be picked up instead of Desktop Audio. Expected Desktop Audio will be either completely mute or nearly inaudible.
Additional information
May be related to push to talk and push to mute functionality, but I believe I've been encountering this issue before using these settings.
Your videos do not provide reproduction steps. Also linking a 2 hour video is not very useful nor is a video where you are just playing a game. If you want to link a video, link one where you are specifically replicating the issue and thats it.
"Plug in an analog audio device" An input device? An output device?
Are you saying that this only ever happens when you plug your speakers/headphones/other output device in during the same session?
Given you provide no insight into your PA config its pretty hard to say anything about your setup or potential bug. Provide the log from obs and the output from pacmd info while OBS is targeting the wrong device. But this sounds like a case of your system is misconfigured.
I'm fairly sure this is not related to a system misconfiguration, but is a bug related to how OBS detects and recognizes audio devices on Linux/Ubuntu.
Especially troubling is the fact that the issue resolves itself after changing the OBS "Desktop Audio" device away from and back to "Default". This likely would not be the case if this was a simple system misconfiguration issue.
As far as video not providing reproduction steps, I did not anticipate it being difficult for a reader to watch the first 60 seaconds of a video and read a 5 step list showing how this state was achieved.
(Twitch mutes audio by default, please un-mute and listen of course, due to the nature of the bug.)
If anyone is having trouble with this, I would be more than happy to provide further clarification.
I'm not entirely certain whether the order of devices plugged in or the time of it appears to matter during the use session, but it appears the issue recurs regardless of these variables. It happens most often during the beginning of a use session after restarting the computer or switching settings profiles, independent of which settings profile I use. Hence why I consider this bug reproducible.
If I can catch the issue again, I'll provide some logs.
This issue has occured numerous times to me (including one time where I was having a private conversation on the phone giving my Social Security Number and it was picked up by the 'Desktop Audio' of the stream towards Twitch due to this bug), and I'm pretty certain it's a bug with OBS/Linux that may need some attention.
Without the requested information, it is not possible to replicate the exact conditions. I've tested this numerous times on my Linux test system and cannot replicate the behavior you describe.
When reporting an issue, if the people you are reporting it to are asking for additional information "I don't think this is the problem" is not exactly a great response. We're asking for more information because we aren't able to replicate the issue. If you're unwilling to provide the basic log file and configuration information, then I will close this issue out.
I see this issue as well, using PipeWire 0.3.30 and PulseEffects 5.0.4. I believe this happens with PulseEffects specifically. I'm including context to rationalize that belief.
Relevant information for reproducing the issue:
In PulseEffects, an equalizer effect is on my output and a noise reduction effect is on my input.
In PulseEffects settings "General" tab, "Process All Outputs" and "Process All Inputs" are enabled.
In PulseEffects settings "PipeWire" tab, "Input Effects" and "Output Effects" are both set to "Use Default"
PipeWire default sink is set to "Built-in Audio Analog Stereo".
This is my motherboard's audio output with a 3.5mm jack.
PipeWire default source is set to "Audio Adapter (Unitek Y-247A Mono)".
This is a small USB audio adapter I use for cleaner input.
In OBS settings, "Desktop Audio" is set to "Default".
In OBS settings, "Mic/Auxiliary Audio" is set to "Default".
In pavucontrol "Recording" tab, "OBS Desktop Audio from" is set to "PulseEffects source".
The workaround of manually changing this from "PulseEffects source" to "Monitor of Built-in Audio Analog Stereo" fixes the issue for that particular OBS session.
The issue comes back on any new session of OBS, so the workaround is currently necessary every time OBS starts.
The issue seems obvious to me. My rationale is below.
In OBS settings, "Desktop Audio" being set to "Default" is using "PulseEffects source", which is a microphone-related input source, not a monitor of a sink (output).
Instead, OBS "Desktop Audio" being set to "Default" should use "Monitor of [default sink]". In my case, this is "Monitor of Built-in Audio Analog Stereo".
I just encounted this issue when I went to an "away" scene and went on to discuss a lot of personal things while streaming (just like the OP) never even imagining my "Audio Output Capture" would suddenly decide to pick up my microphone input instead.
I can reproduce this easily:
Create a new Audio Output Capture (Pulseaudio)
Set the device to my Bose speaker (external device)
Turn off the Bose speaker.
The audio source now starts picking microphone input
By the way, if I open the properties of the source, the source then decides to stop picking up microphone input. This is very distressing, and it's a good thing I only started using this setup very recently or who knows how many "hot mic" moments I'd have had like the OP.
This seems like a pretty serious issue to me. Is there anything I can do to help move this issue along?
info: pulse-input: Stopped recording from 'default'
info: pulse-input: Got 11953 packets with 5012022 frames
info: pulse-input: Server name: 'pulseaudio 15.0'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitor'
info: pulse-input: Stopped recording from 'default'
info: pulse-input: Got 6 packets with 882 frames
info: pulse-input: Server name: 'pulseaudio 15.0'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitor'
That Razer device is the microphone by the way. There is no Audio Input Capture in the scene I'm testing this under, and the mic exists in a different scene.
Okay, this is worse than I initially thought. I don't have any Global Audio Devices enabled, and I removed the only instance of Audio Input Capture (PulseAudio) that exists.
Now even with no microphone present in my configuration, the same behavior occurs with one difference: the microphone will STILL keep getting picked up until I select another device under the Properties of the Audio Output Capture dialog. Also, NONE of the devices that can be selected under that dialog, not even "Default", causes the microphone to be picked up the way it does when this bug is triggered.
Okay, so the issue seems to be that upon disconnect of a pulseaudio Output Device, OBS will fallback to whatever the fallback pulseaudio Input Device is, even when using a supposed "Audio Output Capture" source. I confirmed this by switching the fallback device from the USB microphone to my internal laptop microphone. And sure enough...
Perhaps this is related to the noop that is currently the pulseaudio context status change callback. Seems that without checking for an unconnected/failed/terminated context we are defaulting to the pulseaudio behavior of assigning the OBS "Recording" device to the first Input Device fallback. Starting to go beyond my abilities here because of my lack of familiarity with Pulseaudio and OBS codebases. Perhaps also related to #2974
Am I in the ballpark? I wouldn't mind taking a stab at this also, but it could take me ages to get up to speed.
/**
* context status change callback
*
* @todo this is currently a noop, we want to reconnect here if the connection
* is lost ...
*/
static void pulse_context_state_changed(pa_context *c, void *userdata)
{
UNUSED_PARAMETER(userdata);
UNUSED_PARAMETER(c);
pulse_signal(0);
}
It would be infinitely better if we just disabled the Audio Output Source completely when the underlying device is disconnected or lost, instead of allowing pulseaudio to fall us back to a microphone in my opinion. The latter is so stunning, and is likely to get someone in big trouble one day 🤣
If you are using pipewire this is a known bug in their audio routing rules and not an obs bug. As for the information you have provided it again looks like a bug in the audio routing of your audio server but maybe something is being missed in obs.
Your original log shows things working as expected, obs connects to alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitor after the bluez device is lost when configured to connect to the default output device. The pacmd info you provided was incomplete and since you say that you have an input capture in another scene appears possibly unrelated. Note that you show alsa_input which are microphone sources, but obs' log shows it connected to the alsa_output which is a speaker/output device as expected.
Even though the OBS log says that it's connecting to the alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitor when the bluez device is lost, this is not correct and is not happening. Nothing gets logged when the original source is lost and it actually changes to alsa_input.pci-0000_06_00.6.analog-stereo. Also, as part of my testing I disabled ALL microphone related sources and tested with a SINGLE Audio Output source.
As mentioned the device reported by obs is the device it is attempting to connect to. Audio servers are free to feed whatever audio they would like to obs, including audio from devices not requested by obs. Which is what we have observed from pipewire, and why this appears to be an audio server issue based on what obs attempting to do.
Activity
kkartaltepe commentedon Jul 25, 2020
Your videos do not provide reproduction steps. Also linking a 2 hour video is not very useful nor is a video where you are just playing a game. If you want to link a video, link one where you are specifically replicating the issue and thats it.
"Plug in an analog audio device" An input device? An output device?
Are you saying that this only ever happens when you plug your speakers/headphones/other output device in during the same session?
Given you provide no insight into your PA config its pretty hard to say anything about your setup or potential bug. Provide the log from obs and the output from
pacmd infowhile OBS is targeting the wrong device. But this sounds like a case of your system is misconfigured.mkrupczak3 commentedon Jul 25, 2020
Hi @kkartaltepe,
I'm fairly sure this is not related to a system misconfiguration, but is a bug related to how OBS detects and recognizes audio devices on Linux/Ubuntu.
Especially troubling is the fact that the issue resolves itself after changing the OBS "Desktop Audio" device away from and back to "Default". This likely would not be the case if this was a simple system misconfiguration issue.
As far as video not providing reproduction steps, I did not anticipate it being difficult for a reader to watch the first 60 seaconds of a video and read a 5 step list showing how this state was achieved.
(Twitch mutes audio by default, please un-mute and listen of course, due to the nature of the bug.)
If anyone is having trouble with this, I would be more than happy to provide further clarification.
I'm not entirely certain whether the order of devices plugged in or the time of it appears to matter during the use session, but it appears the issue recurs regardless of these variables. It happens most often during the beginning of a use session after restarting the computer or switching settings profiles, independent of which settings profile I use. Hence why I consider this bug reproducible.
If I can catch the issue again, I'll provide some logs.
This issue has occured numerous times to me (including one time where I was having a private conversation on the phone giving my Social Security Number and it was picked up by the 'Desktop Audio' of the stream towards Twitch due to this bug), and I'm pretty certain it's a bug with OBS/Linux that may need some attention.
Fenrirthviti commentedon Jul 25, 2020
Without the requested information, it is not possible to replicate the exact conditions. I've tested this numerous times on my Linux test system and cannot replicate the behavior you describe.
When reporting an issue, if the people you are reporting it to are asking for additional information "I don't think this is the problem" is not exactly a great response. We're asking for more information because we aren't able to replicate the issue. If you're unwilling to provide the basic log file and configuration information, then I will close this issue out.
mkrupczak3 commentedon Jul 26, 2020
Hi, thanks @Fenrirthviti,
Sorry to hear this couldn't be replicated.
I can provide log file and configurations, and will also especially try to snag some logs if I catch this again.
Please keep this issue open for a bit to faccilitate this on my end, and also give me more time to try and catch the issue occurring again.
mkrupczak3 commentedon Jul 26, 2020
It's happening again right now, I'm going to try and get some logs
mkrupczak3 commentedon Jul 26, 2020
@Fenrirthviti @kkartaltepe Here it is:
https://obsproject.com/logs/bphrRvlH2GUuEJko
kkartaltepe commentedon Jul 26, 2020
"and the output from pacmd info"
kkartaltepe commentedon Jul 26, 2020
And to clarify you actually did the fix in the log you provided? (reselected default and it selected the right output?)
mkrupczak3 commentedon Jul 26, 2020
https://gist.github.com/mkrupczak3/f547b83622f9336ce2c2d883d91d2cd0
mkrupczak3 commentedon Jul 26, 2020
Did not clarify in the log that I provided, because it was just the one that my client made available automagically.
kkartaltepe commentedon Jul 26, 2020
Let me rephase the question.
During the session where you uploaded the log, did you reselect the default audio device to get it to select the correct device?
mkrupczak3 commentedon Jul 26, 2020
No
mkrupczak3 commentedon Jul 26, 2020
My OBS crashed before I was able to do that
mkrupczak3 commentedon Jul 26, 2020
Should I upload another log if I am able to do that?
mkrupczak3 commentedon Jul 26, 2020
Log file of the application while performing correctly expected behavior:
https://obsproject.com/logs/mk4RbT663xdrYvMO
5 remaining items
BujuArena commentedon Jun 21, 2021
I see this issue as well, using PipeWire 0.3.30 and PulseEffects 5.0.4. I believe this happens with PulseEffects specifically. I'm including context to rationalize that belief.
Relevant information for reproducing the issue:
pavucontrol"Recording" tab, "OBS Desktop Audio from" is set to "PulseEffects source".The issue seems obvious to me. My rationale is below.
fatalgoth commentedon Mar 11, 2022
I just encounted this issue when I went to an "away" scene and went on to discuss a lot of personal things while streaming (just like the OP) never even imagining my "Audio Output Capture" would suddenly decide to pick up my microphone input instead.
I can reproduce this easily:
By the way, if I open the properties of the source, the source then decides to stop picking up microphone input. This is very distressing, and it's a good thing I only started using this setup very recently or who knows how many "hot mic" moments I'd have had like the OP.
This seems like a pretty serious issue to me. Is there anything I can do to help move this issue along?
fatalgoth commentedon Mar 11, 2022
Here's relevant annotated log information from running obs with --debug:
Selected Bose Speaker in "Properties" of Audio Output Capture -->
Turned off Bose Speaker -->
Microphone input is now captured. No log output.
Clicked "Properties" of Audio Output Capture (microphone stops getting picked up) -->
That Razer device is the microphone by the way. There is no Audio Input Capture in the scene I'm testing this under, and the mic exists in a different scene.
fatalgoth commentedon Mar 11, 2022
Okay, this is worse than I initially thought. I don't have any Global Audio Devices enabled, and I removed the only instance of Audio Input Capture (PulseAudio) that exists.
Now even with no microphone present in my configuration, the same behavior occurs with one difference: the microphone will STILL keep getting picked up until I select another device under the Properties of the Audio Output Capture dialog. Also, NONE of the devices that can be selected under that dialog, not even "Default", causes the microphone to be picked up the way it does when this bug is triggered.
fatalgoth commentedon Mar 11, 2022
Here's relevant
pacmd infowhen this behavior is occuring:And when it's not occuring:
fatalgoth commentedon Mar 11, 2022
Okay, so the issue seems to be that upon disconnect of a pulseaudio Output Device, OBS will fallback to whatever the fallback pulseaudio Input Device is, even when using a supposed "Audio Output Capture" source. I confirmed this by switching the fallback device from the USB microphone to my internal laptop microphone. And sure enough...
fatalgoth commentedon Mar 11, 2022
Perhaps this is related to the noop that is currently the pulseaudio context status change callback. Seems that without checking for an unconnected/failed/terminated context we are defaulting to the pulseaudio behavior of assigning the OBS "Recording" device to the first Input Device fallback. Starting to go beyond my abilities here because of my lack of familiarity with Pulseaudio and OBS codebases. Perhaps also related to #2974
Am I in the ballpark? I wouldn't mind taking a stab at this also, but it could take me ages to get up to speed.
It would be infinitely better if we just disabled the Audio Output Source completely when the underlying device is disconnected or lost, instead of allowing pulseaudio to fall us back to a microphone in my opinion. The latter is so stunning, and is likely to get someone in big trouble one day 🤣
kkartaltepe commentedon Mar 11, 2022
If you are using pipewire this is a known bug in their audio routing rules and not an obs bug. As for the information you have provided it again looks like a bug in the audio routing of your audio server but maybe something is being missed in obs.
Your original log shows things working as expected, obs connects to
alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitorafter the bluez device is lost when configured to connect to the default output device. Thepacmd infoyou provided was incomplete and since you say that you have an input capture in another scene appears possibly unrelated. Note that you showalsa_inputwhich are microphone sources, but obs' log shows it connected to thealsa_outputwhich is a speaker/output device as expected.fatalgoth commentedon Mar 12, 2022
Even though the OBS log says that it's connecting to the
alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC2038L01301725-00.analog-stereo.monitorwhen the bluez device is lost, this is not correct and is not happening. Nothing gets logged when the original source is lost and it actually changes toalsa_input.pci-0000_06_00.6.analog-stereo. Also, as part of my testing I disabled ALL microphone related sources and tested with a SINGLE Audio Output source.I've attached a video for demonstration:
https://www.youtube.com/watch?v=Qk8K47ZcK04
kkartaltepe commentedon Mar 12, 2022
As mentioned the device reported by obs is the device it is attempting to connect to. Audio servers are free to feed whatever audio they would like to obs, including audio from devices not requested by obs. Which is what we have observed from pipewire, and why this appears to be an audio server issue based on what obs attempting to do.
linux-pulseaudio: Use DONT_MOVE for non-default devices
linux-pulseaudio: Use DONT_MOVE for non-default devices
linux-pulseaudio: Use DONT_MOVE for non-default devices