Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] CMI8738: Midi port randomly causes system reboot

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
dust hill resident
Posts: 240
Joined: 2007-05-18 13:31

[SOLVED] CMI8738: Midi port randomly causes system reboot

#1 Post by dust hill resident »

Hello,

I've got a problem with a C-Media CMI8738 soundcard. It creates a MIDI port labelled "C-Media CMI8738, C-Media CMI8738 MIDI" at 20:0.
My system has been suddenly and unexpectedly rebooting when I open files in Rosegarden (MIDI sequencer software). I have worked out that it's this MIDI port that is the problem: I can reliably reproduce the sudden/unexpected reboot by playing MIDI files with aplaymidi and specifying 20:0 as the port. I tested all the other ports and I am certain it's only this one that causes the reboot.

Code: Select all

 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 16:0    SB Audigy 2 Value [Unknown]      Audigy MPU-401 (UART)
 16:32   SB Audigy 2 Value [Unknown]      Audigy MPU-401 #2
 17:0    Emu10k1 WaveTable                Emu10k1 Port 0
 17:1    Emu10k1 WaveTable                Emu10k1 Port 1
 17:2    Emu10k1 WaveTable                Emu10k1 Port 2
 17:3    Emu10k1 WaveTable                Emu10k1 Port 3
 20:0    C-Media CMI8738                  C-Media CMI8738 MIDI
 21:0    OPL3 FM synth                    OPL3 FM Port
I'm looking for a workaround for this problem. An ideal workaround would make it so that the port is never created, or otherwise make it so that the port doesn't exist (so that Rosegarden and other midi softwares won't try to probe it)
So far I've tried loading the snd_cmipci module with option "mpu_port=0", but the MIDI port still appears, and the crash/reboot still happens when I play midi files through the port.
I tried deleting the snd_mpu401_uart module but then snd_cmipci refused to load.

A workaround is necessary because Rosegarden seems to make a connection (or otherwise do something) with all MIDI ports when it initialises and there doesn't seem to be a way to stop it from doing that.

Using a different soundcard is not an option, I specifically want this card for the OPL3 synth feature.

Does anyone have any ideas?
Last edited by dust hill resident on 2019-12-16 17:37, edited 1 time in total.

User avatar
dust hill resident
Posts: 240
Joined: 2007-05-18 13:31

#2 Post by dust hill resident »

Hello,

I posted about this issue on the alsa-user mailing list and Takashi Iwai provided a patch that allows you to disable the midi port with the "mpu_port=0" option.
https://www.mail-archive.com/alsa-user@ ... 32648.html

I've tested the patch and it works great.

Thanks,
dhr

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re:

#3 Post by None1975 »

dust hill resident wrote:I've tested the patch and it works great.
Thanks for share it!
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

Post Reply