Alpine Linux struggling toward a

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

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: Alpine Linux struggling toward a

Post by autostatic »

beate wrote: Wed Feb 14, 2024 4:08 pm

unfortunately not accessible anymore.

What is not accessible anymore?

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: Alpine Linux struggling toward a

Post by autostatic »

beate wrote: Wed Feb 14, 2024 6:27 pm

b) two USB devices. I learnt that one plays the role of a master to which the 2nd has to be synchronised via resampling.

You mean word clock? I don't thing the Allen & Heaths devices support that. If you want to use two USB interfaces without word clock you might want to read up on https://ardour.org/faq.html#say-no-to-usb

beate wrote: Wed Feb 14, 2024 6:27 pm

Is there any advantage in using jack?

Depends on your workflow. If you don't use a modular audio software setup and the software you intend to use supports ALSA then JACK has no real advantages.

beate wrote: Wed Feb 14, 2024 6:27 pm

JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -r -dalsa -dhw:CODEC -r48000 -p256 -n2
this is for one of the 2 channel USB interfaces.

I did not find a way to start this with qjackctl. I am not sure, but possibly this is caused by the need of the environment variable JACK_NO_AUDIO_RESERVATION correctly set.
But i am completly unexperienced with using jack.

Why do you need JACK_NO_AUDIO_RESERVATION?

beate wrote: Wed Feb 14, 2024 6:27 pm

Anyway, I can start ardour7. It does successfully connect to the jack daemon. And it seems to be able to record those 2 tracks correctly. Furthermore, hydrogen sends its output nicely to the internal sound card. Fine.

If this is on one single machine then you'll need JACK to connect Ardour and Hydrogen. Or you could take a look at a plugin that loads Hydrogen drumkits like Drumlabooh: https://github.com/psemiletov/drumlabooh Then you could run everything inside Ardour and just use ALSA.

beate wrote: Wed Feb 14, 2024 6:27 pm

What about playback? At least in connection with the Alesis mixer i would like to route playback not through its USB interface (which is unusable for playback into the mixer), but instead to the internal sound card (which has dmix configured).

So you want to use two USB interfaces for recording and the internal sound card for playback? That's theoretically possible but I'd recommended against it. It will get very complex, error prone and won't be very stable and reliable.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

Thanks.

Quick answer to one of Your remarks.
More later.
When i start jack without JACK_NO_AUDIO_RESERVATION i get the following result:

bea:~$ /usr/bin/jackd -r -dalsa -dhw:CODEC -r4800 -p256 -n2
jackdmp 1.9.22
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2023 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in non-realtime mode
self-connect-mode is "Don't restrict self connect requests"
Failed to connect to session bus for device reservation: /usr/bin/dbus-launch terminated abnormally without any error message

To bypass device reservation via session bus, set JACK_NO_AUDIO_RESERVATION=1 prior to starting jackd.

Audio device hw:CODEC cannot be acquired...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server

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: Alpine Linux struggling toward a

Post by autostatic »

Now I see, thanks! But you would like to be able to use QjackCtl right? Maybe you could try unticking the following options in QjackCtl to get rid of the D-Bus related messages:

  • Enable D-Bus interface
  • Enable JACK D-Bus interface

These settings can be found in Settings - Misc in QjackCtl.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

autostatic wrote: Wed Feb 14, 2024 7:39 pm

Now I see, thanks! But you would like to be able to use QjackCtl right?

I should at least understand what's going wrong.
Can i use the patchbay of ardour instead?

These settings can be found in Settings - Misc in QjackCtl.

They were already unchecked. Starting qjackctl with the environment variable does not help either.

Anyway: if necessary i can of course learn to configure jack on the command line. I'm old enough not to be afraid of that ;-)

Just an explanation to the desired setting:

We are playing in two projects:

a) duo voice/sax + bass
b) trio voice/sax + bass + drums.

currently we are using the ZEDi10 in our PA. It has 4 mic inputs an can route these into the USB interface. 2 channels are reserved for voice + sax mics. These channels will be routed into the speakers.
channel 3 is planned for an overhead mic of the drum kit
channel 4 for takes the DI signal of the bass amp.

That setting seems to work, but it is currently not completely tested.

We would like to add two channels with a 2nd mixer - the Alesis Multimix i have in spare). This provides 2 additional mic channels allowing us to use a 2nd mic for the drums (recorderman) and background vocals. (if that works, the Alesis will probably responsible for the 2 drum mics).

The idea is to use zita-a2j to add the 2nd USB device so that ardour can see it. In a later step, not before 4 channel recording works. That's why will need jack, but i will need the command line anywa, won't i?

