ALSA No Longer Sees MIDI Hardware

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

ALSA No Longer Sees MIDI Hardware

Post by logicgate »

Today I found that my MIDI keyboards no longer show up in QjackCtl's Connection window (on the ALSA tab). The problem exists with a USB MIDI keyboard as well as with a standard 5-pin DIN MIDI keyboard (connected via a MIDI port on a PCI card). I believe I last used my MIDI keyboards over a month ago (February 18, 2015).

I reviewed the QjackCtl configuration and didn't notice that anything had changed. I have MIDI Driver set to "seq" and "Enable ALSA Sequencer support" is checked.

The JACK command line is: /usr/bin/jackd -dalsa -dhw:M2496 -r44100 -p256 -n2 -Xseq

When I run jackd manually it displays several messages, including "creating alsa_midi driver ..."

The problem doesn't appear to be related to QjackCtl. I ran Patchage (after starting jackd manually) and my keyboards didn't show up there, either.

I used amidi -l to verify that the keyboards were available to ALSA. I used amidi -p PORT -d to verify that ALSA MIDI was being received from both keyboards.

JACK MIDI seems to be OK. I tested with jack-keyboard, a virtual MIDI keyboard that sends JACK MIDI, and it worked fine.

So ALSA MIDI and JACK MIDI both appear to work. I'm guessing that something is broken with the ALSA to JACK MIDI bridge. I normally use JACK's built-in bridge, but today I also tried a2jmidid and it appears to have the same problem as the built-in bridge.

I use Arch Linux. Since my MIDI keyboards last worked I've updated existing software but I don't appear to have installed any new packages.

How can I diagnose this problem? Thanks!
Logic Gate Music (retro electronic music and more...)
earthbeats
Established Member
Posts: 5
Joined: Sat Oct 04, 2008 8:02 pm
Location: Chi-town
Contact:

Re: JACK No Longer Sees MIDI Hardware

Post by earthbeats »

Hi logicgate

Did you find out anymore information about this? I've run into the exact same issue. I"m on Arch amd64.

Thanks.
Bill.
EarthBeats.net
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: JACK No Longer Sees MIDI Hardware

Post by logicgate »

earthbeats wrote:Did you find out anymore information about this? I've run into the exact same issue. I"m on Arch amd64.
It's good to know I'm not alone!

I'm on 64-bit Arch as well. I don't have any new information; I'm hoping someone can offer some hints.

Do you have any idea when the problem started for you? Unfortunately I hadn't tried MIDI input for around five weeks and so don't know when my problem started.
Logic Gate Music (retro electronic music and more...)
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: JACK No Longer Sees MIDI Hardware

Post by Pablo »

I could be wrong but I have always thought that the alsa tab of qjackctl is just a GUI for "aconnect", so you should see alsa seq clients in qjackctl even before jack is started.

I would check "aconnect -i -o"
Lech123
Established Member
Posts: 32
Joined: Mon Dec 07, 2009 11:52 pm
Location: Poland

Re: JACK No Longer Sees MIDI Hardware

Post by Lech123 »

Check if there might be some conflict between jackd, jackdbus, and maybe jack2-dbus.

For some reason, qjackctl has been silently failing to execute ANY scripts on my fedora machine. In the "execute script after start-up" box:

a2jmidid -e &

was giving the same result as:

xwhateverbadscriptx

No MIDI and no messages explaining why. Yet strangely all the patchbay I/O was connecting and working fine, and I could manually run a2jmidid from a terminal shell.
After manually stopping jackd and jackdbus, then restarting the GUI, jack2-dbus was able to start, and that seems to have fixed my scripting problem, for now. The problem with jackd and jackdbus will probably return when I reboot, so I might have to track down what nuisance script has been executing them.

Update: jack2-dbus and jackdbus seem to be the same thing on my machine. Perhaps 'jackd' was somehow persisting across reboots, from a few weeks ago when I did a re-install and had to play around with it. Rebooting tomorrow will tell all.
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: JACK No Longer Sees MIDI Hardware

Post by logicgate »

Lech123 wrote:For some reason, qjackctl has been silently failing to execute ANY scripts on my fedora machine.
Thanks, but my QjackCtl doesn't execute any scripts.
Logic Gate Music (retro electronic music and more...)
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: JACK No Longer Sees MIDI Hardware

Post by logicgate »

Pablo wrote:I could be wrong but I have always thought that the alsa tab of qjackctl is just a GUI for "aconnect", so you should see alsa seq clients in qjackctl even before jack is started.

I would check "aconnect -i -o"
I ran aconnect -i and aconnect -o on multiple Linux installations on my machine. My MIDI devices did NOT show up in my two Arch Linux installations that are both up-to-date. The MIDI devices DID show up on an older Ubuntu-based system. Thanks for pointing me to aconnect.

Could this be an ALSA problem? My alsa-lib and alsa-utils packages were recently updated from 1.0.28 to 1.0.29.
Logic Gate Music (retro electronic music and more...)
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: JACK No Longer Sees MIDI Hardware

Post by Pablo »

I am pretty sure that this is an alsa related problem and that it has nothing to do with jack or qjackctl.

