Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-03-25 05:43:56

beroal
Member
Registered: 2013-09-15
Posts: 11
Website

"xfce4-pulseaudio-plugin" changes output device

Hello. I have the following problem with "xfce4-pulseaudio-plugin". I split my 7.1 sound card into 4 2-channel virtual sound cards. The configuration files of PulseAudio are below. Suppose that I am playing music with "Audacious" to the "rear" virtual sound card. When I add "xfce4-pulseaudio-plugin" to the XFCE panel, the output device of "Audacious" shown in "pavucontrol" immediately changes to the "front" virtual sound card, and the music that I hear moves accordingly. If I change the output device back to the "rear" virtual sound card, I hear nothing. The "rear" virtual sound card begins working again only if I restart PulseAudio. So I can't use "xfce4-pulseaudio-plugin" now. Though my configuration may be considered non-standard, I believe that it is perfectly legal.

/etc/systemd/system/pulseaudio-my.service

[Unit]
Description=PulseAudio system-wide
After=avahi-daemon.service
After=sys-subsystem-sound-devices-mb.device
Wants=sys-subsystem-sound-devices-mb.device

[Service]
Type=notify
ExecStart=/usr/bin/pulseaudio --daemonize=no --disallow-exit=yes --system
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

/etc/pulse/system.pa

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started in system
# mode.

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

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.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

### 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

set-card-profile alsa_card.pci-0000_38_00.6 output:analog-surround-71+input:analog-stereo
load-module module-remap-sink sink_name=front sink_properties=device.description=front remix=no master=alsa_output.pci-0000_38_00.6.analog-surround-71 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=rear sink_properties=device.description=rear remix=no master=alsa_output.pci-0000_38_00.6.analog-surround-71 channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=side sink_properties=device.description=side remix=no master=alsa_output.pci-0000_38_00.6.analog-surround-71 channels=2 master_channel_map=side-left,side-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=center_lfe sink_properties=device.description=center_lfe remix=no master=alsa_output.pci-0000_38_00.6.analog-surround-71 channels=2 master_channel_map=front-center,lfe channel_map=front-left,front-right

/etc/pulse/daemon.conf

# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
allow-module-loading = no
; allow-exit = yes
use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = 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-target = syslog
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-0
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no
; flat-volumes = yes

; 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 = 200000

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

default-fragments = 4
; default-fragments = 2
default-fragment-size-msec = 25
; default-fragment-size-msec = 75

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

Offline

#2 2019-04-19 18:49:09

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: "xfce4-pulseaudio-plugin" changes output device

Do the sinks show up on puvucontrol's Output Devices tab? If so, is rear getting muted? The sound icon for rear will be highlighted/selected if it's muted. Click on it to toggle mute.

Offline

#3 2019-04-20 15:11:18

beroal
Member
Registered: 2013-09-15
Posts: 11
Website

Re: "xfce4-pulseaudio-plugin" changes output device

MrEen wrote:

Do the sinks show up on puvucontrol's Output Devices tab?

Yes.

MrEen wrote:

If so, is rear getting muted? The sound icon for rear will be highlighted/selected if it's muted. Click on it to toggle mute.

The "rear" is not muted. If I toggle its mute button, nothing happens.

Offline

#4 2019-04-20 16:30:49

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: "xfce4-pulseaudio-plugin" changes output device

I'm not sure what's going wrong. Can you move the stream successfully via command line? Here's how to try:
Get the stream index

pacmd list-sink-inputs

You may need to figure out which is the correct if there's more than one. Look at "application.process.binary" which I assume will say "audacious"

Assuming the index returned was 123, try moving it with:

pacmd move-sink-input 123 rear

I would assume moving via pavucontrol would've done the same thing, but if not, this may help.

Also, not sure it will be of any use in this scenario, but have you also checked in alsamixer? Sometimes alsamixer mutes things that pavucontrol doesn't show as being muted.

Good luck.

Offline

#5 2019-04-20 16:54:11

beroal
Member
Registered: 2013-09-15
Posts: 11
Website

Re: "xfce4-pulseaudio-plugin" changes output device

"pacmd" does not work because I run PulseAudio in the system-wide mode.

Offline

#6 2019-04-20 17:17:40

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: "xfce4-pulseaudio-plugin" changes output device

beroal wrote:

"pacmd" does not work because I run PulseAudio in the system-wide mode.

Not something I have experience with. But I'm wondering if that's part of the issue, as adding the plugin may be restarting it in user mode?

Offline

#7 2019-04-21 15:58:42

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: "xfce4-pulseaudio-plugin" changes output device

I found another possibility for your issue.

In /etc/pulse/default.pa (user mode) there is this:

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

However, in /etc/pulse/system.pa (system mode) it only had this:

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

Maybe, adding "load-module module-card-restore" to the system.pa file will fix this for you.

Hope that helps.

Offline

Board footer

Powered by FluxBB