Equalizer on Multiseat Setup

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read this

Equalizer on Multiseat Setup

Postby Shillshocked on Wed Jan 22, 2014 11:52 pm

I have been able to get a successful multiseat setup going, and I can install either of two equalizers in single-seat setup, but I cannot figure out how to get any equalizer to work under multiseat.

Here is the standard method. Note the second one should be updated with the correct distro version (in my case, saucy as I am using Mint 16):
http://www.webupd8.org/2013/03/install-pulseaudio-with-built-in-system.html
http://community.linuxmint.com/idea/view/2600

The problem stems from the fact that you have to start pulseaudio in system mode, and in order to load the equalizer you need to run it as a user. Is there any way to get the equalizer to work as well?

Attached is my working sound configuration for multiseat. If somebody can figure out how to make the equalizer work in system mode I (and I'm sure others) would appreciate it.
Attachments
new working mint audio.zip
(14.8 KiB) Downloaded 16 times
Shillshocked
Level 1
Level 1
 
Posts: 11
Joined: Mon Nov 12, 2012 7:58 pm

Linux Mint is funded by ads and donations.
 

Re: Equalizer on Multiseat Setup

Postby Shillshocked on Mon Jan 27, 2014 11:14 am

I've nearly got the kinks ironed out but I need to find a solution to get either qpaeq or pulseaudio-equalizer (or an equivalent) to work reliably.

For anyone who's interested, here is my multiseat config for a Sandy Bridge 2600K with and HD 5850 Asus AMD Radeon. Some options may have been unnecessary, but it works well on Linux Mint 16 (MATE).

You need to change your xorg files to reflect your configuration. Consult the Ubuntu and Arch Linux Multiseat Wikis:
http://help.ubuntu.com/community/MultiseatX
http://wiki.archlinux.org/index.php/xorg_multiseat

/etc/X11/xorg.conf.0:
Code: Select all
Section "ServerLayout"
    Identifier     "Layout0"
    Screen         0  "Screen0" 0 0
    InputDevice    "kbd_0" "CoreKeyboard"
    InputDevice    "mouse_0" "CorePointer"
    Option         "AutoEnableDevices"     "false"
    Option         "AutoAddDevices"        "false"
    Option         "AllowEmptyInput"       "true"
    Option       "DontVTSwitch"          "true"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
    Option         "AutoAddGPU" "FALSE"
EndSection

Section "InputDevice"
    Identifier     "kbd_0"
    Driver       "evdev"
    Option         "Device"        "/dev/input/by-path/pci-0000:00:1a.0-usb-0:1.6:1.0-event-kbd"
    Option         "GrabDevice"    "on"
    Option       "XkbRules" "xorg"
    Option       "XkbModel" "105"
    Option       "XkbLayout" "us"
    Option        "Protocol"      "Standard"
EndSection

Section "InputDevice"
    Identifier     "mouse_0"
    Driver         "evdev"
    Option         "Device"        "/dev/input/by-path/pci-0000:00:1a.0-usb-0:1.5:1.0-event-mouse"
    Option         "GrabDevice"    "on"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    Option      "VendorName" "ATI Proprietary Driver"
    Option      "ModelName" "Generic Autodetecting Monitor"
    Option      "DPMS" "true"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "radeon"
    VendorName     ""
    BoardName      ""
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Device0"
    Monitor    "Monitor0"
    DefaultDepth     24
    SubSection "Display"
       Depth     24
    EndSubSection
EndSection


/etc/X11/xorg.conf.1:
Code: Select all
Section "ServerLayout"
    Identifier     "Layout1"
    Screen         0  "Screen1" 0 0
    InputDevice    "kbd_1" "CoreKeyboard"
    InputDevice    "mouse_1" "CorePointer"
    Option         "AutoEnableDevices"     "false"
    Option         "AutoAddDevices"        "false"
    Option         "AllowEmptyInput"       "true"
    Option       "DontVTSwitch"          "true"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
    Option         "AutoAddGPU" "FALSE"
EndSection

Section "InputDevice"
    Identifier     "kbd_1"
    Driver         "evdev"
    Option         "Device"        "/dev/input/by-path/pci-0000:04:00.0-usb-0:1:1.0-event-kbd"
    Option         "GrabDevice"    "on"
    Option       "XkbRules" "xorg"
    Option       "XkbModel" "105"
    Option       "XkbLayout" "us"
    Option        "Protocol"      "Standard"
EndSection

Section "InputDevice"
    Identifier     "mouse_1"
    Driver         "evdev"
    Option         "Device"        "/dev/input/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0-event-mouse"
    Option         "GrabDevice"    "on"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    Option      "VendorName" "Unknown"
    Option      "ModelName" "Generic Autodetecting Monitor"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "intel"
    VendorName     ""
    BoardName      ""
    BusID          "PCI:0:2:0"
    Screen          0
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


/etc/mdm/mdm.conf:
Code: Select all
[daemon]
DynamicXServers=true
FlexibleXServers=0
VTAllocation=true
DisplayLastLogin=false
SelectLastLogin=false

[greeter]
Greeter=/usr/lib/mdm/mdmlogin
GraphicalTheme=Arc-Brave

[servers]
0=Seat0
1=Seat1

[server-Seat0]
name=Seat0
command=/usr/bin/X -config /etc/X11/xorg.conf.0 -novtswitch -isolateDevice PCI:1:0:0 :0

[server-Seat1]
name=Seat1
command=/usr/bin/X -config /etc/X11/xorg.conf.1 -novtswitch -sharevts -isolateDevice PCI:0:2:0 :1


/etc/init/pulseaudio.conf:
Code: Select all
start on runlevel [2345]
stop on runlevel [016]

expect daemon
respawn

env DISALLOW_MODULE_LOADING=0

env PULSEAUDIO_ARGS=

pre-start exec install -d -m755 -o pulse -g pulse /run/pulse

exec /usr/bin/pulseaudio --system --daemonize --high-priority --log-target=syslog --disallow-exit --disallow-module-loading=$DISALLOW_MODULE_LOADING $PULSEAUDIO_ARGS

post-start script
   if [ -e /var/run/pulse/.esd_auth ]; then
      chown pulse:pulse-access /var/run/pulse/.esd_auth
      chmod 640 /var/run/pulse/.esd_auth
   fi
   if [ -e /var/run/pulse/.pulse-cookie ]; then
      chown pulse:pulse-access /var/run/pulse/.pulse-cookie
      chmod 640 /var/run/pulse/.pulse-cookie
   fi
end script


I installed qpaeq by doing this:
Code: Select all
wget http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/utils/qpaeq -O /tmp/qpaeq
sudo install /tmp/qpaeq /usr/local/bin/
sudo apt-get install python-dbus python-qt4 python-qt4-dbus pulseaudio-utils


We need to load some modules for it but I've already put them in a config file below (the last two lines of system.pa).

To run pulseaudio as a system-wide daemon, we need to edit a few files.

add this to
/etc/init/pulseaudio.conf

start on runlevel [2345]

add these to
/etc/pulse/daemon.conf

daemonize = yes
system-instance = yes
local-server-type = system

add this to
/etc/pulse/client.conf
autospawn = no

We also need to add users to the pulse-access group.

sudo usermod -a -G pulse-access <username>

In /etc/pulse/default.pa state explicitly the access rights:

load-module module-native-protocol-unix auth-group=pulse-access auth-group-enable=1

User access

You can check communication with system daemon as non-root by e.g. pactl -s "unix:/var/run/pulse/native" list.

It is possible to enable automatic connection to local daemon in /etc/pulse/client.conf:

auto-connect-localhost = yes

The users should be able to connect to PA server. All the cons for system-wide daemon become essentially pros, e.g. ability to control volume of other users streams in pavucontrol.

Troubleshooting

It is possible to enable the http interface to PA for debugging in /etc/pulse/default.pa load-module module-http-protocol-tcp and then connect to it at http://localhost:4714/

I did additional changes. You can take out what you find out is unnecessary, but it works at any rate. You must consult the files for the additional changes, and perhaps consult your original system file if it differs in configuration specific to your system.

My final audio config files are below.

/etc/pulse/client.conf:
Code: Select all
; default-sink =
; default-source =
; default-server =
; default-dbus-server =

autospawn = no
; daemon-binary = /usr/bin/pulseaudio
; extra-arguments = --log-target=syslog

; cookie-file =

; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

auto-connect-localhost = yes
; auto-connect-display = no


/etc/pulse/daemon.conf:
Code: Select all
daemonize = yes
; fail = yes
allow-module-loading = yes
allow-exit = yes
; use-pid-file = yes
system-instance = yes
local-server-type = system
; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = speex-float-1
; enable-remixing = yes
; enable-lfe-remixing = no

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000

; default-sample-format = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

default-fragments = 8
default-fragment-size-msec = 10

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0


/etc/pulse/default.pa (this one is probably not needed as its running as system not user, but what the hey):
Code: Select all
# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/linuxmint-login.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/linuxmint-login.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
load-sample-dir-lazy /usr/share/sounds/LinuxMint/stereo

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect use_ucm=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix auth-group=pulse-access auth-group-enable=1

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish
load-module module-http-protocol-tcp

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
#load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Load DBus protocol
#.ifexists module-dbus-protocol.so
#load-module module-dbus-protocol
#.endif

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

load-module module-switch-on-port-available

### Make some devices default
#set-default-sink output
#set-default-source input

### BEGIN: Equalized audio configuration
### Generated from: pulseaudio-equalizer
load-module module-ladspa-sink sink_name=ladspa_output.mbeq_1197.mbeq master= plugin=mbeq_1197 label=mbeq control=20,26.0,23.1,18.1,12.9,9.2,4.9,0,0,0,0,-6.3,-18.1,-24.1,-30.0
set-default-sink ladspa_output.mbeq_1197.mbeq
set-sink-volume  65536
set-sink-mute  0
### END: Equalized audio configuration


/etc/pulse/system.pa:
Code: Select all
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev/hal support)
load-module module-detect
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix auth-group=pulse-access auth-group-enable=1

