Firefox keeps resetting Pulse volume to 0
I ran into the same problem the other day. It was only affecting YouTube and not other websites. I found there is a volume icon on the window tab on top that suggested that somehow the YouTube tab is muted. Clicking on the muted volume icon, I was able to get sound to work properly after reload. Hope this help others to solve this problem.
After living with it for several days, I deleted my Firefox profile: ~/.mozilla
and started over. Problem solved, the Microsoft™ way!
source
In case someone comes across this question, below is the solution I provided in another post (based on the solution given in Inconsistent Sound Volume Ubuntu 20.04, which deserves credit).
Basically, you need to change flat-volumes = no to flat-volumes = yes. The values "true", "1" and "on" are equivalent to "yes", according to the manpage (https://manpages.ubuntu.com/manpages/focal/man5/pulse-daemon.conf.5.html):
For the settings that take a boolean argument the values true, yes, on and 1 are equivalent, resp. false, no, off, 0.
Don't forged to uncomment the respective line by removing the ";" or "#":
The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # > it ignores the rest of the line until its end.
The configuration file is: /etc/pulse/daemon.conf
Other possible locations are: ~/.config/pulse/daemon.conf, ~/.config/pulse/daemon.conf.d/.conf and /etc/pulse/daemon.conf.d/.conf:
The PulseAudio sound server reads configuration directives from a configuration file on startup. If the per-user file ~/.config/pulse/daemon.conf exists, it is used, otherwise the system configuration file /etc/pulse/daemon.conf is used. In addition to those main files, configuration directives can also be put in files under directories ~/.config/pulse/daemon.conf.d/ and /etc/pulse/daemon.conf.d/.
According to the aforementioned post, rebooting is necessary for the change to take effect.
About the configuration option:
flat-volumes= Enable 'flat' volumes, i.e. where possible let the sink volume equal the maximum of the volumes of the inputs connected to it. Takes a boolean argument, defaults to no.
I just had the very same issue and after some tinkering found it was the 'block audio/video' option responsible. It was set to block audio only, which resulted in video playing but volume being set to 0. Setting it to allow audio and video using the menu next to the padlock in the URL bar fixed it for me. Must have bumped it by accident.
Instead of clearing my entire firefox profile, I found that clearing the cookies and site data for the one site that was resetting the volume to 0 worked just fine:
- Click the lock icon just before URL address (must be on the problem site)
- Click "Clear cookies and site data ..."
- Click the "Remove" button
- No restart needed, but needed to log in to the site again.