View Issue Details

IDCategoryLast Update
0008800bugs2021-09-19 20:16
ReporterlentferjAssigned Tox42 
Reproducibilityalways 
Status resolvedResolutionno change required 
PlatformDebian GNUOSLinuxOS Version(any)
Product Version6.9 
Fixed in Version 
Summary0008800: Ardout crashes when using Alsa MIDI raw devices on Linux 5.14
DescriptionThe new kernel 5.14 brings huge usb audio latency improvements, but when I try to run Ardour on it, Ardour crashes after the session open dialog whenever Alsa MIDI raw devices are enabled. It starts when no MIDI driver or sequencer is chosen.

I see this on the console:
$ /opt/Ardour-6.9.0/bin/ardour6
Ardour6.9.0 (built using 6.9 and GCC version 6.3.0 20170516)
Ardour: [INFO]: Your system is configured to limit Ardour to 1048576 open files
Ardour: [INFO]: Loading system configuration file /opt/Ardour-6.9.0/etc/system_config
Ardour: [INFO]: Loading user configuration file /home/lentferj/.config/ardour6/config
Ardour: [INFO]: CPU vendor: GenuineIntel
Ardour: [INFO]: CPU brand: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
Ardour: [INFO]: Using SSE optimized routines
Ardour: [INFO]: Loading plugin meta data file /opt/Ardour-6.9.0/share/plugin_metadata/plugin_tags
Ardour: [INFO]: Loading plugin meta data file /home/lentferj/.config/ardour6/plugin_metadata/plugin_tags
Ardour: [INFO]: Loading plugin statistics file /home/lentferj/.config/ardour6/plugin_metadata/plugin_stats
Cannot xinstall SIGPIPE error handler
Ardour: [INFO]: Loading default ui configuration file /opt/Ardour-6.9.0/etc/default_ui_config
Ardour: [INFO]: Loading user ui configuration file /home/lentferj/.config/ardour6/ui_config
Ardour: [INFO]: Loading 452 MIDI patches from /opt/Ardour-6.9.0/share/patchfiles
Ardour: [INFO]: Loading color file /opt/Ardour-6.9.0/share/themes/dark-ardour.colors
Ardour: [INFO]: Loading ui configuration file /opt/Ardour-6.9.0/etc/clearlooks.rc
Ardour: [INFO]: Loading bindings from /opt/Ardour-6.9.0/etc/ardour.keys
Loading ui configuration file /opt/Ardour-6.9.0/etc/clearlooks.rc
Found nothing along /home/lentferj/.config/ardour6/templates:/opt/Ardour-6.9.0/share/templates
ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
ardour-6.9.0: rawmidi.c:268: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Aborted
lentferj@ts-d20:~$ watched PID no longer exists - releasing device.


This probably isn't an Ardour bug since Bitwig 4.0.1 has the same problem (Audio engine crashes whenever you plugin in a MIDI Keyboard - synth seem to be ok, though), but I am leaving this here, as I don't know where to put it.
Steps To ReproduceStart Ardour, new session, choose Audio Alsa and MIDI Alsa raw devices, start the session.
Additional InformationThis happens after installing Kernel 5.14. I tried to different versions, the Liquorix kernel and from here:
https://github.com/geoffreybennett/scarlett-gen2/releases
TagsNo tags attached.

Activities

lentferj

2021-09-19 13:35

reporter   ~0026144

additional info:
snd_rawmidi is loaded

# lsmod | grep -i snd
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_seq_dummy 16384 0
snd_seq 73728 3 snd_seq_midi,snd_seq_midi_event,snd_seq_dummy
snd_usb_audio 307200 0
snd_hda_codec_hdmi 61440 1
snd_usbmidi_lib 36864 1 snd_usb_audio
snd_hda_intel 53248 0
snd_rawmidi 36864 2 snd_seq_midi,snd_usbmidi_lib
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
mc 57344 5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_intel_dspcfg 20480 1 snd_hda_intel
snd_hda_codec 147456 2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core 94208 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
snd_aloop 28672 0
snd_pcm 122880 6 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_aloop,snd_hda_core
snd_timer 40960 3 snd_seq,snd_aloop,snd_pcm
snd 94208 12 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_aloop,snd_pcm,snd_rawmidi
soundcore 16384 1 snd

x42

2021-09-19 15:24

administrator   ~0026145

Last edited: 2021-09-19 15:25

View 2 revisions

> ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
> ardour-6.9.0: rawmidi.c:268: snd_rawmidi_open_conf: Assertion `err >= 0' failed.

Those are messages from libasound, alsa-lib [1]. Which version of that library are you using with the 5.14 kernel?


PS. I'm running a 5.10 kernel with alsa-lib 1.2.4. Perhaps the 5.14 kernel needs a newer alsa-lib?

[1] https://www.alsa-project.org/files/pub/lib/

x42

2021-09-19 15:32

administrator   ~0026146

Can you try to directly access it using alsa-tools. e.g.

amidi --dump -p hw:1

Replace hw:1 with the MIDI device ID, list devices with `amidi --list-devices`

lentferj

2021-09-19 16:02

reporter   ~0026147

Doesn't work either...

lentferj@ts-d20:~$ amidi --list-devices
Dir Device Name
IO hw:2,0,0 Saffire 6USB2.0 MIDI 1
IO hw:3,0,0 Neutron(1) MIDI 1
IO hw:4,0,0 Pulse2 MIDI 1
IO hw:5,0,0 LPK25 MIDI 1
lentferj@ts-d20:~$ amidi --dump -p hw:5
ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
amidi: rawmidi.c:268: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Aborted

I have the default Debian-Buster libasound install, I think...
ii libasound2:amd64 1.1.8-1 amd64 shared library for ALSA applications

lentferj

2021-09-19 16:46

reporter   ~0026148

So I compiled alsa-lib and alsa-utils manually (both 1.2.5). Still same problem....

$ which amidi
/usr/bin/amidi
lentferj@ts-d20:~$ ls -l /usr/bin/amidi
-rwxr-xr-x 1 root root 57064 Sep 19 18:34 /usr/bin/amidi
lentferj@ts-d20:~$ ldd /usr/bin/amidi
    linux-vdso.so.1 (0x00007ffc50c9b000)
    libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f9c97c85000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9c97b02000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9c97afd000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9c97adc000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9c9791b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9c97911000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9c97dc0000)
lentferj@ts-d20:~$ ls -l /usr/lib/libasound.so.2
lrwxrwxrwx 1 root root 18 Sep 19 18:29 /usr/lib/libasound.so.2 -> libasound.so.2.0.0
lentferj@ts-d20:~$ ls -l /usr/lib/libasound.so.2.0.0
-rwxr-xr-x 1 root root 5242136 Sep 19 18:29 /usr/lib/libasound.so.2.0.0
lentferj@ts-d20:~$ uname -a
Linux ts-d20 5.14.0 0000021 SMP Mon Aug 30 00:46:47 UTC 2021 x86_64 GNU/Linux


lentferj@ts-d20:~$ amidi -l
Dir Device Name
IO hw:2,0,0 Saffire 6USB2.0 MIDI 1
IO hw:3,0,0 Neutron(1) MIDI 1
IO hw:4,0,0 Pulse2 MIDI 1
IO hw:5,0,0 LPK25 MIDI 1
lentferj@ts-d20:~$ amidi --dump -p hw:5
ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
amidi: rawmidi.c:256: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Abgebrochen

x42

2021-09-19 16:57

administrator   ~0026150

I suggest to contact ALSA develpopers about this.

https://github.com/alsa-project/alsa-lib/issues
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

lentferj

2021-09-19 17:03

reporter   ~0026151

I booted into a 5.10 Kernel, everything works there. Booted back into 5.14... crash.

@x42 - yes, will do.

lentferj

2021-09-19 17:10

reporter   ~0026152

For reference:
https://github.com/alsa-project/alsa-lib/issues/178

x42

2021-09-19 20:16

administrator   ~0026153

Fixed upstream in alsa-lib: https://github.com/alsa-project/alsa-lib/issues/178

Issue History

Date Modified Username Field Change
2021-09-19 13:32 lentferj New Issue
2021-09-19 13:35 lentferj Note Added: 0026144
2021-09-19 15:24 x42 Note Added: 0026145
2021-09-19 15:25 x42 Note Edited: 0026145 View Revisions
2021-09-19 15:32 x42 Note Added: 0026146
2021-09-19 16:02 lentferj Note Added: 0026147
2021-09-19 16:46 lentferj Note Added: 0026148
2021-09-19 16:57 x42 Note Added: 0026150
2021-09-19 17:03 lentferj Note Added: 0026151
2021-09-19 17:10 lentferj Note Added: 0026152
2021-09-19 20:16 x42 Assigned To => x42
2021-09-19 20:16 x42 Status new => resolved
2021-09-19 20:16 x42 Resolution open => no change required
2021-09-19 20:16 x42 Note Added: 0026153