2

When I play audio or video in Firefox, the sound is always louder than when running my other applications (audio payer, video player, sound notifications and alerts)

This is particularly noticeable on reddit, where videos play automatically. When I switch to Firefox and forget to lower the volume, I am bombarded by loud audio.

Is there some mechanism in ALSA, to start Firefox with some audio multiplier ie 0.7, so that audio is proportionally quieter ?

I am using ALSA, without any pulseaudio

2
  • I think we share a somehow similar configuration. (systemd-less, pulse-less…) I therefore presume that you built your firefox from sources (since, if I recall correctly, it is the only way to get other backends than pulse). Would launching firefox via some shell script acceptable ? ( Of the kind calling amixer to lower the volume; calling firefox; calling amixer to restore the volume ) I can elaborate if needed.
    – MC68020
    Commented Mar 7 at 9:01
  • @MC68020 - I actually installed firefox 115 as standard debian package (both on Debian 10 and Debian 12). Would your suggested solution still work ? So to clarify, the Firefox I am using probably has pulse support, but there is no pulse infrastructure installed on my system (no pulse daemon) and also no systemd Commented Mar 7 at 11:02

2 Answers 2

1

Provided the firefox you installed supports alsa as a valid backend (which in the times of my 102 was possible only when building from source, but things might well have changed from what I understand of OP's last comment), I would suggest launching firefox via some simple shell script calling amixer.
Some script of the kind :

amixer -c <your card id> -- sset Master playback 70%
firefox
amixer -c <your card id> -- sset Master playback 100%

Feel free to change the amixer lines for whatever suits you best among the examples given as part of the man page.

Caveats : This wont be efficient if firefox is launched automagically by clicking on some link presented under whatever application (mail / office documents…) but this could be workarounded.

Also it is likely that your firefox will output to alsa default PCM (as defined in some .asoundrc / asound.conf), it is also likely (but you should check) that this default PCM will be of the dmix type (in order to allow other application to concurrently output sound)
In such a configuration, volume will also be reduced for the other concurrent applications including sound notifications while firefox is running.
If this causes concern then fiddling and some magic will be needed in the rewriting of asound.conf. I can elaborate if needed.

0

ALSA doesn't currently offer/support per-app volume settings.

You can give PipeWire a try. It works excellently.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .