Problem with AVLinux 21 and Jack

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

foodforester1
Established Member
Posts: 34
Joined: Wed May 26, 2021 10:10 pm
Has thanked: 6 times
Been thanked: 1 time

Problem with AVLinux 21 and Jack

Post by foodforester1 »

I have an Acer 5 - i7, 16GB, 512GB and just installed the latest AV MX Linux 21.1 (AV_Linux_MX_Edition-21.1_ahs_x64.iso).

Using Pulseaudio I am able to play videos with the sound perfectly reproduced.

LMMS, Helm and Zynsubaddfx all produce good audio output with PulseAudio running.

When I try to run audio using Jack with Cadence, qjackctl and Carla rack with either Surge XT or Odin2 synths, all sounds are overlaid by loud Noise (white, pink and any other color there is) until after the MIDI controller key has been released. If there is a long release time (adsR) and / or long echos / reverb, the sound improves as it fades.

LMMS, Helm and Zynsubaddfx all produce the same noise overlay when running with Jack.

I have upgraded to the latest in the repos and have reinstalled all jack related software from the repos.

System Info and Troubleshooting done so far:-

AVMX Linux 21 MX Tools Quick System Info Report tells me that I have the following audio setup:

Audio: Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Acer Incorporated ALI
driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel,snd_sof_pci_intel_tgl
bus-ID: 0000:00:1f.3 chip-ID: 8086:a0c8 class-ID: 0401
Sound Server-1: ALSA v: k5.16.0-18.1-liquorix-amd64 running: yes
Sound Server-2: JACK v: 1.9.17 running: yes
Sound Server-3: PulseAudio v: 14.2 running: no

alsamixer tells me that:-
Card: sof-hda-dsp
Chip: Realtek ALC255

lspci | grep audio:-
0000:00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)

