Mumble: Mumble's "phone" PulseAudio role causes strange behavior

Created on 13 Nov 2013  路  14Comments  路  Source: mumble-voip/mumble

Reviving http://sourceforge.net/p/mumble/bugs/831/

Because Mumble has a role of "phone" set on PulseAudio, this causes applications with a role of "music" or "video" to be muted when Mumble is active. As an example, if I open Banshee and play music, and then open Mumble, Banshee is muted (and paused). When I close Mumble, playback resumes. I can manually unmute the music stream myself, but any time I open another audio application or change the volume the streams will be re-muted again. This is due to module-role-cork in PulseAudio:

D: [pulseaudio] module-role-cork.c: Using role 'phone' as trigger role.
D: [pulseaudio] module-role-cork.c: Using roles 'music' and 'video' as cork roles.

Cork is designed to mute other streams when a phone role is active, presumably because it would be useful to mute/pause music when a phone call is received.

I would wager that the "phone" role was intended to be used for applications that have an active conversation going (such as Skype or a 1:1 VOIP call), and maybe not necessarily mass voice chat where there isn't constantly people talking.

See http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/ PA_PROP_MEDIA_ROLE for available roles. I know it sounds less correct than "phone," but I would suggest a role of "game" or "production" as those don't have any side-effects.

I understand that this isn't necessarily a "bug" on your part (since the roles aren't very well-defined), but will cause issues on Linux and I feel you need to be made aware of this as more people upgrade to newer versions of Pulse that have this module enabled by default.

The "phone" is set as part of stream initialization: https://github.com/mumble-voip/mumble/blob/master/src/mumble/PulseAudio.cpp#L119

linux

Most helpful comment

For anyone looking for a workaround, you can blacklist module-role-cork in PulseAudio or remove it at runtime:

pacmd unload-module module-role-cork

This disables role-based stream control; you'll want to tweak your PA config in /etc/pulse/default.pa by removing load-module module-role-cork to make this permanent.

All 14 comments

For anyone looking for a workaround, you can blacklist module-role-cork in PulseAudio or remove it at runtime:

pacmd unload-module module-role-cork

This disables role-based stream control; you'll want to tweak your PA config in /etc/pulse/default.pa by removing load-module module-role-cork to make this permanent.

Thanks for the work-around, jpeddicord! This is affecting me on Debian jesse/sid at the moment.

I tried overriding the PA_PROP_MEDIA_ROLE in /usr/share/applications/mumble.desktop by setting "X-PulseAudio-Properties=media.role=game". I also tried "production" and even "event." Unfortunately this setting doesn't seem to have any effect. Audio playback in Rhythmbox is still paused, and the application muted in sound settings, as soon as Mumble launches.

I find it curious that mumble will assert a "phone session" is active even when disconnected from a server. That feels wrong to me.

I'm happy to help out with testing for any possible solutions to this issue.

I think we should just leave out the role, if possible.

Unfortunately, I cannot test whether that breaks things, because my Ubuntu VM doesn't want to receive audio input at the moment.

I can try tinkering with the role on Fedora sometime at least. I can't
imagine why removing the role would break things; it should act like the
many other applications that don't set a role. Interestingly enough, this
situation is the inverse of a bug filed a couple years back:
http://sourceforge.net/p/mumble/bugs/765/

I have created a patch f4fb349d2dd71699ea3056be5db0732358e916ba and I have been using it for some time without any issues.

@mkrautz : concerning your Ubuntu VM, I have been having the same problem with Debian VMs in Virtualbox. I find that using "ALSA" in the VM settings rather than Pulseaudio seems to get around the audio input problem. Counterintuitive but seems to work.

Not sure what "role" Mumble should have for Pulseaudio, but "game" certainly sounds reasonable. I'll try building Mumble with one of the patches in this bug and try it out.

Just tested changing the role from "phone" to "game" -- resulting package seems to work just fine as far as I can tell.

@crknadle Couldn't for the live of me figure out how to get your original patch. Something is very fishy with github in regards to that one. Good thing "rewriting" it wasn't very involved.......

According to documentation, which is:

"music": for music streams from media players
"game": for audio from games
"event": for event sounds (i.e. button clicks, ...)
"phone": for phone data (i.e. voip speech audio)
"animation": for animations (i.e. Flash)
"production": for audio production applications.
"a11y": accessibility applications (i.e. screen readers, ...)`

The media.role should be set to phone, but instead it's set to game.

I know that people don't know how to configure pulseaudio properly, but in the case of the ones that can do it right, there's a problem, because, for instance, I have the following setting:

### Cork music/video streams when a phone stream is active
#load-module module-role-cork
load-module module-role-ducking trigger_roles=phone ducking_roles=music,video,game volume=60%

Which lowers the volume of music, video, and game streams to 60% when phone stream appears.

You are right but nature of group voice chat like mumble is different then typical VoIP. When you are connected to mumble server you can't assume that you are paying full attention to the talk.
In fact there is no good role setting for software like mumble.

Why not? If people don't want this feature (auto mute), they can simply disable it in the pulseaudio config file, and that's the right way to do it.

But they still can have some VoIP phone and may want auto mute. I don't know if there is possibility to turn on/off per program.

There is an option:

$ PULSE_PROP='media.role=phone' mumble

So i think that we should set this role which will make more users happy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jeselnik picture Jeselnik  路  4Comments

Elusivehawk picture Elusivehawk  路  5Comments

Popkornium18 picture Popkornium18  路  3Comments

TalkLounge picture TalkLounge  路  4Comments

bontibon picture bontibon  路  5Comments