MIDI keyboard in Ardour for Linux not recognized

Somehow, my MIDI keyboard is not recognized in Ardour.
On the same Linux installation, I can use it in LMMS and Pianoteq, so it is not a problem with the keyboard (Yamaha cp33), nor with the OS.
I also installed Ardour on a Macbook, and there it is also working flawlessly.

I hope that my issues with Ardour are clear.
What could prevent Ardour from recognizing my MIDI keyboard? Alas, I have no other MIDI keyboard to test if that works.

Thanks for suggestions.

Do both, amidi --list-devices and Ardour’s MIDI connection dialog list the same ports?

amidi finds my keyboard. Ardour does not.
grafik

Sorry for that many posts, but I can only post one figure at a time.


Can you click that way?
Inputs of your MIDI track
Routing Grid
Hardware

Looks like this:

Are you using the ALSA audio engine for Ardour? On Linux the other choices would be JACK or PulseAudio.
Assuming you are using the ALSA backend since you did not mention jackd, did you select ALSA Sequencer as the MIDI engine to use, and pick your hardware device?

You are on an audio track, not on a MIDI track. There you only see your audio inputs from your soundboard, but no MIDI devices.

Here is the situation in Linux (MIDI keyboard connected via USB):

And here is the (same) situation in Macbook pro with MIDI connected via USB. My MIDI keyboard (cp33) is recognized:

Jack vs ALSA has to do with the sound, am I right?
Sound (via Jack) does work. Only the MIDI keyboard is not recognized.

And MIDI. With the ALSA backend, you have to tell Ardour which style ALSA interface to use (raw or sequencer). With JACK, Ardour will use JACK MIDI, which does not present the hardware MIDI interfaces by default. You have to select raw or ALSA sequencer with jackd as well. In the past, there was better performance using a program called a2jmidid (ALSA to JACK MIDI daemon), but I don’t know if the most recent versions of jackd include those performance improvements or not.
If you use a2jmidid rather than the built-in ALSA sequencer driver, start it with the -e to make it export hardware ports as JACK ports.

See this section of the Ardour manual:
MIDI on Linux manual chapter

I followed the directions of that manual, at no avail.
MIDI keyboard is still not there in Ardour.

There seems to be something really weird. You don’t even see Ardour’s virtual keyboard, which, others correct me if I’m wrong, isn’t really a midi device, is it?

It would seem if the keyboard is recognized by Ardour on Mac but not Ardour on Linux, the problem is not Ardour. I would assume it has to do with your JACK setup. Unfortunately, I cannot help with JACK because I haven’t used it since the Ardour release that dropped it as a requirement, but I know from these forums that MIDI setup is more complicated using JACK compared to ALSA. You might be best off jumping on the support chat so you can get help in realtime:

https://web.libera.chat//#ardour

I have contacted the libra chat.

My JACK configuration:

I believe that I forgot to say, that I really appreciate your input.
Thanks a lot!

One bi step further to the solution:
I found this menu enttry (in ALSA mode, I have to see if it exists in JACK):