Firmware installed to get Audio working:-
$ sudo ls -1 /var/cache/apt/archives/*firmware*
/var/cache/apt/archives/alsa-firmware_1.0.20-1kxstudio1_amd64.deb
/var/cache/apt/archives/firmware-sof-signed_2.0-1~mx21+1_all.deb
The firmware-sof package (above) is the only package to directly mention "Tiger Lake" directly in the description.

Cadence has been set up with Jack ALSA Audio Bridge Type: ALSA -> PulseAudio -> Jack (Plugin) - Always On
Cadence Configuration is as folows:
ALSA: Device/Interface: hw0
Input Device hw:sofhdadsp,0[HDA Analog(*)]
Output Device hw:sofhdadsp,0[HDA Analog(*)]
Input Channels 2
Output Channels 2
All other settings left at default

Changing Cadence configuration to:
Input Device hw:sofhdadsp,0[HDA Digital(*)]
Output Device hw:sofhdadsp,0[HDA Digital(*)]
Results in the logs bwelow.
Logs:
Sat May 7 16:33:18 2022: Released audio card Audio0
Sat May 7 16:33:18 2022: ERROR: Cannot initialize driver
Sat May 7 16:33:18 2022: ERROR: JackServer::Open failed with -1
Sat May 7 16:33:18 2022: ERROR: Failed to open server

Using the various options in QkackCtl for configuring the sound interface results as follows:-
hw:sofhdadsp - Noise overlay on sound
hw:sofhdadsp,0 - Cadence logs as below:-
Logs:-
Sat May 7 17:40:24 2022: Starting jack server...
Sat May 7 17:40:24 2022: ERROR: `default' server already active
Sat May 7 17:40:24 2022: ERROR: Failed to open server
hw:sofhdadsp,1 - Jack logs as below:-
Logs:-
7:44:00.098 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Please, any help would be very gratefully received, thank you.
User avatar
GMaq
Established Member
Posts: 2774
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 520 times
Been thanked: 555 times

Re: Problem with AVLinux 21 and Jack

Post by GMaq »

Hi,

First question... Was it working properly before you installed Cadence? I don't use Cadence or test it, I no longer recommend the KXStudio Repos.. Can you boot the AVL 21.1 Live ISO and see if you have the same problems?
foodforester1
Established Member
Posts: 34
Joined: Wed May 26, 2021 10:10 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Problem with AVLinux 21 and Jack

Post by foodforester1 »

I had done a partclone before I installed kxstudio, so I restored to that version, which had gone through a full update/upgrade.

The reason I installed kxstudio was because I cannot even find a sound card as a standard Live install to HDD.

MX Select Sound returns;-
No sound cards/devices were found.

I also tried from a AV Linux 21.1 Live boot USB created by AVLMX-19 (running on my old laptop) and that gives me the same message, even though the firmware listing the 'Tiger Lake' (firmware-misc-nonfree) is installed on both USB and HDD.

I have since reinstalled all installed packages using Synaptic, so as to refresh any / all the versions that may have been damaged during the read from the install USB(??), but still cannot find any card.

AVMX Linux 21 MX Tools Quick System Info Report tells me that I have the following audio setup:

Audio: Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Acer Incorporated ALI
driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel,snd_sof_pci_intel_tgl
bus-ID: 0000:00:1f.3 chip-ID: 8086:a0c8 class-ID: 0401
Sound Server-1: ALSA v: k5.16.0-18.1-liquorix-amd64 running: yes
Sound Server-2: JACK v: 1.9.17 running: no
Sound Server-3: PulseAudio v: 14.2 running: no

As can be seen above ALSA is running, but jack is not, and even though alsa-utils is installed, alsamixer will not even run - neither CLI nor GUI.

I have Debian 11 installed on a separate partition on the same disk and am able to play mp3 and view & hear mp4 files on that partition through pulseaudio, so the hardware is good, unless there is an incompatibility between this card and the Real Time processing required by AV applications and jack?

I don't know where to go from here.

Are there any audio specific diagnostics I could run to give more clarity?

Is the file AV_Linux_MX_Edition-21.1_ahs_x64.iso the "full install version"? The webpage seems to indicate that there may be a "stripped down version"?
foodforester1
Established Member
Posts: 34
Joined: Wed May 26, 2021 10:10 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Problem with AVLinux 21 and Jack

Post by foodforester1 »

Update!

I have managed to get some sound out of the AV Linux install using the instructions from "Sound card not detected - Ubuntu 20.04 - sof-audio-pci" at https://askubuntu.com/questions/1243369 ... -audio-pci.

"Do:

sudo gedit /etc/default/grub

Change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"

Then do:

sudo update-grub

and Reboot."

I can now see the sound card using 'MX Select Sound' and get it to 'Test the sound' which works.

I can now also play video with sound using pulseaudio.

I can also get some sounds out of both LMMS and Helm, but some sounds are non-existent, crackly or very quite using jack

I have yet to get jack specific applications such as qtractor, with plugins Surge XT and Odin 2 to produce any sound.

At least there is some progress.

I will report back tomorrow once I have tried a few more things.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Problem with AVLinux 21 and Jack

Post by autostatic »

If you have a hw:sofhdadsp device try different period sizes with Jack. I recall that this driver didn't follow the standard when it comes to period sizes, can't find the mail about it that quickly though. But there's a bug report here: https://bugs.launchpad.net/ubuntu/+sour ... ug/1872244
My notebook from work has a similar audio device, seems to work best with a sample rate of 48kHz, a period size of 264 and periods/buffer setting of 2. Lower is not possible on my setup. I also recall that the maintainers of the SOF project (https://thesofproject.github.io/latest/index.html) were going to look into this.

Found the relevant mail thread: https://lists.linuxaudio.org/archives/l ... 13302.html
User avatar
scott.thomason
Established Member
Posts: 120
Joined: Fri Apr 01, 2022 2:54 am
Has thanked: 16 times
Been thanked: 27 times
Contact:

Re: Problem with AVLinux 21 and Jack

Post by scott.thomason »

GMaq wrote: Sat May 07, 2022 7:35 pm ...I no longer recommend the KXStudio Repos.
Why the change in position on kx.studio?
---scott

LinkedIn
User avatar
GMaq
Established Member
Posts: 2774
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 520 times
Been thanked: 555 times

Re: Problem with AVLinux 21 and Jack

Post by GMaq »

scott.thomason wrote: Sun May 08, 2022 1:53 pm
GMaq wrote: Sat May 07, 2022 7:35 pm ...I no longer recommend the KXStudio Repos.
Why the change in position on kx.studio?
It's certainly nothing personal, I'm a big fan of falkTX's work and we correspond occasionally. No drama at all.

KX was in the past a resource for all types of Linux Audio Apps all across the Debian/buntu spectrum but in recent years due to other work and the daunting and thankless task that maintaining such a huge Repository entails falkTX has had to shift focus to his own projects within KX and occasionally some other outside Plugins. This is understandably the most efficient and productive use of his time. This by necessity has left a considerable amount of Programs in a state of not being updated in a very long time and also means many newer projects have not been picked up and added. Essentially this means KXStudio Repo now is a specialized Repo for a relatively small core of Packages.

Moving forward with AV Linux and how I build my ISO's I have to be much more selective of the Repositories I provide and they must be active and secure and it is best for me to remain in MX Linux Repos both for security and to stay closer to using the same core 'chassis and wheels' as MX which makes troubleshooting much easier across the board. AV Linux really doesn't utilize many of the core KX Applications anyway, I've never required Cadence, Claudia etc. and Carla is wonderful but for those using a monolithic DAW+Plugins model (as AV Linux always has) Carla and other outside Plugin hosts are not a 'must have'.

Lastly to be clear... I no longer provide KXStudio Repos as a default within AV Linux. However for those who need the applications that KXStudio Repos provide you can still add them to AV Linux like people have always manually added them to their Debian/buntu systems. I would strongly suggest enabling them getting what you want and disabling them right away though, there is potential for very old Packages to appear as upgrades due the the strong use of 'epochs' in the KXStudio version naming.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Problem with AVLinux 21 and Jack

Post by sunrat »

GMaq wrote: Sun May 08, 2022 2:46 pmLastly to be clear... I no longer provide KXStudio Repos as a default within AV Linux. However for those who need the applications that KXStudio Repos provide you can still add them to AV Linux like people have always manually added them to their Debian/buntu systems. I would strongly suggest enabling them getting what you want and disabling them right away though, there is potential for very old Packages to appear as upgrades due the the strong use of 'epochs' in the KXStudio version naming.
I just posted elsewhere about this earlier. KX repos were originally added using the .deb file on the KX website. I removed the kxstudio-external.list , and commented out the LP-PPA-kxstudio-debian-music as it is deprecated. Created a preferences file which should prevent any unwanted upgrades therefore obviating the necessity to disable the repos, but still allows packages to be installed from there. I named the file /etc/apt/preferences.d/99kxstudio but name is not important, only location and syntax:

Code: Select all

# Never prefer packages from KX repo
Package: *
Pin: release v=18.04
Pin-Priority: 1
And yes, using Cadence and Qjackctl together is definitely problematic. They basically do the same thing so may seriously conflict. I find Qjackctl to be more useful and configurable.
foodforester1
Established Member
Posts: 34
Joined: Wed May 26, 2021 10:10 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Problem with AVLinux 21 and Jack

Post by foodforester1 »

Thank you all for the advice. A few questions arise:-
autostatic wrote: Sun May 08, 2022 1:05 pm My notebook from work has a similar audio device, seems to work best with a sample rate of 48kHz, a period size of 264 and periods/buffer setting of 2. Lower is not possible on my setup. I also recall that the maintainers of the SOF project (https://thesofproject.github.io/latest/index.html) were going to look into this.
Thank you for the advice with different period sizes. I have used 48kHz, a period size of 512 and periods/buffer setting of 2, but intend to fiddle to get the best results.
GMaq wrote: Sun May 08, 2022 2:46 pm I've never required Cadence, Claudia etc. and Carla is wonderful but for those using a monolithic DAW+Plugins model (as AV Linux always has) Carla and other outside Plugin hosts are not a 'must have'.
The reason I liked Carla so much was the new integration of Carla into LMMS, allowing Surge and Odin2 to be brought into LMMS. I haven't tried this yet as my old computer was just not powerful enough. I was able to open Carla and and the Surge interface in LMMS, but by then everything was redlining, so I shut that down.

Is there an equivalent or alternative that you could recommend?
sunrat wrote: Sun May 08, 2022 3:15 pm And yes, using Cadence and Qjackctl together is definitely problematic. They basically do the same thing so may seriously conflict. I find Qjackctl to be more useful and configurable.
The reason I liked Cadence so much was the Bridges configuration of Jack ALSA Audio Bridge Type: ALSA -> PulseAudio -> Jack (Plugin), thus allowing for the playing of training videos (for some of these wonderful music production tools) while working with said wonderful tools - getting the hands dirty while training video is going.

Is there a way to implement the same setup just using Qjackctl?
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Problem with AVLinux 21 and Jack

Post by sunrat »

foodforester1 wrote: Mon May 09, 2022 4:54 amThe reason I liked Carla so much was the new integration of Carla into LMMS, allowing Surge and Odin2 to be brought into LMMS. I haven't tried this yet as my old computer was just not powerful enough. I was able to open Carla and and the Surge interface in LMMS, but by then everything was redlining, so I shut that down.

Is there an equivalent or alternative that you could recommend?
Carla is just a plugin host so shouldn't use much resources by itself. Surge and Odin2 are likely the heavyweights.
sunrat wrote: Sun May 08, 2022 3:15 pm And yes, using Cadence and Qjackctl together is definitely problematic. They basically do the same thing so may seriously conflict. I find Qjackctl to be more useful and configurable.
The reason I liked Cadence so much was the Bridges configuration of Jack ALSA Audio Bridge Type: ALSA -> PulseAudio -> Jack (Plugin), thus allowing for the playing of training videos (for some of these wonderful music production tools) while working with said wonderful tools - getting the hands dirty while training video is going.

Is there a way to implement the same setup just using Qjackctl?
Certainly. Make sure pulseaudio-module-jack is installed and add this to Setup > Options > Execute script after Startup

Code: Select all

pactl load-module module-jack-source channels=2 connect=no & pactl load-module module-jack-sink channels=2 connect=no && a2jmidid -e &
That's what I use, you may want to tweak it a bit. I use a Qjackctl Patchbay profile to connect hence the "connect=no", you can omit that to connect on startup. "& a2jmidid -e &" bridges ALSA MIDI to JACK MIDI to enable keyboards etc. Make sure you leave one final ampersand if you edit it.
You probably will need to set the output of your playback program to PulseAudio Jack Sink in pavucontrol to route it to JACK.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Problem with AVLinux 21 and Jack

Post by LAM »

sunrat wrote: Mon May 09, 2022 7:05 am You probably will need to set the output of your playback program to PulseAudio Jack Sink in pavucontrol to route it to JACK.
You could add this command to set it automatically on Qjackctl startup:

Code: Select all

pactl set-default-sink jack_out

in mix, nobody can hear your screen

User avatar
GMaq
Established Member
Posts: 2774
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 520 times
Been thanked: 555 times

Re: Problem with AVLinux 21 and Jack

Post by GMaq »

LAM wrote: Mon May 09, 2022 8:46 am
sunrat wrote: Mon May 09, 2022 7:05 am You probably will need to set the output of your playback program to PulseAudio Jack Sink in pavucontrol to route it to JACK.
You could add this command to set it automatically on Qjackctl startup:

Code: Select all

pactl set-default-sink jack_out
You could... or people could try things as they are before installing other stuff and RTFM and they would see that Out of the Box AV Linux already has Qjackctl, the PulseAudio Bridges and a custom pajackconnect script set up to run with Qjackctl with the bridges correctly set up and allowing you to route anything to anywhere. Including watching training Videos while you are running your DAW with JACK

The AV Linux User Manual right there in the initial splash screen and in the menu goes into great detail about it on Page 51...

As far as Carla, you don't need to have the entire KX Repos to get the latest stable version, you can simply get it as a KX Studio application here: https://kx.studio/Applications:Carla
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Problem with AVLinux 21 and Jack

Post by LAM »

GMaq wrote: Mon May 09, 2022 1:27 pm You could... or people could try things as they are before installing other stuff and RTFM and they would see that Out of the Box AV Linux already has Qjackctl, the PulseAudio Bridges and a custom pajackconnect script set up to run with Qjackctl with the bridges correctly set up and allowing you to route anything to anywhere. Including watching training Videos while you are running your DAW with JACK
That would be a saner choice. :lol:

Not an AVLinux user but I can confirm that when I tried it worked out-of-the-box.

in mix, nobody can hear your screen

User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Problem with AVLinux 21 and Jack

Post by sunrat »

GMaq wrote: Mon May 09, 2022 1:27 pm You could... or people could try things as they are before installing other stuff and RTFM and they would see that Out of the Box AV Linux already has Qjackctl, the PulseAudio Bridges and a custom pajackconnect script set up to run with Qjackctl with the bridges correctly set up and allowing you to route anything to anywhere. Including watching training Videos while you are running your DAW with JACK
Oops, I forgot about the pajackconnect script in AVL. Wonder why OP felt the need to install Cadence? Did it not work out of the box?
I've seen a few topics at Debian forums about newer Intel audio devices using the SOF driver. Maybe that needs investigating instead.
foodforester1
Established Member
Posts: 34
Joined: Wed May 26, 2021 10:10 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Problem with AVLinux 21 and Jack

Post by foodforester1 »

I get a VLC Error when trying to play training videos while LMMS is playing through Jack using 'as installed' Options tab entries.

Audio output failed:
The audio device "default" could not be used:
Device or resource busy.

Audacious Error "ALSA error: snd_pcm_open failed: Device or resource busy"

QJackCtl Setup -> Options tab entries (an area that I do not fiddle unless specifically instructed):-

Execute script on Startup:
Execute script after Startup: /usr/bin/pajackconnect start && a2jmidid -e &
Execute script on Shutdown: /usr/bin/pajackconnect stop &
Execute script after Shutdown: /usr/bin/pajackconnect reset &

XRUN detection regex: xrun of at least ([0-9|\.]+) msecs

I also tried to change the Execute script on Startup: to 'pactl set-default-sink jack_out'

Unfortunately this did not fix either error.

To add to that, I no longer have any MIDI Controller (controller is detected by ALSA) in the QJackCtl -> Graph, so can't play on the controller keyboard through LMMS.

I then changed the Execute script after Startup: pactl load-module module-jack-source channels=2 connect=no & pactl load-module module-jack-sink channels=2 connect=no && a2jmidid -e &

Unfortunately this did not fix either VLC of Audacious errors and once again, I no longer have any MIDI Controller in the QJackCtl -> Graph, so still can't play on the controller keyboard through LMMS.

I then tried to play a video with only QJackCtl loaded and then went into VLC -> Tools -> Preferences -> Audio and selected Jack audio output in the 'Output module:' list box and saved that config.

Now both Video and LMMS can co-exist and both be heard, but I still do not have my MIDI controller back as a MIDI device. ALSA device yes, but I cannot connect that output to the MIDI input required to control LMMS.

I tried removing both 'connect=no', one at a time and reloaded Qjackctl between each attempt, but still no MIDI controller.

I then take the "Execute script after Startup:" back to the original '/usr/bin/pajackconnect start && a2jmidid -e &'.

With VLC now set to Jack output I have all things functioning, and have substituted 'Cellestica-mpv' as the replacement for Audacious player. Certainly not as sophisticated as Audacious, but functional.

I do own an apology and admission to GMaq. I have to plead 'guilty as charged' as I did NOT RTFM, or look at the Jack -> Setup - Options. I am feeling well chastised.

So thank you all again for all your help.

This issue can now be declared as 'Solved' and closed.
Post Reply