LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-10-2017, 05:04 PM   #1
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Rep: Reputation: Disabled
Trying to follow howto; no /etc/modules file anymore


I'm trying to follow the guide at http://tldp.org/HOWTO/MIDI-HOWTO-10.html. One of the first things it tells me to do is make some changes to my /etc/modules.conf file. That file no longer exists. I did find a LinuxQuestions post that said that I should make the changes the file suggests to /etc/rc.d/rc.modules, but there's a lot of BASH scripting in there that I don't understand at this point. What should I do?

Code:
For that we need to extend the ALSA section in /etc/modules.conf (or in another location, depending on your distribution) with the following:

 # Configure support for OSS /dev/sequencer and 
 # /dev/music (aka /dev/sequencer2)
 # (Takashi Iwai advises that it is unnecessary 
 # to alias these services beyond the first card, i.e., card 0)
 alias sound-service-0-1 snd-seq-oss
 alias sound-service-0-8 snd-seq-oss

 # Configure card 1 (second card) as a virtual MIDI card
 alias sound-slot-1 snd-card-1
 alias snd-card-1 snd-virmidi
 
Old 08-10-2017, 05:59 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
This document is 15 years old (dated May 2002). I very much doubt that it be still applicable with today's sound systems, at least without much efforts.
 
Old 08-10-2017, 07:42 PM   #3
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
All I really want to know is how to use MIDI from scratch in C++. I have Rosegarden that I can play MIDI in, but the program I want to write needs to be able to create and play a MIDI sequence. That's what I need the guide for...
 
Old 08-10-2017, 08:05 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
your config box shows that you are probably wanting to use /etc/modprobe.d/alsa.conf

as you have not named your distro its a bit hard to guess

alsa now uses udev rules to detect and configure sound devices,

you can see some card info from your libasound* package
https://packages.debian.org/stretch/...-data/filelist

search your package manager for libasound and alsa and you should get multiple hits
 
Old 08-10-2017, 08:16 PM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by aus9 View Post
as you have not named your distro its a bit hard to guess
This was posted in the Slackware subforum, so it's a good bet that OP is running Slackware.
 
Old 08-10-2017, 08:20 PM   #6
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
I would modify file

Quote:
/etc/rc.d/rc.modules.local
to load additional/custom modules. Sorry I cannot help with anything that has to do with MIDI
 
1 members found this post helpful.
Old 08-10-2017, 09:17 PM   #7
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jmccue View Post
I would modify file



to load additional/custom modules. Sorry I cannot help with anything that has to do with MIDI
Now how do I reload /etc/rc.d/rc.modules.local? Do I just need to restart the computer, or can I reload it without restarting?
 
Old 08-10-2017, 09:19 PM   #8
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aus9 View Post
your config box shows that you are probably wanting to use /etc/modprobe.d/alsa.conf

as you have not named your distro its a bit hard to guess

alsa now uses udev rules to detect and configure sound devices,

you can see some card info from your libasound* package
https://packages.debian.org/stretch/...-data/filelist

search your package manager for libasound and alsa and you should get multiple hits
I have added my distro to my profile.
 
Old 08-10-2017, 09:24 PM   #9
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by maschelsea View Post
Now how do I reload /etc/rc.d/rc.modules.local? Do I just need to restart the computer, or can I reload it without restarting?
Just run it as root. That's all that /etc/rc.d/rc.modules is doing...
Code:
# Run a local (sysadmin-version) of rc.modules if it exists:
if [ -x "/etc/rc.d/rc.modules.local" ]; then
  /etc/rc.d/rc.modules.local
fi
That won't unload anything that you've accidentally loaded, but you can always reboot if that's an issue (or run the rmmod command as root as well).
 
Old 08-11-2017, 02:21 AM   #10
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
OOPs sorry about not seeing it was slackware.

I put on goggles....heck I am good looking too
 
Old 08-11-2017, 12:06 PM   #11
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
OK. I only have one sound card, so I deleted the two lines for the second card. My file looks like this:

Code:
root@caitlyn:~# cat /etc/rc.d/rc.modules.local
#!/bin/sh

# /etc/rc.d/rc.modules.local

# The Linux kernel source is the best place to look for documentation
# for the many available kernel modules.  This can be found under
# /usr/src/linux-$VERSION/Documentation/.

