Disable PulseAudio flat volumes to prevent it from pushing volume level to max

Simo Sorce simo at redhat.com
Tue Sep 22 18:29:48 UTC 2015


On Tue, 2015-09-22 at 09:56 -0400, Matthias Clasen wrote:
> On Tue, 2015-09-22 at 15:51 +0200, Lennart Poettering wrote:
> > On Thu, 17.09.15 20:59, Germano Massullo (germano.massullo at gmail.com)
> > wrote:
> > 
> > > Today I had a scary experience with the audio of my computer.
> > > I was listening to music with Amarok, using my headphones... The
> > > KMix
> > > volume level was ~ 35%. When I logged into a video conference
> > > application, the volume suddenly reached the 100%. I was shocked,
> > > having
> > > the maximum audio level shooted in your ears is a painful
> > > experience.
> > > The conference application that triggered PulseAudio pushing volume
> > > to
> > > maximum level probably should have never asked the system for a
> > > 100%
> > > audio level, but on the other hand, PulseAudio should never allow
> > > an
> > > application to make such sudden changes.
> > > To avoid that, you have to set
> > > flat-volumes = no
> > > in /etc/pulse/daemon.conf
> > 
> > This is a non-sensical request. If an app uses the mixer APIs to set
> > the volume of something to very loud, that's what happens. Flat
> > volumes have nothing to do with that.
> > 
> > I mean, the app you are using shouldn't set the volume like this, and
> > that's the key here. If you turn off flat volumes you win about
> > nothing, you just work around this specific app. Soon the next app
> > will come along and play the same game with the actual device volume,
> > and you won *zero*.
> > 
> > Don't mix flat volumes with misbheaving apps. Turning off flat
> > volumes
> > is a hack around the broken apps at best, and completely pointless..
> 
> For better or worse, misbehaving apps are a reality that is probably
> not going to go away... I think we need to have a volume control
> approach that is at least somewhat tolerant against such apps and has
> some safeguards.

Indeed, sticking your head in the sand and saying it is a misbehaving
app is not a useful answer.

Apps misbehave, its a fact of life, you can deal with it, or not deal
with it, if you do not deal with it you have a bad system that causes
grief.

I disabled flat-volumes long ago for the same reasons people had to in
this thread. Yes in theory I can beg every app to be perfect, but in the
mean time I can't get my ears blasted (or in some cases end up with
un-audible input/output). whatever it is with flat-volumes I could never
figure out what was going on, while w/o flat-volumes it is very simple
as each app is individually either low or high and an app raising its
volume doesn't cause all other apps to disappear never to return ...

Disabling flat-volumes may be a workaround but it works very well
apparently. So something probably needs to be improved in flat-volumes,
and until then it is as good an option to disable it by default.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York



More information about the devel mailing list