load-module module-http-protocol-tcp

### Automatically restore the volume of streams and devices
load-module module-stream-restore
load-module module-device-restore

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### Enable positioned event sounds
load-module module-position-event-sounds

load-module module-equalizer-sink
load-module module-dbus-protocol


Reboot. Login on at least one of your newly-configured terminals.

To start the qpaeq equalizer you first need to do this:
sudo pulseaudio --daemon

Then press ALT-F2 and type:
qpaeq

Adjust as necessary, but make sure to right click on the volume icon (or load pavucontrol) and go to sound preferences and change output to: FFT based equalizer on Built-In Audio Analog Stereo. It's real-time, so if you set it up right you should hear the effects. Put in a lot of bass and boost to test it out.

I had mixed success with qpaeq. If it doesn't work out for you, pulseaudio-equalizer (another eq) may help.

Code: Select all
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pulseaudio-equalizer
sudo pulseaudio --system


You can adjust settings via the gui and in the ~/.config/pulse/equalizerrc file manually. This one is not a realtime adjustment so you have to reload it or save each time.

Let me know how if you have any tips on how to tweak it better.

Oh, and if you want better quality sound at the expense of plenty of CPU cycles, try this out -

/etc/asound.conf
Code: Select all
defaults.pcm.rate_converter "samplerate_best"
Shillshocked
Level 1
Level 1
 
Posts: 11
Joined: Mon Nov 12, 2012 7:58 pm

Re: Equalizer on Multiseat Setup

Postby Shillshocked on Mon Jan 27, 2014 11:36 pm

Got qpaeq to work by commenting out:
start on runlevel [2345]

in /etc/init/pulseaudio.conf

My latest -

/etc/init/pulseaudio.conf:
Code: Select all
# System PulseAudio service

description   "System PulseAudio sound server"
author      "Pali Rohár <pali.rohar@gmail.com>"

# uncomment the 'start on' to start pulseaudio in system mode
# (enables the pulseaudio init script - requires that users be in the
# pulse-access group)
# System mode is not the recommended way to run PulseAudio as it has some
# limitations (such as no shared memory access) and could potentially allow
# users to disconnect or redirect each others' audio streams. The
# recommended way to run PulseAudio is as a per-session daemon. For GNOME/KDE/
# Xfce sessions in Ubuntu Lucid/10.04, /etc/xdg/autostart/pulseaudio.desktop
# handles this function of automatically starting PulseAudio on login, and for
# it to work correctly your user must *not* have "autospawn = no" set in
# ~/.pulse/client.conf (or in /etc/pulse/client.conf). By default, autospawn
# is enabled. For other sessions, you can simply start PulseAudio with
# "pulseaudio --daemonize".

