2

I seem to be having issues with my Alsa sequencer. I am using Parabola (Arch variant) and I don't use Pulseaudio, I use Alsa directly. I am trying to play a game via Wine that has MIDI audio. I have fluidsynth installed and it works - I can play a midi file and it sounds fine. However, if I start the fluidsynth server and run aplaymidi -l, I get the following error:

$ aplaymidi -l
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

I have no /dev/snd/seq file, which seems like it is something that should be there, relating to the Alsa sequencer. Does anyone have any idea why that file might not be present and what solutions I can try?

Edit:

To answer the question in the comments, here is the output of /proc/config.gz for the section dealing with the sequencer:

$ zgrep -A 5 -B 5 SEQUENCER /proc/config.gz
# CONFIG_SND_CTL_VALIDATION is not set
# CONFIG_SND_JACK_INJECTION_DEBUG is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_CTL_LED=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_SEQUENCER_OSS=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI_EVENT=m
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_SEQ_MIDI_EMUL=m
CONFIG_SND_SEQ_VIRMIDI=m

So it appears the Alsa sequencer was compiled as a module and I probably just need to load that module.

Time4Tea
  • 2,288
  • 5
  • 23
  • 54

1 Answers1

1

If the /dev/snd/seq special file does not exist it is most probably because your system does not get the appropriate driver loaded.

The appropriate driver is part of any linux distribution and is built at kernel make time depending on the CONFIG_SND_SEQUENCER config option.

Say yes to Sequencer Support (Location: Device Drivers / Sound card support / Advanced Linux Sound Architecture) to build the driver in kernel. (Alsa used to recommend that). Rebuild your kernel and that's it, it will be automatically loaded (and special files created) at boot time.

BTW, I warmly recommend selecting "Use HR-timer as default sequencer timer" as well.

I discover that this driver can be built as a module (saying M). If it is your choice then you should not forget to explicitly modprobe it before willing to make use of the /dev/snd/seq special file.

MC68020
  • 6,281
  • 2
  • 13
  • 44
  • Hey, I added the config file output to my question. It seems the sequencer was indeed compiled as a module (and the HRtimer is set as the default). Do you know what the module name for that is, to pass to modprobe? Is it ok to load that module on boot, or should I just load it when necessary? – Time4Tea May 27 '22 at 16:36
  • I guess that SND_SEQ_MIDI might be necessary as well, to play MIDI? This is interesting. – Time4Tea May 27 '22 at 16:37
  • 1
    @Time4Tea : The module should be named **snd-seq** ( see https://www.linuxjournal.com/article/7391 ) It should of course be OK to load at init time. But honestly I then do not see any advantage provided by building it as a module (vs building the driver in-kernel as Alsa used to recommend.) – MC68020 May 27 '22 at 17:15
  • 1
    Adding snd-seq with modprobe does indeed create the `/dev/snd/seq` file and the midi is now working in the game. Thanks very much for your help! I think I would rather modprobe the module in though, so I can carry on using the packaged distro kernel (for easy updates) and not have to rebuild it. Thanks again! – Time4Tea May 27 '22 at 17:31
  • @Time4Tea : This makes sense. Have fun ! – MC68020 May 27 '22 at 18:18
  • @MC68020 Please how do i resolve this error, I'm also getting it on linux running on wsl – olawalejuwonm Aug 07 '23 at 22:38
  • @olawalejuwonm : did you ensure every point of this answer was properly addressed ? – MC68020 Aug 08 '23 at 10:56
  • @MC68020 I don't know how to go about it on wsl – olawalejuwonm Aug 08 '23 at 11:59
  • @olawalejuwonm : Sorry for not being able to help you since I know absolutely nothing of wsl. – MC68020 Aug 09 '23 at 09:21