So Pulseaudio has a built-in equilizer loaded with


According to http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Equalizer, you can control it with the qpaeq GUI.

Is there a way to congfigure PA equilizer on a Xless system (running in session mode) ?

  • 1
    Since there's this python script that creates a GUI interface, it should be easy just to strip it down and using DBus directly.
    – Braiam
    Oct 27, 2014 at 17:07
  • Unfortunately this is way above my knowledge.
    – kursus
    Oct 27, 2014 at 17:50

3 Answers 3


Here's a script, adapteded from qpaeq that comes with Pulseaudio:

#!/usr/bin/env python
# pulse-set-eq
import os,math,sys
import dbus

# Source adapted from utils/qpaeq of PulseAudio

def connect(): # copied from qpaeq
        if 'PULSE_DBUS_SERVER' in os.environ:
            address = os.environ['PULSE_DBUS_SERVER']
            bus = dbus.SessionBus() # Should be UserBus, but D-Bus doesn't implement that yet.
            server_lookup = bus.get_object('org.PulseAudio1', '/org/pulseaudio/server_lookup1')
            address = server_lookup.Get('org.PulseAudio.ServerLookup1', 'Address', dbus_interface='org.freedesktop.DBus.Properties')
        return dbus.connection.Connection(address)
    except Exception as e:
        sys.stderr.write('There was an error connecting to pulseaudio, '
                         'please make sure you have the pulseaudio dbus '
                         'module loaded, exiting...\n')

def get_sink(str):
    return sink

args = sys.argv[1:]
if len(args)<5:
    print("Usage: "+sys.argv[0]+" SINK_NUM CHANNEL_NUM PREAMP_VALUE FREQ1 COEF1 [FREQ2 COEF2...]")

sinknum = args.pop(0);
sink = get_sink(sinknum);


def get_eq_attr(attr):
    return sink_props.Get(eq_iface,attr)


sys.stderr.write('channels %d, sample rate: %f, filter sample rate: %f\n'%
    (nchannels, sample_rate, filter_rate))

channel = int(args.pop(0));
preamp = float(args.pop(0));

freqs = [];
coeffs = [];
while len(args) > 0:
    if len(args)==1:
        sys.stderr.write('Odd number of frequency/amplification arguments (%d)\n'%(len(freqs)*2+1))
    sys.stderr.write('(%s, %s)\n'%(args[0],args[1]))

#sys.stderr.write("freqs: "+str(freqs)+'\n');

freqs = list([int(round(x*filter_rate/sample_rate)) for x in freqs])
#sys.stderr.write("translated freqs: "+str(freqs)+'\n');

freqs = [0]+freqs+[filter_rate//2];
coeffs = [coeffs[0]]+coeffs+[coeffs[-1]];
#sys.stderr.write("proper freqs: "+str(freqs)+'\n');

# for some reason this fixes the types of the arguments to SeedFilter

# set the filter coefficients

Usage :

Get the sink number using pacmd list-sinks, then


Note that it seems the CHANNEL_NUM 0 will correspond to the first channel, 1 to the second, etc., and if you use the actual number of channels (e.g. 2 if you have two channels) it will set the equalization for all channels.

You can check the applied settings anytime using qpaeq.

Prerequisites :

Note that first you want to load the equalizer module as well as the DBus protocol module:

pactl load-module module-dbus-protocol
pactl load-module module-equalizer-sink sink_name=... sink_master=...
pactl set-default-sink ...

Playing with the script

Then make some noise, or music or whatever:

play -n synth pinknoise gain -10

Then call the script with the sink number, the channel index you want the equalizer to apply to, a preamp (scaling) factor, and a list of (frequency, coefficient) pairs. The frequency list doesn't have to be dense, since it is interpolated (see seed_filter in pulseaudio/src/modules/module-equalizer-sink.c) to get the filter coefficients. If you specify the total number of channels as the channel index then the update applies to all channels. Use pacmd list-sinks to get the sink number.

For example, if the sink number is $SINKNUM and it has 2 channels, then this resets the equalizer to all 1's, as you can verify by opening qpaeq:

./pulse-set-eq $SINKNUM 2 1.0    100 1.0

Here 100 Hz is arbitrary; the list needs to be not empty and can't start with zero. The frequencies must be between 0 and 32768 (the maximum for me, not sure if it is configurable, see the filter_rate variable above - this is half that). The script uses the amplification coefficients of the smallest and largest frequencies specified on the command line, for the frequencies below and above these, respectively, so in this case the whole spectrum will be assigned an amplification rate of 1.0. At this setting, the equalizer will leave the signal unchanged (in theory at least).

Be careful not to damage your speakers, but for example you can play around by creating pink noise and setting the equalizer to a spike (at 100x amplification) at a single frequency (500Hz):

./pulse-set-eq $SINKNUM 2 1.0    499 0 500 100 501 0

When I do this, I can hear a discrete succession of tones of different random volumes, all at 500Hz, which I presume are belonging to successive DFT windows in the implementation of the filter. It is somewhat pleasant. Playing music through this filter is amusing. Such a sharp "bandpass" would not be possible using a normal graphical equalizer with no command-line version.

The following example makes a filter that goes up and down in frequency, a bit like a siren. Obviously you have to have some music playing or noise or something to hear the effect.

while true; do
    for i in $(seq 500 10 1500) $(seq 1500 -10 500); do
        ./pulse-set-eq $SINKNUM $NCHAN 1 \
            0 1 $(( $i - 300 )) 1 \
            $i 5 $(( $i + 300 )) 1 \
            32768 1;
  • Since the sink seems to change at each new connection, it is helpful to have an alias or a bash script with pactl load-module module-equalizer-sink && /opt/qpaeq_se $(pacmd list-sinks|grep "*"|awk '{print $NF}') 2 ${EQ_SETTINGS}, witth ${EQ_SETTINGS} the settings you wish. Mar 23, 2021 at 15:42

The pulseaudio equalizer is reading his settings in the user file ~/.config/pulse/equalizerrc

To display it:

cat ~/.config/pulse/equalizerrc

So, as example, to give a value of 10DB on the 5th band of the eq, and directly ear the change:

sed -i '19s/.*/10.0/' ~/.config/pulse/equalizerrc | pulseaudio-equalizer toggle

To explain furthermore, sed will replace all line numbered 19, and will replace it by 10.0 on the config file, then the equalizer is restarted/toggled to get the result.

  • 5
    So this file doesn't seem to exist in my version of pulseaudio (9.0), on my machine you instead have a tdb file equalizer-state.tdb, this can be viewed with tdbtool however the data seems to be in the wonderfully structured form of a 262180 byte array representing a data structure, which looks like it contains both strings and an array of numbers.
    – Att Righ
    Jan 28, 2017 at 19:45

I believe the command is pacmd.


If you go to:


You will find a number of configuration files. You may want to try editing default.conf.

  • 1
    related: pactl.
    – HalosGhost
    Oct 27, 2014 at 17:11
  • 3
    Could you be more specific ? These are the commands to control the whole Pulseaudio system. It doesn't seem to have equalizer related options.
    – kursus
    Oct 27, 2014 at 17:49
  • "Default profile definitions for the ALSA backend of PulseAudio. This is used as fallback for all cards that have no special mapping assigned". This has nothing to do with the question.
    – kursus
    Oct 30, 2014 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.