No Jack or 48KHz Alsa

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
finotti
Established Member
Posts: 527
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 85 times
Been thanked: 23 times

No Jack or 48KHz Alsa

Post by finotti »

I am having some weird problems with my Focusrite 2i2 (gen 2) in my Debian Sid/Unstable desktop.

First, I cannot start jack anymore:

Code: Select all

 jack_control start
--- start
DBus exception: org.jackaudio.Error.Generic: Failed to open server
I killed puslseaudio, which seems to automatically restart again. Here is the jack log for the two attempts:

Code: Select all

$ tail -f ~/.log/jack/jackdbus.log
Mon Aug  1 07:05:08 2022: ERROR: 

ATTENTION: The playback device "hw:USB,0" is already in use. The following applications  are using your soundcard(s) so you should  check them and stop them as necessary before  trying to start JACK again:

pulseaudio (process ID 6279)

Mon Aug  1 07:05:08 2022: Released audio card Audio0
Mon Aug  1 07:05:08 2022: ERROR: Cannot initialize driver
Mon Aug  1 07:05:08 2022: ERROR: JackServer::Open failed with -1
Mon Aug  1 07:05:08 2022: ERROR: Failed to open server
Mon Aug  1 07:08:23 2022: Starting jack server...
Mon Aug  1 07:08:23 2022: JACK server starting in realtime mode with priority 10
Mon Aug  1 07:08:23 2022: self-connect-mode is "Don't restrict self connect requests"
Mon Aug  1 07:08:23 2022: Acquired audio card Audio0
Mon Aug  1 07:08:23 2022: creating alsa driver ... hw:USB,0|hw:USB,0|1024|3|44100|0|0|nomon|swmeter|-|32bit
Mon Aug  1 07:08:23 2022: ERROR: 

ATTENTION: The playback device "hw:USB,0" is already in use. The following applications  are using your soundcard(s) so you should  check them and stop them as necessary before  trying to start JACK again:

pulseaudio (process ID 9872)

Mon Aug  1 07:08:23 2022: Released audio card Audio0
Mon Aug  1 07:08:23 2022: ERROR: Cannot initialize driver
Mon Aug  1 07:08:23 2022: ERROR: JackServer::Open failed with -1
Mon Aug  1 07:08:23 2022: ERROR: Failed to open server
I cannot run Ardour with alsa at 48kHz either (it doesn't even give me that option), but I can run it at 44.1kHz...

Code: Select all

$ Ardour6 
Ardour6.9.0 (built using 6.9 and GCC version 6.3.0 20170516)
Ardour: [INFO]: Your system is configured to limit Ardour to 524288 open files
Ardour: [INFO]: Loading system configuration file /opt/Ardour-6.9.0/etc/system_config
Ardour: [INFO]: Loading user configuration file /home/finotti/.config/ardour6/config
Ardour: [INFO]: CPU vendor: GenuineIntel
Ardour: [INFO]: AVX-capable processor
Ardour: [INFO]: AVX with FMA capable processor
Ardour: [INFO]: CPU brand: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
Ardour: [INFO]: Using AVX and FMA optimized routines
Ardour: [INFO]: Loading plugin meta data file /opt/Ardour-6.9.0/share/plugin_metadata/plugin_tags
Ardour: [INFO]: Loading plugin meta data file /home/finotti/.config/ardour6/plugin_metadata/plugin_tags
Ardour: [INFO]: Loading plugin statistics file /home/finotti/.config/ardour6/plugin_metadata/plugin_stats
Cannot xinstall SIGPIPE error handler
Ardour: [INFO]: Loading 2 MIDI patches from /home/finotti/.config/ardour6/patchfiles
Ardour: [INFO]: Loading default ui configuration file /opt/Ardour-6.9.0/etc/default_ui_config
Ardour: [INFO]: Loading user ui configuration file /home/finotti/.config/ardour6/ui_config
Ardour: [INFO]: Loading 452 MIDI patches from /opt/Ardour-6.9.0/share/patchfiles
Ardour: [INFO]: Loading color file /home/finotti/.config/ardour6/themes/xcolors-ardour.colors
Ardour: [INFO]: Loading ui configuration file /opt/Ardour-6.9.0/etc/clearlooks.rc
Ardour: [INFO]: Loading bindings from /home/finotti/.config/ardour6/ardour.keys
Loading ui configuration file /opt/Ardour-6.9.0/etc/clearlooks.rc
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
ALSA: Cannot open device 'hw:USB,0': Device or resource busy
[snip]
I could run it without problem not too long ago (maybe two weeks).

Any ideas or suggestions?
finotti
Established Member
Posts: 527
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 85 times
Been thanked: 23 times

Re: No Jack or 48KHz Alsa

Post by finotti »

After further investigations, I could finally stop pulseaudio, which allowed me to start jack or Ardour at 48kHz.

Even tough I had a "autospawn = no" in my pulseaudio client.conf, it would automatically restart. I had to use

Code: Select all

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
(as user) to stop it, as suggested here.

Now, this is still strange, as I never had to stop pulseaudio before. Does anyone know if there were any recent changes in Debian Sid/Unstable that could have cause that? It would be more convenient to not have to manually stop pulseaudio every time I need to run Ardour or Jack...
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: No Jack or 48KHz Alsa

Post by bluzee »

Check for any applications open that are using pulse audio. Sometimes screen readers or something odd might get started in the background. They could keep pulse from timing out and releasing the device.

Personally I set pulse audio to be off for my usb device and only allow it to run on my built-in device. I never have a problem starting jack that way.
finotti
Established Member
Posts: 527
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 85 times
Been thanked: 23 times

Re: No Jack or 48KHz Alsa

Post by finotti »

It doesn't seem like anything is running. Even pavucontrol shows nothing using sound. It seems the Pulse Audio itself is keeping Jack from starting. And the problem persists...
User avatar
nikgnomicradio
Established Member
Posts: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: No Jack or 48KHz Alsa

Post by nikgnomicradio »

D-Bus should be negotiating the release of your audio interface from PulseAudio for use in JACK
I had a similar problem with D-Bus about 3 years ago because of a minor code error and had to find the scripts from Archwiki I used before D-Bus
https://wiki.archlinux.org/title/PulseA ... pt_method

PulseAudio does not have to be stopped to allow JACK to use an audio device.
PulseAudio server can be suspended with this command:

Code: Select all

pacmd suspend 1
PulseAudio may de-suspend automatically after JACK is started so a command to turn off suspend (change the 1 to 0) may not be needed

But the suggestion to change PulseAudio profile to Off is a better option because it does not leave a zombie sink connection to the device used in JACK. That connection will choke audio playback of any audio stream that connects to it

This command will show the active card profiles with most of the command needed to change profile back after JACK is stopped

Code: Select all

pacmd dump | grep card-profile
just add `pactl` before the line relevant to the JACK device (pactl set-card-profile [card name] [profile])
For the JACK pre-start command change the [profile] to Off
finotti
Established Member
Posts: 527
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 85 times
Been thanked: 23 times

Re: No Jack or 48KHz Alsa

Post by finotti »

Just FYI: just as it started to happen, it went away... I have no problems anymore, despite not having taken any action, except regular system updates.

But then again, this is Debian Sid/Unstable, and things like this happen from time to time...
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: No Jack or 48KHz Alsa

Post by j_e_f_f_g »

It's probably Pipewire's emulation of PulseAudio that is routinely breaking things.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Post Reply