Ubuntu / Debian - System-wide equalizer for PulseAudio pulseaudio-equalizer, Firefox resets system volume to 100

For Ubuntu:

Found this tip at:

Do the following:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pulseaudio-equalizer

You then have an application named PulseAudio Equalizer.

For Debian - tested on Debian Jessie 8 (also works for Debian Stretch 9, but it contains it's own equalizer, see a bit down in this document).

The above does currently not work with Debian Jessie 8.

A workaround is the follwing:

Install dependencies:
apt-get install swh-plugins ladspa-sdk python-gnome2

Visit http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/pulseaudio-equalizer/?C=M;O=A

Download the latest package you can find - Ubuntu package pulseaudio-equalizer_2.7.0.2-5~webupd8~xenial0_all.deb worked for Debian Jessie 8 and Debian Stretch 9.

Install this package:
dpkg -i pulseaudio-equalizer_2.7.0.2-5~webupd8~xenial0_all.deb (or the package you downloaded)

Try to enable the equalizer:

pulseaudio-equalizer enable

You now should have the equalizer available in the sound settings as an output and a graphical interface to control it in the program list.

Source: http://forums.debian.net/viewtopic.php?f=6&t=102973

pulseaudio-equalizer - Bug: Muted sound on preset change

Edit the source file script, find the line that begins with PA_CURRENT_VOLUME=$(pacmd list , replace with:

PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left: ' | cut -f1 -d'%' | awk '{print $NF}')

Source: https://bugzilla.redhat.com/show_bug.cgi?id=1046589

Debian Stretch 9 - Native qpaeq - NOTE, due to stuttering sound I don't recommend this, scroll down to next tip.

You can follow the install procedure mentioned for Debian Jessie 8 also on Debian Stretch 9. It does however mark the pulseaudio-equalizer package as held back then.

A more native solution is to use the built in equalizer, source for this:

apt-get install pulseaudio-equalizer

To start it:
pactl load-module module-equalizer-sink
pactl load-module module-dbus-protocol

pacmd list-sinks | grep -e 'name:' -e 'index
to find out the name of the outputs.

pacmd list-sources | grep -e 'name:' -e 'index'
to find name of the inputs.

To load on every boot, edit /etc/pulse/default.pa (or ~/.config/pulse/default.pa) and add this to the end of it:

# set the original source output (if you have two or more soundcards):
pacmd set-default-sink <name of original source output from pacmd list-sinks from above>

# set source (input), optional
pacmd set-default-source <name of original source input from pacmd list-sinks from above>

# enable equalizer
pacmd load-module module-equalizer-sink
pacmd load-module module-dbus-protocol

# set the output to the equalizer
pacmd set-default-sink <name of equalizer output from pacmd list-sinks from above>

Equalizer GUI is started using qpaeq

Debian Stretch 9 - Stuttering sound

I found that the native equalizer produces stuttering sound and did not cope with Winamp in Wine like the old equalizer in Debian Jessie 8 did.

I found this: https://github.com/kernelOfTruth/pulseaudio-equalizer

This is a fork of the 2.7 pulseaudio-equalizer I used in Jessie 8, much better.

So, I installed this instead:

(apt-get install swh-plugins ladspa-sdk python-gnome2)

apt-get purge pulseaudio-equalizer

git clone (the link from github download link)
cd pulseaudio-equalizer
mv ./bin/* /usr/bin/
rm -rf /usr/share/pulseaudio-equalizer
mv ./share/pulseaudio-equalizer /usr/share/
mv ./share/applications/pulseaudio-equalizer.desktop /usr/share/applications/

Then back with the old script to enable it on startup in Startup applications in MATE.

The script (place it somewhere):

sleep 60
# set output to the preferred soundcard
# find your output sink by running: pacmd list-sinks | grep -e 'name:' -e 'index'
# and replace <output-sink> with the name of the sink
pacmd set-default-sink <output sink>
# set source (input) - optional if you want to set the input source too
# find your input sink by running: pacmd list-sources | grep -e 'name:' -e 'index'
# and replace <input sink> with the source you want
pacmd set-default-source <input sink>
# enable equalizer
. /usr/bin/pulseaudio-equalizer enable

In MATE 1.16, go to System -> Personal -> Startup applications and create a new item there.
Fill it with:
Name: Pulseaudio defaults and load equalizer
Command: /bin/bash /path/to/the/file/above.sh &
Comment: Set Pulseaudio defaults and load equalizer

Firefox raises volume to 100% with pulseaudio-equalizer and kernelOfTruth pulseaudio-equalizer

This equalizer which works well in other cases does not work well with Firefox, which raises the system volume to 100% each time a Youtube video is started, jumped around in or volume level is changed.

This is actually a feature coming from Windows called flat volumes and this raises the system (sink) volume with the program volume.

Edit /etc/pulse/daemon.conf and ensure it has:
flat-volumes = no

Restart daemon:
pulseaudio -k

Wait 3 seconds, then:
killall mate-volume-control-applet
killall mate-settings-daemon
mate-volume-control-applet &

Reference 1: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/666
Reference 2: https://www.reddit.com/r/linux/comments/2rjiaa/horrible_decisions_flat_volumes_in_pulseaudio_a/

Another workaround if Firefox is enough is to disable the system wide equalizers and install a Firefox equalizer addon.

Debian 11 - Stuttering sound in pulseaudio-equalizer

Workaround: Disconnect and reconnect to wifi.

Source: https://unix.stackexchange.com/questions/527358/how-do-i-fix-pulseaudio-stuttering

This is a personal note. Last updated: 2022-11-18 14:37:59.








Don't forget to pay my friend a visit too. Joakim