I would check lsmod to see if snd_seq_midi is loaded in your system. For comparison, in my ubuntu system:

Code: Select all

$lsmod |grep seq

snd_seq_midi           13324  0 
snd_seq_midi_event     14899  1 snd_seq_midi
snd_rawmidi            30144  1 snd_seq_midi
snd_seq                61560  3 snd_seq_midi_event,snd_seq_midi
snd_seq_device         14497  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              29482  3 snd_hrtimer,snd_pcm,snd_seq
snd                    69322  19 snd_hda_codec_realtek,snd_hrtimer,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: JACK No Longer Sees MIDI Hardware (ALMOST SOLVED)

Post by logicgate »

Pablo wrote:I am pretty sure that this is an alsa related problem and that it has nothing to do with jack or qjackctl.

I would check lsmod to see if snd_seq_midi is loaded in your system.
Pablo, thank you so much for your help. This seems to be pointing to the solution.

lsmod | grep snd_seq_midi returned nothing on my Arch systems. I was able to restore MIDI functionality by manually loading the missing module:

# modprobe snd_seq_midi

But of course it only lasts until reboot.

I've researched how to statically load a module at boot (by adding a file in /etc/modules-load.d/) but I'm guessing that's not the best solution. Is there a better solution? Note that Arch uses systemd. Thanks.
Logic Gate Music (retro electronic music and more...)
earthbeats
Established Member
Posts: 5
Joined: Sat Oct 04, 2008 8:02 pm
Location: Chi-town
Contact:

Re: JACK No Longer Sees MIDI Hardware

Post by earthbeats »

Pablo, thank you so much for your help. This seems to be pointing to the solution.

lsmod | grep snd_seq_midi returned nothing on my Arch systems. I was able to restore MIDI functionality by manually loading the missing module:

# modprobe snd_seq_midi

That was the same issue for me. Thanks everyone for helping me fix this!
EarthBeats.net
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: JACK No Longer Sees MIDI Hardware

Post by logicgate »

Update: The problem is with the Linux kernel (probably starting at version 3.19).

There's an Arch Linux bug for it (#44286) that's currently closed but there's a request to re-open it. Me and earthbeats are not the only users affected by this! Hopefully the problem will get passed along to the kernel developers.

Until then, one workaround is to use modprobe to manually load snd_seq_midi, as described earlier in this thread.

By the way, the thread title is slightly wrong and I don't know how to change it. The problem is not really related to JACK; it should be "ALSA No Longer Sees MIDI Hardware".
Logic Gate Music (retro electronic music and more...)
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: JACK No Longer Sees MIDI Hardware

Post by raboof »

logicgate wrote:By the way, the thread title is slightly wrong and I don't know how to change it. The problem is not really related to JACK; it should be "ALSA No Longer Sees MIDI Hardware".
Updated
higltypig
Established Member
Posts: 21
Joined: Mon Apr 27, 2015 9:04 pm
Been thanked: 1 time

Re: ALSA No Longer Sees MIDI Hardware

Post by higltypig »

Found a fix for this on my antegros (arch) box.

1) Create this file as root

/etc/modules-load.d/modules-load.conf

and

2) put this in it

snd_seq_midi

3) and then save it.

reboot.

voila!

so for me I opened a terminal and typed

sudo gedit /etc/modules-load.d/modules-load.conf

in it and then typed 'snd_seq_midi' in the gedit window which opened and then saved it and rebooted.

Hope that helps :)
User avatar
logicgate
Established Member
Posts: 37
Joined: Sat Oct 20, 2012 2:21 am
Has thanked: 1 time

Re: ALSA No Longer Sees MIDI Hardware

Post by logicgate »

higltypig wrote:Found a fix for this on my antegros (arch) box.

1) Create this file as root

/etc/modules-load.d/modules-load.conf

and

2) put this in it

snd_seq_midi

3) and then save it.

reboot.

voila!

so for me I opened a terminal and typed

sudo gedit /etc/modules-load.d/modules-load.conf

in it and then typed 'snd_seq_midi' in the gedit window which opened and then saved it and rebooted.

Hope that helps :)
Thanks.

Similar information is on the Arch wiki (https://wiki.archlinux.org/index.php/Kernel_modules). I had originally hoped that the problem would be fixed properly and that making this change wouldn't be necessary. I've now made this change and it works fine.

Note: There's nothing special about the file name listed as "modules-load.conf" above; the ".conf" suffix is required but the rest of the file name can be anything.
Logic Gate Music (retro electronic music and more...)
Orange
Posts: 1
Joined: Wed Dec 29, 2021 10:19 pm
Has thanked: 1 time

Re: ALSA No Longer Sees MIDI Hardware

Post by Orange »

higltypig wrote: Thu Apr 30, 2015 1:15 pm Found a fix for this on my antegros (arch) box.

1) Create this file as root

/etc/modules-load.d/modules-load.conf

and

2) put this in it

snd_seq_midi

3) and then save it.

reboot.

voila!

so for me I opened a terminal and typed

sudo gedit /etc/modules-load.d/modules-load.conf

in it and then typed 'snd_seq_midi' in the gedit window which opened and then saved it and rebooted.

Hope that helps :)
Mate, you save my life, big thanks!!!
Post Reply