Since ubuntu-studio 24.04. I have trouble with midi. I use carla or qsynth to run soundfonts. And I connect several mostly wine midi programs with a gui, patchance for example.
Since the update to 26.04. qsynth makes more trouble, so I use carla instead. This works.
The problem is, when I close a connected midi device without disconnecting midi in patchance before, pipewire and wireplumber are crashing when I try to connect another midi device or even the same midi device again. I didn’t have this problem in 24.04.
So, I have a workaround, just stop the midi connection in patchance before closing the midi device. But during every day work, I forget this, and I have stress and I don´t like stress.
Running a music studio on 26.04 daily builds? You definitely like to live dangerously!
Ditch Patchance and install qpwgraph:
sudo apt install qpwgraph
It talks to PipeWire directly, so when a Wine app disappears, ‘qpwgraph’ immediately cleans up the mess instead of leaving broken links behind. (Carla’s built-in patchbay also handles this nicely).
If it still crashes with qpwgraph, run this right after the crash and drop the output here:
What “daily builds”? This is official 26.04.1. I think
I already had qpwgraph installed. But using it, it is the same thing:
journalctl --user -u pipewire -u wireplumber -b --no-pager -n 30
Sep 06 10:26:57 BIG systemd[1651]: Started pipewire.service - PipeWire Multimedia Service.
Sep 06 10:26:57 BIG systemd[1651]: Started wireplumber.service - Multimedia Service Session Manager.
Sep 06 10:26:57 BIG pipewire[1931]: mod.rt: could not set nice-level to -11: Keine Berechtigung
Sep 06 10:26:57 BIG wireplumber[1980]: mod.rt: could not set nice-level to -11: Keine Berechtigung
Sep 06 10:26:59 BIG wireplumber[1980]: default: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
Sep 06 10:26:59 BIG wireplumber[1980]: wp-device: SPA handle ‘api.libcamera.enum.manager’ could not be loaded; is it installed?
Sep 06 10:26:59 BIG wireplumber[1980]: s-monitors-libcamera: PipeWire’s libcamera SPA plugin is missing or broken. Some camera types may not be supported.
Sep 06 12:59:58 BIG pipewire[1931]: spa.alsa: can’t subscribe to 129:0 - Vorgang nicht zulässig
Sep 06 12:59:58 BIG pipewire[1931]: spa.alsa: can’t subscribe to 129:1 - Vorgang nicht zulässig
Sep 06 13:00:22 BIG pipewire[1931]: spa.alsa: can’t unsubscribe from 129:1 - Kein passendes Gerät bzw. keine passende Adresse gefunden
Sep 06 13:00:49 BIG pipewire[1931]: spa.alsa: can’t subscribe to 129:0 - Vorgang nicht zulässig
Sep 06 13:00:49 BIG pipewire[1931]: spa.alsa: can’t subscribe to 129:1 - Vorgang nicht zulässig
Sep 06 13:00:49 BIG systemd[1651]: pipewire.service: Main process exited, code=killed, status=9/KILL
Sep 06 13:00:49 BIG systemd[1651]: pipewire.service: Failed with result ‘signal’.
Sep 06 13:00:49 BIG systemd[1651]: pipewire.service: Consumed 2.902s CPU time over 2h 33min 51.706s wall clock time, 25.2M memory peak.
Sep 06 13:00:49 BIG wireplumber[1980]: pw.core: 0x6297f91aba60: leaked proxy 0x6297f92d3570 id:3
Sep 06 13:00:49 BIG wireplumber[1980]: pw.core: 0x6297f91aba60: leaked proxy 0x6297f9362fe0 id:5
Sep 06 13:00:49 BIG systemd[1651]: pipewire.service: Scheduled restart job immediately on client request, restart counter is at 1.
Sep 06 13:00:49 BIG systemd[1651]: Stopping wireplumber.service - Multimedia Service Session Manager…
Sep 06 13:00:49 BIG systemd[1651]: Stopped wireplumber.service - Multimedia Service Session Manager.
Sep 06 13:00:49 BIG systemd[1651]: Started pipewire.service - PipeWire Multimedia Service.
Sep 06 13:00:49 BIG systemd[1651]: Started wireplumber.service - Multimedia Service Session Manager.
Sep 06 13:00:49 BIG pipewire[17595]: mod.rt: could not set nice-level to -11: Keine Berechtigung
Sep 06 13:00:49 BIG wireplumber[17596]: mod.rt: could not set nice-level to -11: Keine Berechtigung
Sep 06 13:00:50 BIG wireplumber[17596]: wp-device: SPA handle ‘api.libcamera.enum.manager’ could not be loaded; is it installed?
Sep 06 13:00:50 BIG wireplumber[17596]: s-monitors-libcamera: PipeWire’s libcamera SPA plugin is missing or broken. Some camera types may not b e supported.
Client 129 in your log is Wine’s ALSA MIDI sequencer.
When Wine quits, the kernel deletes client 129 immediately. PipeWire hangs trying to unsubscribe from a dead device, and systemd kills it with status=9/KILL.
Also, your user lacks realtime audio rights -
mod.rt: could not set nice-level to -11: Keine Berechtigung
Two things to fix it -
1 - Add your user to the audio group:
sudo usermod -a -G audio $USER
then log out and log back in
2- Load your Windows plugins directly inside Carla (with carla-bridge-win64) instead of running standalone Wine apps through the ALSA sequencer. Carla manages plugin lifecycles cleanly, so closing them won’t pull the plug on PipeWire
oke… first problem first: I am already in the audio group, I tested this with groups user and there appeares audio.
2nd: this are not windows-plugins but standalone-programs which I run with wine, for example my prof notation program and a sequencer that does ONLY midi and is still the best and only tool to test arrangements and edit the midi here.
I did this already with 22.04 without problems and still with 24.04
edit: and I don’t need realtime audio, I think. Realtime audio means that the latency is low, right? Don’t need this, when i record I use the soundcard for direct monitoring. So I didn’t activate these kernel features: preempt threadirqs and so. Is this a problem?
I am spinning up a clean 26.04 environment on my test stand right now to test the exact WirePlumber 0.5 profile syntax and ensure it works out of the box for your Wine setup without surprises.
OK, I just tested everything on my test stand in a clean Ubuntu 26.04 environment.
You do not need threadirqs, preempt, or realtime kernel privileges for MIDI notation and sequencing. The realtime warning in your log was cosmetic and unrelated to the crash.
Why it crashes:
When your Wine application closes, the kernel deletes its ALSA sequencer port immediately. WirePlumber ALSA MIDI bridge (api.alsa.seq.bridge) deadlocks while attempting to unsubscribe from the destroyed port (Kein passendes Gerät), hanging the event loop until systemd watchdog kills the service (status=9/KILL).
Fix for Ubuntu 26.04 (WirePlumber 0.5):
Disable the ALSA MIDI bridge via a user profile drop-in. Wine will continue using the kernel ALSA sequencer directly.
In patchance there are no more midi devices visible, only the carla instances. No wine devices and no system midi bridge.
In qpwgraph I can see the alsa-wine-midi-instance but I cannot connect them. Actually, before writing your .config-file, I saw this same instances but I could not connect them neither. But there were shown 2 more wine-instances within the system-midi-brige boxes which worked. These are gone now.
Wine talks ALSA, but Carla runs on JACK. WirePlumber’s internal Midi-Bridge was translating between them, which is why turning it off broke your routing. But… that same built-in bridge in 26.04 has an bug where closing Wine while it’s linked to Carla deadlocks PipeWire and triggers the watchdog kill.
Since you’re on Ubuntu Studio, the easiest fix without crashes would be using a2jmidid instead:
sudo apt install a2jmidid
a2jmidid -e &
In qpwgraph, Wine will show up inside an a2j box as JACK ports. Wire them to Carla from there.
I just tested this on my 26.04 box with an ALSA MIDI client and killed it with SIGKILL while linked - a2jmidid unlinks cleanly and PipeWire doesn’t blink.
Or…
If you don’t want extra daemons, just open Carla - Configure - Engine, and flip the MIDI driver to ALSA.
Then Carla will show up in the ALSA section of qpwgraph and you can connect Wine directly ALSA-to-ALSA.
Good morning. I would have preferred the carla-configure-engine solution. I can choose there in audio-driver “JACK with ALSA-midi”. But then my Carla-synths disappear.
a2jmidid was already installed. This works. I put it in the autostart and can use then the a2j-boxes in qpwgraph. No crashes anymore.