LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2014, 11:23 AM   #1
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Rep: Reputation: Disabled
Question modprobe OSS - not auto-loading module in Arch Linux


Hello!

I tested a lot but still it doesn't loading automatically on boot.

My /etc/modprobe.d/snd_pcm_oss.conf
Code:
alias  oss snd_pcm_oss
install snd_pcm_oss modprobe -i oss
#install snd_pcm_oss modprobe -i snd_pcm_oss
#snd_pcm_oss
 
Old 10-08-2014, 12:14 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
You might find this helpful, from the Arch Wiki.
 
Old 10-08-2014, 12:24 PM   #3
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
I did all that, as you my commented part in file, file name and few ways to load, but still ...
I don't know how to use options command in *.conf files fpr snd_pcm_oss, it is not a kernel module as I understand too, or am I wrong? I was looking much and read in forums and wikis and tested but not working or am I doing something wrong?

Is my snd_pcm_oss.conf file correct?
 
Old 10-08-2014, 12:30 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Before I explain the config file, i would like to check a couple things with you. You mention it does not load automatically at boot,..
  • If you load the module from the command line, does it work?
  • When you do an lsmod, you can see the module loaded?
  • If so, what command are you using to load the modules from the commandline?

There is no sense in discussing the config file, if you cannot get it to work from the command line.
 
Old 10-08-2014, 12:38 PM   #5
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
* Yes, it works from a command line.
* Yes, I can see it if I load it from the command line.
* I am using modprobe snd_pcm_oss to load it.

I need make snd_pcm_oss load automatically at boot without need to use modprobe each time but I am lost.
 
Old 10-08-2014, 12:56 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Ok. Thank you.

Now, when you have this config:

Code:
/etc/modprobe.d/snd_pcm_oss.conf
snd_pcm_oss
It does not work? What do you see in the logs regarding it?

Setting the debugging level higher might help as well: https://wiki.archlinux.org/index.php/boot_debugging

Once we have an error to work with, it will be easier to debug the issue.

Last edited by szboardstretcher; 10-08-2014 at 12:59 PM.
 
Old 10-08-2014, 01:07 PM   #7
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
No, it doesn't.

But when I loading from the command line then I it shows an error... it loads module but ignores line in the file.
Code:
$ modprobe snd_pcm_oss
libkmod: kmod_config_parse: /etc/modprobe.d/snd_pcm_oss.conf line 1: ignoring bad line starting with 'snd_pcm_oss'
 
Old 10-08-2014, 01:12 PM   #8
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
I have installed pulseaudio-alsa and alsa-oss for making some of my programs to work and I need oss module to load on boot. Some users are restricted to use sudo so only I can run modprobe and it's not a good alternative to be with computer each time someone need to use it.
 
Old 10-08-2014, 01:23 PM   #9
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
I made a file called /etc/modprobe.d/sound.conf and added this:

Code:
install snd_pcm_oss modprobe -i snd_pcm_oss
And it loaded on startup. I also added my user to the 'audio' group. This seems to have worked.
 
Old 10-08-2014, 01:35 PM   #10
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
This doesn't work either... it might be a bug in Arch Linux or the sound program that I installed... I will look for another way to load it may be will make a service that will run it if possible... or another way where I can add it to autostart with system...

Thanks for your time! I will continue my researches...
 
Old 10-08-2014, 01:46 PM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Did you turn debugging on and find the error related to the module at startup?

I would rather debug that than create a workaround, but if you want a work around, you can do this:

Create a systemd service to run rc.local (do all of this as root please):

Code:
#unload the module if loaded
rmmod snd_pcm_oss
lsmod | grep snd_pcm (verify that it has been unloaded)
Code:
#create the rc-local systemd service
cat << EOF > /etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
EOF
Then in rc.local, add your modprobe command:
Code:
 
echo #!/bin/bash > /etc/rc.local
echo /usr/bin/modprobe snd_pcm_oss >> /etc/rc.local
chmod +x /etc/rc.local
Activate the unit:
Code:
systemctl enable rc-local.service
Run the unit for testing:
Code:
systemctl start rc-local.service
Check for module loading, if it worked, try a reboot to see if it loads again:
Code:
lsmod|grep pcm
When you reboot, systemd will run the command in rc.local which should add the module to your kernel.

Last edited by szboardstretcher; 10-08-2014 at 02:21 PM.
 
Old 10-08-2014, 02:11 PM   #12
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
Unhappy

Code:
systemctl start rc-local.service
Job for rc-local.service failed. See 'systemctl status rc-local.service' and 'journalctl -xn' for details.
[root@andy andy]# systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; static)
   Active: failed (Result: exit-code) since ons 2014-10-08 20:04:10 CEST; 16s ago
  Process: 1372 ExecStart=/etc/rc.local start (code=exited, status=203/EXEC)

okt 08 20:04:10 andy systemd[1]: rc-local.service: control process exited, code=exited status=203
okt 08 20:04:10 andy systemd[1]: Failed to start /etc/rc.local Compatibility.
okt 08 20:04:10 andy systemd[1]: Unit rc-local.service entered failed state.
I also tested to chmod +x /etc/rc.local
Here is "journalctl -xn" output
Code:
-- Subject: Process /etc/rc.local could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /etc/rc.local could not be executed and failed.
-- 
-- The error number returned while executing this process is 8.
okt 08 20:07:51 andy systemd[1]: rc-local.service: control process exited, code=exited status=203
okt 08 20:07:51 andy systemd[1]: Failed to start /etc/rc.local Compatibility.
-- Subject: Unit rc-local.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rc-local.service has failed.
-- 
-- The result is failed.
okt 08 20:07:51 andy systemd[1]: Unit rc-local.service entered failed state.
 
Old 10-08-2014, 02:22 PM   #13
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
I forgot the install section and the shebang line.

Code:
#create the rc-local systemd service
cat << EOF > /etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
EOF
Then in rc.local, add your modprobe command with absolute path:

Code:
echo #!/bin/bash > /etc/rc.local
echo /usr/bin/modprobe snd_pcm_oss >> /etc/rc.local
chmod +x /etc/rc.local

Last edited by szboardstretcher; 10-08-2014 at 02:25 PM.
 
Old 10-08-2014, 02:22 PM   #14
Andy_Crowd
Member
 
Registered: Jan 2014
Posts: 62

Original Poster
Rep: Reputation: Disabled
You answered before I wrote
I can start service with no problem now. I still need to do some checks...
 
Old 10-08-2014, 02:26 PM   #15
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Nice. If you found all this time and effort helpful,. you can always click 'i found this helpful' on the posts.
 
  


Reply

Tags
arch linux, auto, load, modprobe, oss


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Modprobe Loading module error sourkeys Linux - Newbie 6 04-18-2010 03:51 PM
Module not loading with modprobe ndiswrapper BobNutfield Slackware 7 05-20-2008 11:51 AM
modprobe module name and man page name auto-completion GushpinBob Slackware 8 03-24-2008 09:36 AM
Modprobe, Loading module problem mickeyboa Fedora 2 08-22-2007 09:48 PM
Auto loading a NIC module in RH9 MadTurki Linux - Networking 1 12-23-2003 02:21 PM


All times are GMT -5. The time now is 04:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration