LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-30-2006, 03:12 AM   #1
philipjg
LQ Newbie
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 9

Rep: Reputation: 0
How do I load the sound card module during boot?


Greetings.
Firstly, let me say how good it is to finally find a distro that works right first time. Xubuntu runs sweetly on my old AMD K6-2 400 box with 128Mb of RAM. Good work.
I've tried several distros. Trust me. I've lost count the number of times I've formatted hard drives to ext2. Xubuntu is far and away the most non-technical friendly OS. Good work.

However, there is just one little shortcoming. My sound chip wasn't recognized. It's a Yamaha OPL3SA2. By searching this site, I found a command line that works perfectly. (Thanks to whoever posted it.) It goes like this;
/sbin/modprobe snd-opl3sa2 index=0 id=CARD_0 port=0x370 sb_port=0x220 wss_port=0x530 midi_port=-1 fm_port=-1 irq=5 dma1=0 dma2=1 isapnp=0

I don't want, of course, to run this every session.

How do I load this module during boot?
Which file should I modify to do the job?

Many thanks
 
Old 08-30-2006, 06:30 AM   #2
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
maybe /etc/modules
 
Old 08-30-2006, 11:33 AM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by philipjg
Greetings.
Firstly, let me say how good it is to finally find a distro that works right first time. Xubuntu runs sweetly on my old AMD K6-2 400 box with 128Mb of RAM. Good work.
I've tried several distros. Trust me. I've lost count the number of times I've formatted hard drives to ext2. Xubuntu is far and away the most non-technical friendly OS. Good work.

However, there is just one little shortcoming. My sound chip wasn't recognized. It's a Yamaha OPL3SA2. By searching this site, I found a command line that works perfectly. (Thanks to whoever posted it.) It goes like this;
/sbin/modprobe snd-opl3sa2 index=0 id=CARD_0 port=0x370 sb_port=0x220 wss_port=0x530 midi_port=-1 fm_port=-1 irq=5 dma1=0 dma2=1 isapnp=0

I don't want, of course, to run this every session.

How do I load this module during boot?
Which file should I modify to do the job?

Many thanks
You need to modify one file and create a new one. First put in the /etc/modules on a line by itself the snd-opl3sa2 to have the module loaded on boot. Then create the file /etc/modprobe.d/sound_card with this for the contents.

Code:
## Added by me for sound card detection
options snd-opl3sa2 index=0 id=CARD_0 port=0x370 sb_port=0x220 wss_port=0x530 midi_port=-1 fm_port=-1 irq=5 dma1=0 dma2=1 isapnp=0
 
Old 08-30-2006, 11:49 PM   #4
IndianMaverick
LQ Newbie
 
Registered: Jul 2006
Posts: 20

Rep: Reputation: 0
may be a dumb, but there is a start up file that runs at stat up, i'm not sure whether it is /etc/rc.d or /etc/rc.local . edit one of these files with your
/sbin/modprobe snd-opl3sa2 index=0 id=CARD_0 port=0x370 sb_port=0x220 wss_port=0x530 midi_port=-1 fm_port=-1 irq=5 dma1=0 dma2=1 isapnp=0

and see whether it works.sorry if i'm wrong.
 
Old 08-31-2006, 12:13 AM   #5
BiThian
Member
 
Registered: Aug 2006
Location: Romania
Distribution: NetBSD 3.1
Posts: 118

Rep: Reputation: 15
My advice: edit your /etc/rc.d/rc.modules
 
Old 08-31-2006, 07:59 AM   #6
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
/etc/rc.d/rc.modules dose not exist in debian/ubuntu
 
Old 08-31-2006, 06:48 PM   #7
philipjg
LQ Newbie
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you

Many thanks for your replies.

As already noted, rc.d file does not exist in Ubuntu.

Your suggestions will work, if only I could edit the files.
When attempting to modify /etc/modules, I don't have permission, even using sudo. I've tried chmod without success, to allow write permission.

I've just upgraded the box to 256Mb and AMD K6-III 450 CPU. Xubuntu performs even faster. Not bad for $30. Who needs dual core? (Maybe one day.)

Help with modifying /etc/modules now needed.

Thanks again.

Last edited by philipjg; 08-31-2006 at 06:52 PM.
 
Old 08-31-2006, 07:08 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by philipjg
Many thanks for your replies.

As already noted, rc.d file does not exist in Ubuntu.

Your suggestions will work, if only I could edit the files.
When attempting to modify /etc/modules, I don't have permission, even using sudo. I've tried chmod without success, to allow write permission.

I've just upgraded the box to 256Mb and AMD K6-III 450 CPU. Xubuntu performs even faster. Not bad for $30. Who needs dual core? (Maybe one day.)

Help with modifying /etc/modules now needed.

Thanks again.
I'm not too familiar with the Xubuntu does it install like a regular distro? One thing you can always try is boot with something like a Knoppix live CD then mount your / partition and edit it from there.
 
Old 08-31-2006, 07:15 PM   #9
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
/etc/modules should be 644 (-rw-r--r--)
if not then do
Code:
sudo chmod 644 /etc/modules
then you can edit it with
Code:
sudo nano /etc/modules
or use any editor
 
Old 09-01-2006, 05:51 AM   #10
philipjg
LQ Newbie
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Alles gut

Thanks for all your help.

All is well, sound card module loads and there's even sound.

Cheers
 
Old 06-29-2007, 03:53 PM   #11
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Rep: Reputation: 15
I'd like to know what is the best, or most commonly accepted standard way of doing this. There are two or three methods desribed above, /etc/modules, then /etc/rc.d/rc.modules and then there is always /etc/rc.d/rc.local at least in slackware.

I don't think rc.local is the best, but probably the easiest. rc.modules appears on my system to be a link to rc.modules-kernelversion, which must be so when booting different kernel versions, appropriate modules can be loaded.

Looking into the the script /etc/rc.modules, /etc/modules.conf appears in the script, so I'm guessing the script loads modules listed in modules.conf. I would assume then, that at least in this case, /etc/modules.conf is the proper way to add modules for insertion at boot time?
 
  


Reply

Tags
boot, load, sound



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
cannot load sound module hellfire73 Linux - Software 3 03-18-2006 11:17 PM
X won't load i810 module for 915GM video card "module requirement mismatch" yougene Slackware 10 03-18-2006 10:02 AM
auto load sound module charafantah Linux - Hardware 4 03-05-2006 07:54 AM
[SOLVED] sound card driver does not load on boot uncle guido SUSE / openSUSE 2 01-26-2005 01:21 PM
How can I load the right module of my network card? ICO Slackware 14 01-28-2004 09:42 PM

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

All times are GMT -5. The time now is 07:27 PM.

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