You are not logged in.

#1 2021-03-22 10:29:06

luxintra
Member
Registered: 2021-03-22
Posts: 15

[SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

I had a solid working pulse to jack-sink for many months, but recent update has broken my setup.

Output of $ pulseaudio --verbose

I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 14.2
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 2fe3f4b8345b21ddd8a9792f5ff597ee.
I: [pulseaudio] main.c: Session ID is 1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/me/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-14.2/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 MMXEXT
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
I: [pulseaudio] module.c: Loaded "module-native-protocol-unix" (index: #0; argument: "").
I: [pulseaudio] module-jack-sink.c: Successfully connected as 'PulseAudio JACK Sink'
I: [pulseaudio] sink.c: Created sink 0 "jack_out" with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.api = "jack"
I: [pulseaudio] sink.c:     device.description = "Jack sink (PulseAudio JACK Sink)"
I: [pulseaudio] sink.c:     jack.client_name = "PulseAudio JACK Sink"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 0 "jack_out.monitor" with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Jack sink (PulseAudio JACK Sink)"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
I: [pulseaudio] module-jack-sink.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [jack-sink] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [pulseaudio] module-jack-sink.c: JACK buffer size changed.
I: [pulseaudio] module-jack-sink.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [pulseaudio] module-jack-sink.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [pulseaudio] module-jack-sink.c: Connecting PulseAudio JACK Sink:front-left to system:playback_1
I: [pulseaudio] module-jack-sink.c: Connecting PulseAudio JACK Sink:front-right to system:playback_2
I: [pulseaudio] core.c: default_source: (unset) -> jack_out.monitor
I: [pulseaudio] core.c: default_sink: (unset) -> jack_out
I: [pulseaudio] module.c: Loaded "module-jack-sink" (index: #1; argument: "channels=2").
I: [pulseaudio] module-jack-source.c: Successfully connected as 'PulseAudio JACK Source'
I: [pulseaudio] source.c: Created source 1 "jack_in" with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.api = "jack"
I: [pulseaudio] source.c:     device.description = "Jack source (PulseAudio JACK Source)"
I: [pulseaudio] source.c:     jack.client_name = "PulseAudio JACK Source"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [jack-source] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [pulseaudio] module-jack-source.c: JACK thread starting up.
I: [pulseaudio] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 9.
I: [pulseaudio] module-jack-source.c: Connecting PulseAudio JACK Source:front-left to system:capture_1
I: [pulseaudio] module-jack-source.c: Connecting PulseAudio JACK Source:front-right to system:capture_2
I: [pulseaudio] core.c: default_source: jack_out.monitor -> jack_in
I: [pulseaudio] module.c: Loaded "module-jack-source" (index: #2; argument: "channels=2").
I: [pulseaudio] database.c: Successfully opened 'stream-volumes' database file '/home/me/.config/pulse/2fe3f4b8345b21ddd8a9792f5ff597ee-stream-volumes.tdb'.
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #4; argument: "").
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: #5; argument: "").
I: [pulseaudio] core.c: configured_default_sink: (unset) -> jack_out
I: [pulseaudio] core.c: configured_default_source: (unset) -> jack_in
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] module-suspend-on-idle.c: Source jack_in idle for too long, suspending ...
I: [pulseaudio] module-suspend-on-idle.c: Sink jack_out idle for too long, suspending ...
I: [pulseaudio] core.c: We are idle, quitting...
I: [pulseaudio] main.c: Daemon shutdown initiated.
I: [pulseaudio] module.c: Unloading "module-suspend-on-idle" (index: #5).
I: [pulseaudio] module.c: Unloaded "module-suspend-on-idle" (index: #5).
I: [pulseaudio] module.c: Unloading "module-always-sink" (index: #4).
I: [pulseaudio] module.c: Unloaded "module-always-sink" (index: #4).
I: [pulseaudio] module.c: Unloading "module-stream-restore" (index: #3).
I: [pulseaudio] module.c: Unloaded "module-stream-restore" (index: #3).
I: [pulseaudio] module.c: Unloading "module-jack-source" (index: #2).
I: [pulseaudio] core.c: default_source: jack_in -> jack_out.monitor
I: [pulseaudio] source.c: Freeing source 1 "jack_in"
I: [pulseaudio] module.c: Unloaded "module-jack-source" (index: #2).
I: [pulseaudio] module.c: Unloading "module-jack-sink" (index: #1).
I: [pulseaudio] core.c: default_sink: jack_out -> (unset)
I: [pulseaudio] core.c: default_source: jack_out.monitor -> (unset)
I: [pulseaudio] sink.c: Freeing sink 0 "jack_out"
I: [pulseaudio] source.c: Freeing source 0 "jack_out.monitor"
I: [pulseaudio] module.c: Unloaded "module-jack-sink" (index: #1).
I: [pulseaudio] module.c: Unloading "module-native-protocol-unix" (index: #0).
I: [pulseaudio] module.c: Unloaded "module-native-protocol-unix" (index: #0).
I: [pulseaudio] main.c: Daemon terminated.

Below is my audio configuration script that runs from my .xinitrc. It starts jack_control, pulseaudio, non-mixer & carla:

killall -9 non-mixer
killall -9 jackdbus
killall -9 carla
killall -9 pulseaudio
sleep 3
jack_control start &
sleep 3
pulseaudio --start
sleep 3
jack_control ds alsa
jack_control dps device hw:USB
jack_control dps rate 48000
jack_control dps nperiods 3
jack_control dps period 512
sleep 10
pacmd unload-module module-jack-sink
pacmd unload-module module-jack-source
sleep 3

#pulseaudio bridges | in / out

pacmd load-module module-jack-sink channels=2 sink_name=Video-out client_name=Video-out connect=false

pacmd load-module module-jack-source channels=2 source_name=VOIP-in client_name=VOIP-in connect=false
pacmd load-module module-jack-sink channels=2 sink_name=VOIP-out client_name=VOIP-out connect=false

pacmd load-module module-jack-sink channels=2 sink_name=Browser-out client_name=Browser-out connect=false

pacmd load-module module-jack-sink channels=2 sink_name=Music-out client_name=Music-out connect=false

pacmd load-module module-jack-sink channels=2 sink_name=Game-out client_name=Game-out connect=false

pacmd load-module module-jack-sink channels=2 sink_name=Video-Edit-out client_name=Video-Edit-out connect=false

pacmd load-module module-jack-source channels=2 source_name=Record-in client_name=Record-in connect=false

sleep 2
# xdotool search --sync --onlyvisible --name '^Non Mixer$' windowminimize &
#FOR FISH: exec non-mixer --osc-port=15159 "$XDG_LOCAL_HOME/bin/audio-presets/non.mix"
exec "/home/me/.local/bin/wrappers/nonmixer-wrap" &
sleep 2

sleep 3
# xdotool search --sync --onlyvisible --name '^Carla - mypreset2.carxp$' windowclose &
carla "/home/me/.local/bin/audio-presets/carla.presets/mypreset.carxp" &
sleep 10
rm -rf ~/.log &
exit 0

Running the above script with --verbose gives me:

pulseaudio: no process found
--- start
--- driver select "alsa"
--- driver param set "device" -> "hw:USB"
--- driver param set "rate" -> "48000"
--- driver param set "nperiods" -> "3"
--- driver param set "period" -> "512"
The Non-Mixer 1.2.0  -- Copyright (c) 2008-2013 Jonathan Moore Liles
WARNING: LADSPA_PATH environment variable not set
         Assuming /usr/lib/ladspa:/usr/local/lib/ladspa
WARNING: File /usr/lib/ladspa/ladspa-rubberband.cat could not be examined
dlerror() output:
/usr/lib/ladspa/ladspa-rubberband.cat: invalid ELF header
WARNING: Could not open path /usr/local/lib/ladspa/
2 plugins found in 1 libraries
OSC=osc.udp://desktop.localdomain:15159/
WARNING: LADSPA_RDF_PATH environment variable not set
         Assuming /usr/share/ladspa/rdf:/usr/local/share/ladspa/rdf
[non-mixer] Waiting for plugins...
WARNING: Could not open path /usr/local/share/ladspa/rdf/
[non-mixer] Loading "/home/me/.local/bin/audio-presets/non.mix"
[non-mixer] Info: created by = The Non-Mixer 1.2.0
[non-mixer] Info: created on = Mon Feb 20 21:59:17 2017
[non-mixer] Info: version = 1
[non-mixer] Add mixer strip "Video"
X_ChangeProperty: BadValue (integer parameter out of range for operation) 0x0
[non-mixer] Add mixer strip "VOIP"
[non-mixer] Add mixer strip "Browser"
[non-mixer] Add mixer strip "Music"
[non-mixer] Add mixer strip "Video Edit"
[non-mixer] Add mixer strip "Game"
[non-mixer] Add mixer strip "MASTER"
[non-mixer] Add mixer strip "MICROPHONE"
[non-mixer] Loaded project "/home/me/.local/bin/audio-presets/non.mix"
Carla 2.2.0 started, status:
  Python version: 3.9.2
  Qt version:     5.15.2
  PyQt version:   5.15.4
  Binary dir:     /usr/lib/carla
  Resources dir:  /usr/share/carla/resources
Frontend pixel ratio is 1.0
libjack.so.0 loaded successfully!
sorry, can't map this plugin to canvas client 0 0

Below is the contents of "default.pa" in ~/.config/pulse/

load-module module-native-protocol-unix
load-module module-jack-sink channels=2
load-module module-jack-source channels=2
# load-module module-null-sink
load-module module-stream-restore
#load-module module-rescue-streams
load-module module-always-sink
load-module module-suspend-on-idle
set-default-sink jack_out
set-default-source jack_in

Last edited by luxintra (2021-03-23 10:22:20)

Offline

#2 2021-03-23 01:34:19

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

Maybe it is time for me to start transitioning to PipeWire...

Offline

#3 2021-03-23 10:23:20

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

Solved by switching to PipeWire.

Offline

#4 2021-03-24 03:33:17

Donzv
Member
Registered: 2021-03-24
Posts: 2

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

luxintra, could you describe your migration process in as much detail as possible? What packages did you install? What services did you enable? What configs did you edit? I tried to follow the wiki, but ended up with a non-working setup (no sound, no devices, `pactl` in initialization scripts freezing).

Last edited by Donzv (2021-03-24 03:35:34)

Offline

#5 2021-03-24 09:09:05

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

Donzv wrote:

luxintra, could you describe your migration process in as much detail as possible? What packages did you install? What services did you enable? What configs did you edit? I tried to follow the wiki, but ended up with a non-working setup (no sound, no devices, `pactl` in initialization scripts freezing).

I had it working but tinkered with it and broke the alsa connections. Once I fix that I will give you the details no problem.

[EDIT] it broke because I uninstalled the package "alsa-plugins"

Last edited by luxintra (2021-03-25 01:30:56)

Offline

#6 2021-03-25 01:48:09

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

To get PipeWire working on my machine, first I uninstalled most of the packages that I had needed for my original setup.

1. So I uninstalled the following:
lib32-jack2
pulseaudio-jack


2. pipewire-pulse SHOULD automatically replace pulseaudio.
But from memory I had an error so I manually uninstalled pulseaudio using this command (not advised):
$ sudo pacman -Rdd pulseaudio


3. Then I installed the following packages:
pipewire
pipewire-jack
pipewire-alsa
pipewire-pulse
pipewire-media-session
wireplumber (optional)
ncpamixer (For mixing the audio. Some might prefer to use Pavucontrol instead.)
alsa-plugins (was already installed on my system)
jack2 (already installed)


4. Now REBOOT, then run:
$ pactl info

You should see this line:
Server Name: PulseAudio (on PipeWire 0.3.24)


5. Now to get alsa programs to work (like DaVinci Resolve Studio).

I copied the code below from "etc/alsa/conf.d/99-pipewire-default.conf" and pasted into:
~/.config/alsa/asoundrc:

pcm.!default {
    type pipewire
    playback_node "-1"
    capture_node  "-1"
    hint {
        show on
        description "Default ALSA Output (currently PipeWire Media Server)"
    }
}

ctl.!default {
    type pipewire
}

6. To launch specific application with a set buffer size add the following to your
wrapper/launch script:
PIPEWIRE_LATENCY=256/48000

or if running the application from the command line:
$ PIPEWIRE_LATENCY=256/48000 application

Last edited by luxintra (2021-03-26 07:12:32)

Offline

#7 2021-03-25 19:17:10

nixIT
Member
Registered: 2010-01-13
Posts: 448

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

@luxintra,

sound like you and I have a very similar setup. when you were on pulse, were you using qjacktl or cadence to manage jack? I currently use qjackctl and want to switch to pipewire.


ASRock 970 Extreme4  | AMD FX 8350 | 32GB G.SKILL Ripjaw X  | 180GB Corsair Force Series GS SSD | MSI GeForce GTX 960 GTX Gaming 4G 4GB

Offline

#8 2021-03-26 07:11:45

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

nixIT wrote:

@luxintra,

sound like you and I have a very similar setup. when you were on pulse, were you using qjacktl or cadence to manage jack? I currently use qjackctl and want to switch to pipewire.

I was just using jack2 and launching jack in my script with the commands:
jack_control start
jack_control ds alsa
jack_control dps device hw:USB
jack_control dps rate 48000
jack_control dps nperiods 3
jack_control dps period 512

With PipeWire you don't have to worry about all this. Just use my instructions above as a guide. Let me know how you go.

Last edited by luxintra (2021-03-26 07:15:39)

Offline

#9 2021-03-30 14:30:04

Donzv
Member
Registered: 2021-03-24
Posts: 2

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

Thanks @luxintra! I will try to follow this later this week. I got basic sound in the meantime, but not jack2/cadence, and I will need these eventually. Is your setup the one where you run jack apps normally, or the one where you must launch them through a wrapper script?

Offline

#10 2021-03-30 20:35:59

luxintra
Member
Registered: 2021-03-22
Posts: 15

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

Donzv wrote:

Thanks @luxintra! I will try to follow this later this week. I got basic sound in the meantime, but not jack2/cadence, and I will need these eventually. Is your setup the one where you run jack apps normally, or the one where you must launch them through a wrapper script?

Yea Jack apps will just work.

Offline

#11 2021-03-31 14:16:57

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,120

Re: [SOLVED] Pulseaudio & jack-sink - Idle daemon terminated

For what is worth, i'm not having any problem with the following configuration:

koko@slimer# pacman -Q|grep jack
hda-jack-retask-bzr 10-1
jack-rack-git 20130328-2
jack2 1.9.17-2
jack2-dbus 1.9.17-2
jack_capture 0.9.73-8
lib32-jack2 1.9.17-1
pulseaudio-jack 14.2-3
qjackctl-git r1270.c88e08a-1

qjackctl takes care of everything with the help of the following scripts:

koko@slimer# cat /koko/scripts/qjackctl.prestart.sh
#!/bin/bash
sleep 3
jack_control start

koko@slimer# cat /koko/scripts/qjackctl.afterstart.sh 
#!/bin/bash
sh -c "pacmd set-default-sink $(pacmd list-sinks |grep jack_out|cut -d '<' -f 2|cut -d '>' -f 1)"

koko@slimer# cat /koko/scripts/qjackctl.afterstop.sh 
#!/bin/bash
pacmd set-default-sink alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo

Help me to improve ssh-rdp !

Offline

Board footer

Powered by FluxBB