The officially official Devuan Forum!

You are not logged in.

#1 2025-11-15 01:33:07

rations
Member
Registered: 2025-11-06
Posts: 13  

ALSA+Jack system wide audio No pulseaudio or pipewire

G'day, I have a script here https://github.com/rations/jack-bridge that uses ALSA+Jack to run my audio system wide without pulseaudio or pipewire. It does use apulse so applications with no jack support like firefox or chrome are automatically connected to play back with jack. It seems to be working pretty good. I've done most of the testing for browsers using brave. I can run multiple tabs playing different youtube videos and both of their sound is coming through the speakers. I tried jitsi meet in the browser and the microphone and sound worked. I only tested a youtube video in firefox-esr and that worked. Other things I tested, watched a video in parole media player and the sound worked, watched a video in vlc with the default vlc sound settings (didn't select jack) and it worked, installed some tank game from synaptic and the sound worked. It uses alsamixer to adjust the volume, there is no gui yet. If you open qjackctl graph you can see it automatically connect when audio starts. I tested this on my old hp stream laptop running devuan 5 xfce with 2gb ram and lscpu said it's an intel celeron cpu n2840 @ 2.16Ghz. Full disclaimer I can not code, I am an end user of gnu/linux. When i switched to linux not long ago all I wanted was reaper to work with my vsts which started my journey which lead me to jack.I was blown away by how great this little old program is, especially the graph and after watching, reading and trying everything on pipewire and pulseaudio I couldn't understand why the devs never used jack for a system wide audio solution, but like I said earlier I'm not a dev. I used a chat bot to make this script and far out did it spew out a whole lot of slop. I just kept picking the parts I needed an deleting the rest. Now I'm left with a simple script that is working for me. I'm wondering if there is any devs out there that do know how to code, if they would look over it and try it. I removed pulseaudio and pavucontrol before installing this and if you have pipewire I would remove that as well.


You will own nothing and be depressed

Offline

#2 2025-11-15 14:56:27

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

I put together a little demo video on youtube https://youtu.be/7aFa1ONsGz8


You will own nothing and be depressed

Offline

#3 2025-11-15 15:43:19

golinux
Administrator
Registered: 2016-11-25
Posts: 3,595  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Suggestion . . . paragraphs exist for a reason.  wink

Offline

#4 2025-11-15 15:46:25

swanson
Member
Registered: 2020-04-22
Posts: 130  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Nice video! Did you post it on the Reaper forum as well?

Offline

#5 2025-11-15 17:25:54

greenjeans
Member
Registered: 2017-04-07
Posts: 1,316  
Website

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Nice work, very interesting stuff! @rations you should shoot me an e-mail sometime, i've been working on sound using Alsa without a sound server for a long time now and your solution of pairing it with Jack instead is interesting on a lot of levels.

For a GUI and in general for your project, you might want to take a look at AlsaTune, the source code is in the package and there may be elements of the code that might work for your GUI. If you're not familiar, it's a GUI for the alsa mixer and EQ with a system to save user EQ presets. Build thread : https://dev1galaxy.org/viewtopic.php?id=7278
Package: https://sourceforge.net/projects/vuu-do … /AlsaTune/


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#6 2025-11-16 03:44:26

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

@greenjeans Thanks for the info on alsatune I downloaded the package from sourceforge and will take look. I read the thread you linked and have to say, great job . It seems like it would work with jack-bridge straight out of the box. I'll keep in touch.

@golinux

@swanson Thanks for the suggestion. I didn't even think to do that.

Something else i've started on is adding bluetooth support.


You will own nothing and be depressed

Offline

#7 2025-11-16 08:29:42

swanson
Member
Registered: 2020-04-22
Posts: 130  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Over at the Reaper forum the alsa/jack/pulse/pipe question is frequent. Your setup and scripts seem to take away the hurdles.
I've been running Reaper and pure alsa for some years and I remember at least two hurdles. One was setting the default alsa output (card) the other was getting parallel sound outputs from Reaper and for example youtube. 

So your solution could be the thing!

Offline

#8 2025-11-16 15:54:59

greenjeans
Member
Registered: 2017-04-07
Posts: 1,316  
Website

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

I've been running Reaper and pure alsa for some years and I remember at least two hurdles. One was setting the default alsa output (card) the other was getting parallel sound outputs from Reaper and for example youtube.

Yep, I love me some pure alsa sound, but I don't enjoy trying to figure out all the myriad commands needed to try to get it to do more complex things. I sat down yesterday and finally worked out an update to my basic config files i've been using to allow multiple sources to play simultaneously, but of course .asoundrc is much larger now.

I also started work on a basic card-switcher GUI to add to AlsaTune... it's not hard to edit .asoundrc or .asound.conf and switch some 0's to 1's but just seems more elegant to offer a simple GUI solution.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#9 2025-11-16 16:59:11

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

just seems more elegant to offer a simple GUI solution.

Your gui is great, keep it simple. I would consider adding a default option in the presets so when people play with the eq and freak out because their speakers are blown out or the sounds gone they can just select default to return to normal. It might seem silly but for people who have never used an eq they will not use AlsaTune ever again.

I've incorporated AlsaTune into jack-bridge and it looks great and works great. The changes are on github. Thanks for showing me. I linked to to your sourceforge. I'm pretty keen to add a record feature to your gui.

@swanson I signed up to the reaper forum but I'm still locked out from posting. Feel free to share it there if you like. Honestly this is the only forum I've ever posted in and looking at the reaper one it was pretty overwhelming, I wouldn't know where to start.

As for using reaper I use it with jack and my external audio interface. My set up is preferences/audio/device then select jack and add as many inputs or outputs as you like. Make sure auto suspend pulseaudio is selected, it should be by default if you've selected jack. Then in qjackctl settings I choose my external audio interface, sample rate 48000, Frames/Period 128, Periods/Buffer default. this sets the latency at 2.67 msec which is just insane. If your computer and interface can handle it, if not try setting Periods/Buffer to 2 and if you're still having pops and crackles increase the Frames/Period to 264. Also in qjackctl make sure   server synchronous mode is ticked, Realtime is ticked and Driver is set to ALSA and for midi driver i select seq. Apply and start jack. Every time you want to change a setting you have to stop jack. Then whatever you are connecting to reaper in qjackctl graph just link it to the reaper inputs and it will show up in the drop down menu in your track to select it. Reaper really is an awesome program.

This jack-bridge script uses jacks recommended settings and because it's your default sound system reaper automatically detects jack and you don't have to do anything except if in the reaper preferences/audio/device add as many inputs and outputs as you like and connect them using the graph and the to automatically show up in your tracks.

Last edited by rations (2025-11-16 17:07:25)


You will own nothing and be depressed

Offline

#10 2025-11-16 17:44:39

swanson
Member
Registered: 2020-04-22
Posts: 130  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Oops. Have to redo it.

Last edited by swanson (2025-11-16 18:22:08)

Offline

#11 2025-11-16 17:56:19

greenjeans
Member
Registered: 2017-04-07
Posts: 1,316  
Website

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

That's awesome, I wasn't sure AlsaTune would work as-is because in my testing if there's any other soundserver installed it won't work properly, but I never tried it with JACK, just Pulse and Pipewire, and for those you would just lose everything except for a main volume control, and the EQ wouldn't work.

I just thought maybe there was some code you could re-use, but this is cool!

So with jack-bridge running you are able to adjust EQ settings in real-time? That's so groovy, I need to read more about Jack.

I made an experimental standalone EQ that i've never deployed at one point, and on it I added a button like you're describing to zero out everything on the EQ, but I never did one for the AT interface, that's not hard to implement and I agree it's a good idea.

Record feature/button? oooooh yeah, that would be slick and now it's got my creative side going, when I finish my other projects today i'll dig in and see. But of course feel free to hack on it in any way you see fit if you already have plans to implement it.

For your particular use-case with jack-bridge and working with music, are there any other features you can think of that would be helpful?

Last edited by greenjeans (2025-11-16 17:56:49)


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#12 2025-11-17 02:01:29

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

# /etc/asound.conf - ALSA -> Equal -> JACK plugin template
#
# This template routes ALSA applications through the ALSA equalizer plugin
# and then into the JACK plugin. This preserves native JACK applications
# while giving ALSA applications (including apulse-wrapped apps) an EQ
# control device named "equal" that GUI tools can open and manipulate.
#
# Minimal zero users then run the GUI
# to change mixer and EQ sliders. Do NOT enable PulseAudio / PipeWire.

ctl.equal {
   type equal;
}

pcm.jack {
   type jack
   playback_ports {
       0 system:playback_1
       1 system:playback_2
   }
   capture_ports {
       0 system:capture_1
       1 system:capture_2
   }
}

# The equal plugin needs a slave PCM. Make the slave point to the JACK PCM
pcm.plugequal {
   type equal;
   slave.pcm "jack";
}

# Provide a simple plug wrapper so apps get format conversions automatically.
pcm.equal {
   type plug;
   slave.pcm plugequal;
}

# Make plugequal (equal -> jack) the default ALSA PCM for applications.
pcm.!default {
   type plug
   slave.pcm "equal"
}

# Leave ctl.!default to the distro defaults to avoid hardcoding a mixer

This solved it. Until this the eq did not display anything. I only use reaper for working with music so i was going to just use the alsamixer part of your gui. But with this way it keeps it for people that don't.

All the functions work with jack-bridge. Adjust the settings in real time and save and switch between presets while sound is playing.


You will own nothing and be depressed

Offline

#13 2025-11-17 03:00:12

greenjeans
Member
Registered: 2017-04-07
Posts: 1,316  
Website

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Brilliant, I love this stuff. Been working today on a simple script to switch cards, just a little convenience thing to add to AT and make the alsa system a little more user-friendly. Needs more testing and likely more work, but I have a working proto.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#14 2025-11-17 15:17:09

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

I added the recording features to the AlsaTune GUI. Options include stereo, mono, 48000Hz or 41000Hz. It saves the .wav file into the Music directory. You can adjust the eq whilst recording. I think I'll stop there for now and move onto bluetooth. Changes are on github with a screenshot. https://github.com/rations/jack-bridge


You will own nothing and be depressed

Offline

#15 2025-11-18 09:51:15

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 448  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#16 2025-11-20 15:31:31

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

When I was a kid winding up my grandparents gramophone and listening to all the crackles and the tempo getting slower and slower is something I'll never forget.


You will own nothing and be depressed

Offline

#17 2025-11-20 16:20:23

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 448  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#18 2025-11-21 14:08:34

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Played super tux kart today with my sons bluetooth controller connected using the alsatune gui. I also got the misses bluetooth headphones to connect but no sound.


You will own nothing and be depressed

Offline

#19 2025-11-23 09:32:47

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 448  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

back in reply number 15 i referenced some historical devices and processes(yes OT and makes some stoics hysterical indeed)

anywho, more delicious goodness without further ado:

University California Santa Barbara Library Cylinder Audio Archive
https://cylinders.library.ucsb.edu/overview.php

and i will just say that i found that via just one of Cory Doctorow's endless(and endlessly thought-provoking) webpages/websites/talks/tours/etc:
https://pluralistic.net/2025/11/17/stop-killing-games-again/

couldn't help it...one more...ha!


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#20 2025-11-23 20:41:20

greenjeans
Member
Registered: 2017-04-07
Posts: 1,316  
Website

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

Played super tux kart today with my sons bluetooth controller connected using the alsatune gui. I also got the misses bluetooth headphones to connect but no sound.

Have you got the libasound2-plugin-bluez and the bluez-alsa-utils packages installed?


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#21 2025-11-24 08:04:27

rations
Member
Registered: 2025-11-06
Posts: 13  

Re: ALSA+Jack system wide audio No pulseaudio or pipewire

https://github.com/rations/jack-bridge/ … -bluetooth

This is the branch I am working on it has all the bluetooth information and also switching between internal, usb, hdmi and bluetooth in real time. So far usb, and internal switching works, I have not tested hdmi and bluetooth switches but no sound yet.

I've updated AlsaTune to include mute buttons, a bluetooth section, and a devices section to switch between internal, usb, hdmi and bluetooth. I also renamed it to Alsa Sound Connect and changed the icon. Thanks greenjeans for reaching out and showing me your GUI.
   
I looked into BlueAlsa and went from there. I have discovered there is a lot involved with bluetooth. I insisted to the chat bots that this has to work without systemd and pulseaudio which bluez contains a pulseaudio bluetooth module, so it uses parts from bluez and bluez-tools. It created scripts to use sysV. Also it created binaries for BlueAlsa with out systemd parts but I need to go back through the history to find out how it did this so it can be seen and if anyone wants to build from source. I don't dig AI either but the internet didn't disappear after the dot com bubble burst and either is AI. I wish I could code and understand the language because if you can, you could use these tools way better then me. To me not using it is like using a hammer to build a house and refusing to use a nail gun. The builder who stuck with the hammer went broke.
   
These are all the packages REQUIRED_PACKAGES="jackd2 alsa-utils libasound2-plugins apulse qjackctl libasound2-plugin-equal swh-plugins libgtk-3-0 bluez bluez-tools dbus policykit-1 imagemagick"

Provisioning and runtime notes for BlueALSA integration (jack-bridge) I need to update this the autobridge daemon was a complete disaster.
====================================================================

Purpose
-------
This document explains the provisioning actions required to run BlueALSA and integrate Bluetooth audio into JACK
on systemd-free Debian-like systems. There is no autobridge daemon anymore; routing is handled in JACK via
the helper /usr/local/lib/jack-bridge/jack-route-select and settings in /etc/jack-bridge/devices.conf. The provided
helper script `contrib/setup-bluetooth.sh` automates the common steps, and this file documents what to verify manually.

Summary of actions performed by contrib/setup-bluetooth.sh
---------------------------------------------------------
1. Ensure system user
   - Creates a system user `bluealsa` with no login shell if it does not already exist:
     `useradd --system --no-create-home --shell /usr/sbin/nologin --user-group bluealsa`
   - Running as a dedicated user reduces attack surface and keeps state files owned by that user.

2. Create persistent state directory
   - Creates `/var/lib/bluealsa` if missing and sets ownership to `bluealsa:bluealsa` and permissions `0700`.
   - This directory stores BlueALSA persistent state and must be protected.

3. Devices config and routing helper
   - The installer writes `/etc/jack-bridge/devices.conf` with defaults:
     - INTERNAL_DEVICE, USB_DEVICE, HDMI_DEVICE, BLUETOOTH_DEVICE
     - BT_PERIOD, BT_NPERIODS
     - PREFERRED_OUTPUT
   - Runtime routing is performed by `/usr/local/lib/jack-bridge/jack-route-select` which rewires JACK ports and spawns
     alsa_out for USB/HDMI/Bluetooth targets as needed. The GUI Devices panel calls this helper; no separate daemon required.

4. Install D-Bus policy
   - If `usr/share/dbus-1/system.d/org.bluealsa.conf` exists in the repo, it is copied to
     `/usr/share/dbus-1/system.d/org.bluealsa.conf` with mode `0644`. This policy allows the
     `bluealsa` user to own the `org.bluealsa` D-Bus name and permits members of the `audio`
     group to use the service.
   - NOTE: `usr/share/dbus-1/system.d` is a D‑Bus system-bus policy directory (XML files)
     used by the system D-Bus daemon to control which users/groups can own or talk to
     particular D-Bus names. This is NOT related to systemd. The presence of this file
     in the repository simply provides an optional, ready-made D-Bus policy that the
     provisioning script can copy into the system D-Bus policy directory on systems
     where you want the `bluealsa` user to be permitted to own `org.bluealsa`.

5. Add target user to audio group
   - The script adds a target user (passed as an argument or auto-detected) to the `audio` group so
     they can access ALSA devices and BlueALSA mixers without root.

6. Create GUI module stubs
   - Creates placeholder C files:
     - `src/bt_agent.c`
     - `src/gui_bt.c`
     - `src/bt_bridge.c`
   - These are stubs intended to be expanded with the BlueZ Agent (pairing) and GUI controls.

Manual verification checklist
-----------------------------
- Confirm `bluealsa` user exists:
  id bluealsa

- Confirm /var/lib/bluealsa:
  ls -ld /var/lib/bluealsa
  Should be owned by bluealsa:bluealsa and mode 0700.

- Confirm D-Bus policy present:
  ls -l /usr/share/dbus-1/system.d/org.bluealsa.conf

- Confirm devices configuration:
  ls -l /etc/jack-bridge/devices.conf
  cat /etc/jack-bridge/devices.conf

- Confirm target user in audio group:
  id <your-user>   # should show 'audio' in groups

Integration notes
-----------------
- The init scripts provided in contrib/init.d/ are SysV-style and should be installed by package maintainer or copied
  into `/etc/init.d/` and enabled via `update-rc.d` or equivalent for your distribution.
- There is no autobridge daemon. Routing is handled by JACK using `/usr/local/lib/jack-bridge/jack-route-select`
  and preferences in `/etc/jack-bridge/devices.conf`.
- No systemd, PulseAudio, or PipeWire are required. The provisioning script and init scripts are written to work on sysvinit-like systems.


You will own nothing and be depressed

Offline

Board footer