Page 1 of 1

Jack Sink and web browsers

Posted: Tue Sep 18, 2018 7:13 am
by thebutant
I use Jack all the time.
And I use Pulse Audio Jack Sink to route non-jack audio to Jack.
So far no problem. Actually just a great setup, I think. It's been working for years.

But suddenly, maybe a week ago, my Jack sink stopped being the default option for web browsers.
Well, what happens is that whenever I play sound from Firefox or Chrome, I need to open pavucontrol and change playback from "Built- Audio Analog Stereo" to "Jack sink". Not only when first opening the browser. If I stop the playback, and change song or video or whatever, the output jumps right back to "Built-in Audio Analog Stereo".

The strange thing is that this change has only happened to web browsers. When playing a song with mpv, for instance, the sound goes straight to Jack sink, just as it used to and just as I wish. No problem, no change.

Can anyone understand what has happened here?

Re: Jack Sink and web browsers

Posted: Tue Sep 18, 2018 10:17 am
by nikgnomicradio
thebutant wrote:I use Jack all the time.
But suddenly, maybe a week ago, my Jack sink stopped being the default option for web browsers.
Did you get an update for Pulseaudio about that time?

If so, suggest delete Pulseaudio cookie

Code: Select all

rm ~/.config/pulse/cookie
Restart PC to get new cookie created
I need to open pavucontrol and change playback from "Built- Audio Analog Stereo" to "Jack sink". Not only when first opening the browser. If I stop the playback, and change song or video or whatever, the output jumps right back to "Built-in Audio Analog Stereo".
Deleting cookie should allow pavucontrol to save choice of playback sink

But check also for correct Pulseaudio default sink

Code: Select all

cat ~/.config/pulse/*default-sink
You would want default set to "Jack sink" and not "Built-in Audio Analog Stereo"
and "Built-in Audio Analog Stereo" as fallback device in pavucontrol Output Devices

Re: Jack Sink and web browsers

Posted: Tue Sep 18, 2018 1:10 pm
by thebutant
nikgnomicradio wrote:You would want default set to "Jack sink" and not "Built-in Audio Analog Stereo"
and "Built-in Audio Analog Stereo" as fallback device in pavucontrol Output Devices
Great, this was really everything I needed to do (even though I also ate the cookie).
It's quite possible that an update simply removed Jacksink from being fallback, and there I was. Lost.
The fallback button really isn't too obvious either. At first I couldn't even find it. But now I'm happy again.

Thanks for your help! :D

Re: Jack Sink and web browsers

Posted: Fri Sep 21, 2018 1:15 pm
by thebutant
thebutant wrote:
nikgnomicradio wrote:You would want default set to "Jack sink" and not "Built-in Audio Analog Stereo"
and "Built-in Audio Analog Stereo" as fallback device in pavucontrol Output Devices
Great, this was really everything I needed to do (even though I also ate the cookie).
It's quite possible that an update simply removed Jacksink from being fallback, and there I was. Lost.
The fallback button really isn't too obvious either. At first I couldn't even find it. But now I'm happy again.

Thanks for your help! :D
Unfortunately, I was a bit too quick in my happiness.
What happens is that by every reboot, "Jack sink" loses its falback setting, and "Built-in Audio Analog Stereo" is set to default.
So it's better than it was, now I can change the fallback at every startup, and the sound will be right for the rest of the session.
But I don't understand how I can make Jack sink stick to default, and not having to deal with this all the time.

Re: Jack Sink and web browsers

Posted: Fri Sep 21, 2018 9:25 pm
by korakios
Could you try opening pavucontrol and on configuration tab ,set every hardware device to "OFF"?
That way pulse will use "dummy" device as default and as soon jackSink starts it will switch automatically ;)

Re: Jack Sink and web browsers

Posted: Sat Sep 22, 2018 8:53 pm
by nikgnomicradio
Find correct names for Pulseaudio sinks:

Code: Select all

pactl list short sinks | cut -f2
Pulseaudio JACK sink default name is usually 'jack_out', so command is usually:

Code: Select all

pacmd set-default-sink jack_out

Command will only work if JACK sink is loaded
korakios wrote:Could you try opening pavucontrol and on configuration tab ,set every hardware device to "OFF"?
That way pulse will use "dummy" device as default and as soon jackSink starts it will switch automatically ;)
I do something similar in CLI, but only change card profile when JACK is running to avoid need of dummy device

commands require card number - if have more than 1 ALSA device, check numbers with

Code: Select all

pactl list short cards
After starting JACK

Code: Select all

pactl set-card-profile 0 off
Before stopping JACK

Code: Select all

pactl set-card-profile 0 output:analog-stereo

Re: Jack Sink and web browsers

Posted: Sat Sep 22, 2018 9:43 pm
by korakios
nikgnomicradio wrote:
korakios wrote:Could you try opening pavucontrol and on configuration tab ,set every hardware device to "OFF"?
That way pulse will use "dummy" device as default and as soon jackSink starts it will switch automatically ;)
I do something similar in CLI, but only change card profile when JACK is running to avoid need of dummy device
Cool, but there is no need to set a 'dummy' audio device. Pulseaudio will just show 'dummy' audio when all other devices are set to off.
If another device (including virtual jacksink) shows up ,it will automatically switch audio to that device :)

Re: Jack Sink and web browsers

Posted: Sun Sep 23, 2018 6:02 pm
by nikgnomicradio
I sometimes want ALSA connection from Pulseaudio when not needing JACK

But if JACK is always running, I would disable 2 Pulseaudio modules:
  • module-udev-detect
  • module-detect
Remove those from ~./.config/pulse/default.pa and No ALSA cards

Re: Jack Sink and web browsers

Posted: Tue Sep 25, 2018 5:26 pm
by thebutant
korakios wrote:Could you try opening pavucontrol and on configuration tab ,set every hardware device to "OFF"?
That way pulse will use "dummy" device as default and as soon jackSink starts it will switch automatically ;)
This is in fact a very simple workaround. Good thinking!
It's what I did in the end.

But I still wonder what happened.
As I wrote in the first post, I've had the same setup for years, and suddenly it just started skipping over to Built-in audio all the time.

Thanks for your help, everyone!