What i learn from Your previous answer is that i need to configure a route for playback into some interface, maybe with a quick and dirty downmix to stereo. And for hydrogen output! Again, later - one step after the other.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

Next steps. Mostly successful.

meanwhile i am testing the following setup:

bea:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: 92HD75B2X5 Analog [92HD75B2X5 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: ZEDi10 [ZEDi10], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

Jack setup to record from the ZEDi and to play through the internal sound card
(playing through the ZEDi works, too, but lights up the feedback warning).

JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -r -dalsa -Chw:ZEDi10 -Phw:Intel -sALSA -r48000 -p256 -n3&
zita-a2j -dhw:CODEC -p 256 -r 48000 -n2 -j CODEC&

i am on

jackdmp version 1.9.22 tmpdir /dev/shm protocol 9
zita-a2j-0.8.4

zita-aj was not provided as a package, so i built it from the sources.

letting ardour7 set up and instrumentize a recording session will show up all 6 channels (4 of the ZEDi, 2 of the Alesis Multimix), apparantly all connected correctly.

recording works fine on the ZEDi-tracks.

There is no signal from the CODEC, although that device is unmuted (i checked with alsamixer). I can, however, route the output of hydrogen into these tracks from within ardour.

Which means that i am able to record to my minimum demands on that machine:
4 digital channels, and 5 analog ones if i use the Multimix as a sub mixer, e.g in a recorderman setup for the drums. But no chance for background vocals.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

addition: using CODEC as the primary interface and the ZEDi10 as secondary gives me the 2 usable channels of small mixer, working. As soon as i start zita-a2j, its four channels appear in ardour, but there is no signal.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

just for the record: jackd must run with larger prirority than the zita bridge, i.e. in real time mode. Otherwise jackd seems to drop the output of the bridge.

Which means that the -r parameter of jackd may not be used in that situation.

After omitting -r, everything looks good on 1st view.

I looks as if i'm nearly done - with every wish i described initially. Just checking if the buffer sizes are ok as they are.

remaining problems:
jack_control does not work either - it can't find the python dbus module although that is installed. Still need to figure out what is really missing.

After installing dbus-X11 dbus-launch is available. Now i can start jackd without JACK_NO_AUDIO_RESERVATION=1

jackd (1.9.22) does not accept the -D option (duplex mode) any more. However, qjackctl wants to set this option and hence to enforce the default. Meanwhile that's the only difference between my command line and the one generated by qjackctl, and i think that prevents qjackctl from being able to start jackd.

beate
Established Member
Posts: 21
Joined: Fri Nov 24, 2023 10:19 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Alpine Linux struggling toward a

Post by beate »

My problems were mainly caused because

a) my udev-installation was not complete (Alpine does by default not use it) and no DBUS as well. We had this already in my other thread on setting up such a system.

b) slim does not obey PAM rules.

Workaround A)
uninstall slim and use startx!
edit /etc/rc.conf as descibed below in order to use the display manager.

ensure that the following packages are installed

eudev
udev-init-scripts
udev-init-scripts-openrc
dbus-x11

Workaround B)

use a minimal system without PAM, without UDEV. I am just setting up such a system.

How to deal with the audio demands in that case? Simple: set them globally. These parameters need to be definded for PID 1, the init process.
The traditional init reads /etc/initscipt (-> Devuan!).
Alpine uses openrc+busybox, by default neither udev nor PAM nor DBUS.
openrc has a config file in /etc/rc.conf
here You can set the paramters for ulimit, such as:

Code: Select all

# Pass ulimit parameters
# If you are using bash in POSIX mode for your shell, note that the
# ulimit command uses a block size of 512 bytes for the -c and -f
# options
#rc_ulimit="-u 30"
rc_ulimit="-r 80 -l unlimited"

These values are inherited to all child processes. Not a good idea on multiuser machines, but on da dedicated box with a few users doing audio stuff this is (IMHO) ok, because the all need these settings.
As the system lacks DBUS, jack needs to be started similar to that:

Code: Select all

JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd  -dalsa -dhw:0,0 -sALSA -r48
000 -p256 -n2&

i currently don't have built zita-aj on my testing machine - the two boxes i initially mentioned are case A, and i need to edit /etc/rc.conf just as a workaround for the problem with the display manager not providing a PAM aware login. ardour still complains on the limit of open files. I'll fix that if i run into real problems. But it connects perfectly with jack and configures the available channels.

if You need zita-a2j or some other resampler You must build it from the sources. I did not build it on my new machine (64 bit).

hope that might help someone.

Post Reply