# Almost all necessary modules are automatically loaded when needed,
# but there are a few exceptions.  Here's a (not all-inclusive) list,
# so uncomment any of the below entries or add others as needed:
# Note that you could also create/edit rc.modules-$version if you
# only wanted specific modules loaded for particular kernels.

#/sbin/modprobe tun            # Universal TUN/TAP device driver
#/sbin/modprobe sg             # Generic SCSI support for SATA DVD-RW

#Configure support for OSS /dev/sequencer and 
# /dev/music (aka /dev/sequencer2)
# (Takashi Iwai advises that it is unnecessary 
# to alias these services beyond the first card, i.e., card 0)
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
but when I run it, I get this:

Code:
root@caitlyn:~# /etc/rc.d/rc.modules.local
/etc/rc.d/rc.modules.local: line 22: alias: sound-service-0-1: not found
/etc/rc.d/rc.modules.local: line 22: alias: snd-seq-oss: not found
/etc/rc.d/rc.modules.local: line 23: alias: sound-service-0-8: not found
/etc/rc.d/rc.modules.local: line 23: alias: snd-seq-oss: not found
Now I KNOW that my system has the capability for virtual MIDI, because I've been using it in Rosegarden. I have to issue the following three lines before I can use Rosegarden with MIDI, but otherwise it works for me.
Code:
michael@caitlyn rosegarden $ cat ~/Rosegarden\ MIDI\ startup [root]
jackd -r -m -t 10000 -d alsa -d hw:Loopback -P -o 2 -r 44100 -S -s -m &
alsaloop -C hw:Loopback,1,0 -P pulse &
fluidsynth -a jack -g 1.5 -j -l -m alsa_seq -K 0 /usr/share/sounds/sf2/FluidR3_GM.sf2
So why won't my aliases work?

Last edited by maschelsea; 08-11-2017 at 12:12 PM.
 
Old 08-11-2017, 12:17 PM   #12
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Looking at /dev/snd, where my sound devices live, I see:
Code:
root@caitlyn:~# ls /dev/snd
by-path/   controlC2  hwC1D0  hwC1D3    midiC3D2  pcmC0D0p  pcmC1D7p  pcmC2D0c  pcmC2D1p
controlC0  controlC3  hwC1D1  midiC3D0  midiC3D3  pcmC0D2c  pcmC1D8p  pcmC2D0p  seq
controlC1  hwC0D0     hwC1D2  midiC3D1  pcmC0D0c  pcmC1D3p  pcmC1D9p  pcmC2D1c  timer
I'm pretty sure that those midi* files weren't there before I modprobed snd-virmidi. Could this be a clue?
 
Old 08-12-2017, 07:00 AM   #13
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
My initial response was "why don't you just load snd-seq-oss?" -- BUT:

The 'alias' bother me, so I looked at a RHEL system people use at Work and I notice on that system there is a file (dist.conf) in Dir /etc/modprobe.d/ that contain statements that start with 'alias'.

So, my guess is you may need to create a file in /etc/modprobe.d/ with those aliases and remove them from /etc/rc.d/rc.modules.local

HTH
 
Old 08-12-2017, 10:36 PM   #14
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by maschelsea View Post
So why won't my aliases work?
I would be surprised if you are running OSS under linux in 2017.

@jmccue is correct in that
Code:
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
belong in a file in /etc/modprobe.d. See
Code:
man modprobe.d
You use /etc/rc.d/rc.modules.local to manually load modules (in other words, not rely on udevd to do it for you). You use configuration files in /etc/modprobe.d/ to configure those modules or otherwise control the modprobe/insmod/rmmod commands.
 
Old 08-13-2017, 06:30 AM   #15
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
It's worth pointing out that most of the old /etc/thingummy.conf files have been replaced by /etc/thingummy.d directories. You create .conf files for individual instances (for example individual kernel modules) and put them in that directory instead of having one big configuration file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I tell wget not to follow links in a file? fang2415 Linux - Software 10 04-11-2011 04:44 PM
FATAL: Could not load /lib/modules/2.6.14-default/modules.dep no such file exist dr_zayus69 Linux - Software 3 12-26-2005 06:44 PM
Howto `follow` Software RAID mesgs anand_kt Linux - General 1 02-20-2005 08:31 AM
useful /etc/modules.conf HOWTO? hoyt Red Hat 5 08-29-2003 12:38 PM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration