Loading midi soundfonts on startup

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Sun Sep 25 10:57:51 UTC 2005


On Sun, 2005-09-25 at 00:04 -0400, oliwally wrote:
> Ziyad, thank you so much for helping and for offering to nut the problem
> out.
This is what this list for, to help each other! :)

> 
> > What's the exact error message?
> 
> It all goes by very quickly, but the message says (several times)
> something on the line of "Warning modprobe.d...bad line starting with
> post-install, ingoring line 1"
> 
That's true!  For some time now, "modprobe" no longer accepts the
"post-install" directive!  I didn't know that until you mentioned it and
I went through the manual page for "modprobe.conf" to know that!
Thanks!

Apparently, the new way to do the "post-install" thing is like this (the
following is one long line):
        install snd-emu10k1-synth --ignore-install snd-emu10k1-synth && /lib/alsa/modprobe-post-install snd-emu10k1-synth

Now, create a file named, say, "snd-emu10k1-synth.post-install" in
"/etc/alsa/modprobe-post-install.d" and put in it:
        #!/bin/sh
        #
        # modprobe post-install script for alsa (snd-emu10k1-synth)
        
        /usr/bin/asfxload /etc/midi/8mbgmsfx.sf2

Change it's owner to "root:root" and permission to "rwxr-xr-x" by
running (the following are two lines):
        sudo chown root:root /etc/alsa/modprobe-post-install.d/snd-emu10k1-synth.post-install
        sudo chmod 0755 /etc/alsa/modprobe-post-install.d/snd-emu10k1-synth.post-install

 <snip>
> 
> I thought I'd chuck in my /etc/modules file to help figure things out.
> Some of the bits and pieces have been added on recommendation of
> various forums and how-tos in order to make Rosegarden work (and
> Rosegarden does work for me!)
> 
> 
> 
> /etc/modules:
> 
> Code:
> --------------------
>   # /etc/modules: kernel modules to load at boot time.
>   #
>   # This file contains the names of kernel modules that should be loaded
>   # at boot time, one per line. Lines beginning with "#" are ignored.  
> 
>   ide-cd
>   ide-disk
>   ide-generic
>   lp
>   mousedev
>   psmouse
>   nvidia
All the above is okay, however, did you try without them?  In hoary,
everything should be detected automatically and loaded accordingly
(except for the "lp" module).  This is not important, just a thought.

The following is a troublesome.  All this is already done on your behalf
by ALSA in Hoary.  Check "/etc/modprobe.d/alsa-base" and see for
yourself:
>   alias char-major-116 snd
>   alias char-major-14 soundcore
>   alias snd-card-0 snd-card-emu10k1
>   alias sound-slot-0 snd-card-0
>   alias sound-service-0-0 snd-mixer-oss
>   alias sound-service-0-1 snd-seq-oss
>   alias sound-service-0-3 snd-pcm-oss
>   alias sound-service-0-8 snd-seq-oss
>   alias sound-service-0-12 snd-pcm-oss
>   alias midi snd-synth-emu10k1
              ^^^^^^^^^^^^^^^^^
No module with this name on my system!!!  Where did you learned it from?
The module name is called "snd-emu10k1-synth".
>   below snd-seq-oss snd-synth-emu10k1
>   post-install snd-synth-emu10k1 usr/bin/sfxload /etc/midi/8MBGMSFX.SF2 ; alsactl restore
>   # uncomment to save volume settings at shutdown:
>   #pre-remove snd-synth-emu10k1 alsactl store  
> 
>   # the following was added to allow rosegarden to work from startup:
>   snd-seq-midi

Besides the error in the module name and the fact that ALSA is doing all
this for you, as I mentioned above: "post-install" and "below" no longer
work with "modprobe".

My advice for you is to comment all the lines in "/etc/modules" about
ALSA *except* one: "snd-seq-midi" and give my solution a try by
modifying "/etc/modprobe.d/soundfont" to include the modified line
above, and creating:
        /etc/alsa/modprobe-post-install.d/snd-emu10k1-synth.post-install
as instructed.

Again, keep the "snd-seq-midi" line in "/etc/modules" if you want MIDI
to work in your system.


> --------------------
> 
> Thanks again for your help.
> 
I hope this works, but you're welcome anyway. :)

> 
> -- 
> oliwally
> 
Ziyad.





More information about the ubuntu-users mailing list