MIDI function and M-Audio 2496 Soundcard

I have my M-audio 2496 sound card working however it has MIDI capability and Im getting the following output from the error log.
2025-05-12T15:25:50 [ERROR]: AlsaSeqMidiIO: Device initialization failed.
2025-05-12T15:25:50 [WARNING]: AlsaMidiOut: failed to open midi device ‘144:0’.
2025-05-12T15:25:50 [ERROR]: AlsaSeqMidiIO: Device initialization failed.
2025-05-12T15:25:50 [W ARNING]: AlsaMidiIn: failed to open midi device ‘144:0’.
2025-05-12T15:25:50 [E RROR]: AlsaSeqMidiIO: Device initialization failed.
2025-05-12T15:25:50 [WARNING]: AlsaMidiOut: failed to open midi device ‘145:0’.
2025-05-12T15:25:50 [ERROR]: AlsaSeqMidiIO: Device initialization failed.
2025-05-12T15:25:50 [W ARNING]: AlsaMidiIn: failed to open midi device ‘145:0’.
Running Pipewire in Fedora 42. Audio is working good. Any suggestions in case I need to run a midi file? Thank you for any help offered.

Are you running the pipewire-jack module, or just using Pipewire as a PulseAudio replacement?

What does the output of aplaymidi -l show? Is 144 and 145 the device numbers which match the 2496 card?

I had pipewire jack installed but uninstalled it. Am I going to need Jack to run the midi function? I have no experience with Jack

Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 M Audio Audiophile 24/96 M Audio Audiophile 24/96 MIDI

The m-audio card is not device 145, so it likely doesn’t matter that ardour can’t open that device.

Have you actually tried sending or receiving MIDI and had problems, or were you just worried about the messages in the log?

I haven’t attempted to record or hook up midi. I calibrated the latency with audio. Yes this is from the login log. I’m wondering if it will go away if I hook up a midi keyboard? Thank you for your help.

I not using MIDI now but I would like to have the capability. Is this issue worthy of a bug report? I did not have this issue until I went from Opensuse to Fedora about a week ago. Thank you for any help here.

What is the bug? Is MIDI not working for you?

What MIDI device have you connected into your M-Audio 2416?

Cheers,

Keith

Maybe aseqdump -l will show additional ALSA sequencer devices and give an indication of what device 144 and 145 is, but it probably doesn’t have a practical implication for you, since your card is indicated as device 16. The messages just mean that some device you don’t intend to use can’t be used by Ardour.

Here is that output:
Port Client name Port name
0:0 System Timer
0:1 System Announce
14:0 Midi Through Midi Through Port-0
20:0 M Audio Audiophile 24/96 M Audio Audiophile 24/96 MIDI

So for now can someone tell me why the error message is showing and how to get rid of it? Would it help if I created a midi track with midi data and played it back? Thank you.

I connected a midi keyboard in an attempt to rid myself of the error message. Error messages bother me.

I just operned Ardour and the midi error messages are gone! It may have had something to do with an Fedora 42 update. Anyway, I am a happy DAWer. Thanks.

Did you check again right after you uninstalled pipewire-jack?
I had forgotten that 1.5 years ago there was a similar problem, the audio interfaces and linux distribution used were completely different, but use of pipewire was a common feature on both your system and the previous problem.

Use of pipewire as the general system sound server is very common on current linux distributions, use of pipewire-jack is less common, so removing that module may have made the difference on your system.
I think you would have to experiment with installing again and removing again, starting Ardour each time in between, to determine if that could be the cause of the messages you saw.

@paul is known to use pipewire on his daily development system. Paul, do you recognize the presence of an ALSA sequencer device number 144 that doesn’t behave properly as a known issue with some versions of pipewire? The poster is running fedora 42, which just released within the last few weeks and currently has pipewire 1.4.2 in the distribution repository if updates are applied, 1.4.1 if the system is not updated yet.

I can’t remember the log errors when pipewire-jack was installed. I think the problem was addressed with the Fedora update. Appreciate your help.

I just checked my system, and it seems that when I upgraded from Fedora 41 to 42 my jackd installation was replaced by pipewire-jack.
I checked the logs in Ardour now and I see the same thing:
2025-05-13T21:08:53 [ERROR]: AlsaSeqMidiIO: Device initialization failed.
2025-05-13T21:08:53 [WARNING]: AlsaMidiOut: failed to open midi device ‘144:0’.

The fact that the messages are gone when pipewire-jack is removed would seem to indicate that the existence of those port numbers is an artifact of pipewire-jack in some way.

But those messages are only shown when using the ALSA backend, I do not see them when I use the JACK/Pipewire backend to connect to pipewire-jack.
When I stop the backend and change from JACK/Pipewire back to ALSA I see the messages displayed again.
That probably makes sense if the JACK backend also uses JACK MIDI instead of accessing ALSA sequencer devices directly, there of course could be no errors opening those port numbers if opening is never attempted.

I also do not see a port 144:0 or 145:0 when listed with aseqdump -l or amidi -l or aconnect -o.
I also do not see them in the pipewire JACK connection graph using qpwgraph, so I am not sure which API Ardour is using that indicates those port numbers should be available when none of the other tools display those ports.

Definitely not that, my system is up to date (and even running most packages from update-testing, so extremely up to date) and I can still see those messages when using the ALSA backend.
I do see that in Fedora 42 one of the packages of either pipewire-jack-audio-connection-kit or jack-audio-connection-kit has been modified in a way which is probably a mistake: they used to be exclusive, only one could be installed, but I see after the upgrade I have both installed. That can cause conflicts with which libjack.so should be used, but I don’t think having both installed could cause this kind of problem.

I am on pipewire 1.2.7 and I do not see these errors.

My only complaint about pipewire’s JACK implementation is that the names for MIDI ports are ridiculous:

Midi-Bridge:Midi Through:(capture_0) Midi Through Port-0
Midi-Bridge:Scarlett 18i20 USB 0:(capture_0) Scarlett 18i20 USB MIDI 1
Midi-Bridge:M-Audio Keystation 88 at usb-0000:42:00-3-4-3- full speed:(capture_0) Keystation 88 MIDI 1
Midi-Bridge:M-Audio Keystation 88 at usb-0000:42:00-3-4-3- full speed:(capture_1) Keystation 88 MIDI 2
Midi-Bridge:M-Audio MidiSport 2x2 at usb-0000:42:00-3-4-4-3- full speed:(capture_0) MidiSport 2x2 MIDI 1
Midi-Bridge:M-Audio MidiSport 2x2 at usb-0000:42:00-3-4-4-3- full speed:(capture_1) MidiSport 2x2 MIDI 2
Midi-Bridge:Midi Through:(playback_0) Midi Through Port-0
Midi-Bridge:Scarlett 18i20 USB 0:(playback_0) Scarlett 18i20 USB MIDI 1
Midi-Bridge:M-Audio Keystation 88 at usb-0000:42:00-3-4-3- full speed:(playback_0) Keystation 88 MIDI 1
Midi-Bridge:M-Audio MidiSport 2x2 at usb-0000:42:00-3-4-4-3- full speed:(playback_0) MidiSport 2x2 MIDI 1
Midi-Bridge:M-Audio MidiSport 2x2 at usb-0000:42:00-3-4-4-3- full speed:(playback_1) MidiSport 2x2 MIDI 2

I’m going to ask the Pipewire devs about this on their issue tracker.
What method does Ardour use to determine which devices it should attempt to open? I may have to put together a small test program to illustrate the problem. It seems strange that Ardour finds device 144 to open, but amidi and aseqdump do not display that device.

I don’t see those device numbers yet anywhere in /proc/asound, but I do see client 142:0 as PipeWire-System and 143:0 as PipeWire-RT-Event in /proc/asound/seq/clients, so it seems almost certain that 144 and 145 are also PipeWire.
Is there somewhere other than /proc/asound/seq that ALSA sequencer devices would show up?

I see the following:

$ cat /proc/asound/seq/clients
Client info
  cur  clients : 6
  peak clients : 21
  max  clients : 192

Client   0 : "System" [Kernel Legacy]
  Port   0 : "Timer" (Rwe-) [In/Out]
    Connecting To: 144:0
  Port   1 : "Announce" (R-e-) [In]
    Connecting To: 144:0, 128:0
Client  14 : "Midi Through" [Kernel Legacy]
  Port   0 : "Midi Through Port-0" (RWe-) [In/Out]
Client  24 : "XR18" [Kernel Legacy]
  Port   0 : "XR18 MIDI 1" (RWeX) [In/Out]
Client 128 : "Client-128" [User Legacy]
  Port   0 : "qpwgraph_alsamidi" (-W--) [Out]
    Connected From: 0:1
  Input pool :
    Pool size          : 200
    Cells in use       : 0
    Peak cells in use  : 1
    Alloc success      : 1
    Alloc failures     : 0
Client 144 : "PipeWire-System" [User UMP MIDI2]
  Port   0 : "input" (rwe-) [In/Out]
    Connected From: 0:1, 0:0
  Input pool :
    Pool size          : 200
    Cells in use       : 0
    Peak cells in use  : 2
    Alloc success      : 9
    Alloc failures     : 0
Client 145 : "PipeWire-RT-Event" [User UMP MIDI2]
  Port   0 : "input" (rwe-) [In/Out]
  Output pool :
    Pool size          : 682
    Cells in use       : 0
    Peak cells in use  : 0
    Alloc success      : 0
    Alloc failures     : 0
  Input pool :
    Pool size          : 682
    Cells in use       : 0
    Peak cells in use  : 0
    Alloc success      : 0
    Alloc failures     : 0

Not sure if that’s any help or interest.

Cheers,

Keith

It is interesting, possibly it indicates that the exact device/port number changes for some reason.
When I had my desktop session running I saw the Ardour messages about 144:0 and 145:0, but I am currently checking while SSH into my machine, and only see 142:0 and 143:0 but with the same device names you show for client 144 and client 145.
I will check again when I am at my keyboard with a GUI session running to see if those clients change to 144 and 145 again on my system.

So now that it seems established that those device:port numbers are from Pipewire, is there some check which Ardour is expected to perform that it is not? The output of aseqdump -l seems to indicate that aseqdump does not detect those as “real” ALSA sequencer devices.

Where is the ALSA sequencer detection code? I don’t see it in libs/backends/alsa/alsa_midi.cc or libs/backends/alsa/alsa_sequencer.cc.

I also have a vague memory that Pipewire 1.4.x MIDI 2.0 support was causing problems for some applications, but I cannot find the details around that.
This is the closest I can find:

In that problem it resulted in libasound.so crashing, which sounds more extreme than the problem Ardour is hitting.

I did confirm that those client (port? device?) numbers change depending on whether you are logged in to a tty session or to a GUI session. While logged in to a desktop session PipeWire-System and PipeWire-RT-Event were also 144 and 145 on my system, so those must be relatively consistent numbering.

I am willing to do some research on this, but I need some pointers to get started, I didn’t find yet the place in the Ardour source which searches for available devices and attempts to open the ALSA sequencer devices. Or rather I found what seems to be the open functions, but not the search function which determines which devices should be opened.