# start on runlevel [2345]
stop on runlevel [016]

expect daemon
respawn

# Prevent users from dynamically loading modules into the PulseAudio sound
# server. Dynamic module loading enhances the flexibility of the PulseAudio
# system, but may pose a security risk.
# 0 = no, 1 = yes
#env DISALLOW_MODULE_LOADING=0

# extra arguments to pass to the daemon
#env PULSEAUDIO_ARGS=

pre-start exec install -d -m755 -o pulse -g pulse /run/pulse

# exec /usr/bin/pulseaudio --system --daemonize --high-priority --log-target=syslog --disallow-exit --disallow-module-loading=$DISALLOW_MODULE_LOADING $PULSEAUDIO_ARGS

exec /usr/bin/pulseaudio --system --daemonize --high-priority --log-target=syslog

post-start script
   if [ -e /var/run/pulse/.esd_auth ]; then
      chown pulse:pulse-access /var/run/pulse/.esd_auth
      chmod 640 /var/run/pulse/.esd_auth
   fi
   if [ -e /var/run/pulse/.pulse-cookie ]; then
      chown pulse:pulse-access /var/run/pulse/.pulse-cookie
      chmod 640 /var/run/pulse/.pulse-cookie
   fi
end script


Now to get qpaeq to work, type in a terminal:
Code: Select all
pulseaudio
qpaeq


Then switch to FFT Based Equalizer in Sound Preferences -> Output on each boot.
Shillshocked
Level 1
Level 1
 
Posts: 11
Joined: Mon Nov 12, 2012 7:58 pm

Re: Equalizer on Multiseat Setup

Postby Shillshocked on Sun Feb 02, 2014 4:12 am

For anyone who might be interested, I have gotten HDMI working as well and can select different audio outputs for each source (ie. one for headphone or TV, another one for the speakers so that two can listen to different audio) using pavucontrol. Attached below are my latest config files.

Also, you need to do this in addition if you have an AMD card:
Code: Select all
sudo gedit /etc/default/grub


And change:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1"

Then do:
Code: Select all
sudo update-grub


Also, some tips are in the attached /etc/pulse/system.pa file for how to get PulseAudio and ALSA playing nicely in specific scenarios. In my configuration, virtualbox using PulseAudio works best with no options on udev-detect, but wine works best with tsched=0. I don't recommend using the equalizer in Virtualbox as it tends to mess things up. For Windows in VirtualBox you can just use AC97 and a built-in realtek equalizer (get driver from the realtek website). If you need to use hdmi audio then no option is best (and make sure to select ALSA in virtualbox settings). I imagine a pure ALSA config would be better than pulseaudio as ALSA's old bugs seem to show up mainly when PulseAudio is installed.
Attachments
Multiseat with EQ + HDMI + Multi Audio.zip
(11.2 KiB) Downloaded 17 times
Shillshocked
Level 1
Level 1
 
Posts: 11
Joined: Mon Nov 12, 2012 7:58 pm


Return to Sound, Multimedia, & Codecs

Who is online

Users browsing this forum: No registered users and 6 guests