You are not logged in.

#1 2013-05-11 09:09:02

toni
Member
Registered: 2011-10-15
Posts: 437

systemd: oss.service - module-oss is deprecated

I have installed oss4 and I have created an oss4.service as in arch wiki is said which contains the following lines:

[Unit]
Description=Open Sound System v4
Before=sound.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/soundon
ExecStop=/usr/sbin/soundoff

[Install]
WantedBy=multi-user.target

and systemctl status oss4.service is:

oss4.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss4.service; enabled)
   Active: active (exited) since sáb 2013-05-11 10:52:30 CEST; 10min ago
  Process: 435 ExecStart=/usr/sbin/soundon (code=exited, status=0/SUCCESS)

I have sound, and all seems to be ok, but for some reason in my /var/log/daemon.log there is an entry error saying:

systemd[1]: Cannot add dependency job for unit oss.service, ignoring: Unit oss.service failed to load: No such file or directory. See system logs and 'systemctl status oss.service' for details.

also dmesg is saying:

.....
[   14.536665] systemd[1]: Cannot add dependency job for unit oss.service, ignoring: Unit oss.service failed to load: No such file or directory. See system logs and 'systemctl status oss.service' for details.
.....
[    0.293333] vgaarb: bridge control possible 0000:00:02.0
[   14.536665] systemd[1]: Cannot add dependency job for unit oss.service, ignoring: Unit oss.service failed to load: No such file or directory. See system logs and 'systemctl status oss.service' for details.
[   24.653330] Adding 1993724k swap on /dev/sdb11.  Priority:-1 extents:1 across:1993724k 
[  128.219987] oss_hdaudio: HDA codec 0x10ec0270 not known yet
[  128.229987] oss_hdaudio: HDA codec 0x80862806 not known yet
[  128.229987] oss_hdaudio: HDA codec 0x10ec0270 not known yet
[  128.233320] oss_hdaudio: HDA codec 0x80862806 not known yet
[  128.323320] usbcore: registered new interface driver oss_usb
.....

# /var/log/errors.log :

...
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] module.c: Failed to load module "module-oss" (argument: "device="/dev/dsp" sink_name=output source_name=input mmap=0 "): initialization failed.
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] main.c: Module load failed.
May 11 11:05:22 localhost systemd-tmpfiles[2682]: stat(/run/user/1000/gvfs) failed: Permission denied
...
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] oss-util.c: open('/dev/dsp'): No existe el fichero o el directorio
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] module.c: Failed to load module "module-oss" (argument: "device="/dev/dsp" sink_name=output source_name=input mmap=0 "): initialization failed.

messages.log:

....
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!
May 11 10:52:29 localhost kernel: [  128.323320] usbcore: registered new interface driver oss_usb
....

user.log :

...
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] oss-util.c: open('/dev/dsp'): No existe el fichero o el directorio
May 11 10:51:58 localhost pulseaudio[1637]: [pulseaudio] module.c: Failed to load module "module-oss" (argument: "device="/dev/dsp" sink_name=output source_name=input mmap=0 "): initialization failed.
....

but I have check out /usr/lib/system.d/systemd/ folder and there is no such file oss.service, only oss4.service and ospd.service.
so how to uninstall module-oss and install new one module-alsa.card?

The output for systemctl status oss.service is:

oss.service
   Loaded: error (Reason: No such file or directory)
   Active: inactive (dead)

and for systemctl status ospd.service:

ospd.service
   Loaded: error (Reason: No such file or directory)
   Active: inactive (dead)

So how to solve the error entry that is appearing in daemon.log?

Thanks!

Last edited by toni (2013-05-11 09:41:13)

Offline

#2 2013-05-11 11:16:05

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: systemd: oss.service - module-oss is deprecated

Ehm... Sounds like some other service is trying to load oss.service as a dependecy and fails as it is not there...

Do you by any chance have pulseaudio service enabled? Are you using pulseaudio at all? If not, disable/uninstall and it should go away.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2013-05-11 11:27:47

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

Dheart wrote:

Ehm... Sounds like some other service is trying to load oss.service as a dependecy and fails as it is not there...

Do you by any chance have pulseaudio service enabled? Are you using pulseaudio at all? If not, disable/uninstall and it should go away.

I am not using pulseaudio, its daemon is not started, below output when I try to start it.

$pulseaudio --start
E: [pulseaudio] main.c: Daemon startup failed.

and if I execute pulseaudio:

$pulseaudio
W: [pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!
E: [pulseaudio] module.c: Failed to open module "module-cork-music-on-phone": file not found
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

Last edited by toni (2013-05-11 11:32:45)

Offline

#4 2013-05-11 12:01:17

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

Below line error:

W: [pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!

is caused because in /etc/pulse/default.pa I have a line saying:

load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0

because in arch wiki, related to oss support, they suggested to have this line but as it is not working if I replace module-oss by module-alsa-card:

load-module module-alsa-card device="/dev/dsp" sink_name=output source_name=input mmap=0

pulseaudio output is:

E: [pulseaudio] module-alsa-card.c: Failed to parse module arguments
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device="/dev/dsp" sink_name=output source_name=input mmap=0"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Fallo al intentar iniciar el demonio.
[toni@archlinux pulse]$ LC_ALL=C pulseaudio
E: [pulseaudio] module-alsa-card.c: Failed to parse module arguments
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device="/dev/dsp" sink_name=output source_name=input mmap=0"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

so, I comment line load-module module-alsa-card device="/dev/dsp" sink_name=output source_name=input mmap=0 and I put line load-module module-alsa-card in /etc/pulse/default.pa file, and pulseaudio outputs:

E: [pulseaudio] module-alsa-card.c: Card '0' doesn't exist: No such file or directory
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: ""): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

Finally, I comment previous line  load-module module-alsa-card in /etc/pulse/default.pa file, and I execute pulseaudio again, and its output is:

E: [pulseaudio] module.c: Failed to open module "module-cork-music-on-phone": file not found
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

My /etc/pulse/default.pa file content is:

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
#load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev/hal support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
#load-module module-jackdbus-detect
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
.nofail
load-module module-console-kit
.fail
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music streams when a phone stream is active
load-module module-cork-music-on-phone

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Load DBus protocol
.ifexists module-dbus-protocol.so
load-module module-dbus-protocol
.endif

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

### Make some devices default
#set-default-sink output
#set-default-source input

Last edited by toni (2013-05-11 12:06:02)

Offline

#5 2013-05-11 12:12:04

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

In my /etc/pulse/ folder there was a default.pa.pacnew so moved it into default.pa previously backing up my current default.pa file now pulseaudio can start.

but if I add below line again in /etc/pulse/default.pa:

load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0

adding mmap=0 for OSS support, below error is raised:

[pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!

so, why?

Last edited by toni (2013-05-11 14:08:11)

Offline

#6 2013-05-11 14:56:54

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: systemd: oss.service - module-oss is deprecated

You get pulseaudio related OSS errors. I think you have it enabled by accident. A simple
systemctl disable pulseaudio.service (or something) should fix it. The error logs are consistent with failed pulseaudio start-up that you demonstrated.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#7 2013-05-11 15:27:35

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

Dheart wrote:

You get pulseaudio related OSS errors. I think you have it enabled by accident. A simple
systemctl disable pulseaudio.service (or something) should fix it. The error logs are consistent with failed pulseaudio start-up that you demonstrated.

I have not any pulseaudio.service in /usr/lib/systemd/system folder.

Offline

#8 2013-05-11 21:33:25

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: oss.service - module-oss is deprecated

Something is starting the pulseaudio daemon in your user session (i.e., not systemd, something like KDE or GNOME I guess). If you are going to be using pulse, then you better use it with alsa, and not use OSS at all. Alternatively, make sure that you dont use pulse and you should be ok.

Offline

#9 2013-05-12 14:39:39

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

tomegun wrote:

Something is starting the pulseaudio daemon in your user session (i.e., not systemd, something like KDE or GNOME I guess). If you are going to be using pulse, then you better use it with alsa, and not use OSS at all. Alternatively, make sure that you dont use pulse and you should be ok.

I prefer using OSS4 so how to remove pulse since I think gnome 3 is using it for something?

gnome-settings-daemon
lives
paprefs
pulseaudio-alsa

I am worried about gnome 3 stops working by uninstalling completely pulseaudio. How to remove completely alsa and pulse without affecting gnome 3 and OSS4?

Furthermore, how to stop below message to appear in the logs? => Cannot add dependency job for unit oss.service, ignoring: Unit oss.service failed to load: No such file or directory. See system logs and 'systemctl status oss.service' for details.

I have and oss4.service created in /usr/lib/systemd/system but not an oss.service.

Thanks.

Last edited by toni (2013-05-12 14:42:11)

Offline

#10 2013-05-12 15:37:08

sonoran
Member
From: sonoran desert
Registered: 2009-01-12
Posts: 192

Re: systemd: oss.service - module-oss is deprecated

toni wrote:

I have installed oss4 and I have created an oss4.service as in arch wiki

Which oss package did you install? The package from the Community repo puts the oss.service file in /usr/lib/systemd/system. The wiki instructions about creating an oss4.service file are for the AUR package oss-hg.

Note that there is a new version of oss in Testing.

Offline

#11 2013-05-12 15:56:27

toni
Member
Registered: 2011-10-15
Posts: 437

Re: systemd: oss.service - module-oss is deprecated

sonoran wrote:
toni wrote:

I have installed oss4 and I have created an oss4.service as in arch wiki

Which oss package did you install? The package from the Community repo puts the oss.service file in /usr/lib/systemd/system. The wiki instructions about creating an oss4.service file are for the AUR package oss-hg.

Note that there is a new version of oss in Testing.

I had installed oss from community but I had some problems at linux startup: an annoying beep that started to sound and never stopped and after that I got to stop this annoying beep after a second (beep starts to sound and after a second it stops once configuration oss file is read). Some people told me to try oss-hg to solve this problem so I uninstalled oss from community and I installed oss-hg from AUR. This last is the one I have (anyway the annoying beep has not been solved - I have opened a thread as well related to this -).

I do not know if the new version of oss in Testing is correcting the beep issue. As I have read in other forums (http://www.opensound.com/) this issue is happening to more people, so I think it should be resolved, not sure If new version in testing is correcting this but it should be good.

Oss from community or oss-hg from AUR, the thing is that oss is causing me a lot of headaches. I think it should be improved a lot and it is not fully integrated in gnome 3.
For a moment I have thought in uninstall oss and install and use pulseaudio and alsa but I have maintained due to its high sound quality which uses a more precise algorithm.

Anyway as you say, arch wiki provides how to create a service (oss4.service) and I did. But for some reason something is raising oss.service and I have not any oss.service in my system and I have not installed oss, well oss-hg.

I want to stop that message to appear in my logs. Also, I have opened another thread related to the delay introduced by oss, both versions, community and AUR. See below:

$systemd-analyze
Startup finished in 6.498s (kernel) + 1min 28.654s (userspace) = 1min 35.153s

$ systemd-analyze blame
    1min 15.396s oss4.service <----------------------------------------------------- Note the big delay introduced by oss, I think it is not normal, something is happening.
         21.700s ModemManager.service
         20.293s NetworkManager.service
         18.768s clamd.service
          8.701s freshclamd.service
          4.828s colord.service
          3.944s gdm.service
          3.894s avahi-daemon.service
          3.831s systemd-logind.service
          3.756s systemd-vconsole-setup.service
          3.099s systemd-modules-load.service
          2.459s systemd-remount-fs.service
          2.317s dev-mqueue.mount
          2.282s dev-hugepages.mount
          2.183s sys-kernel-debug.mount
          1.834s systemd-tmpfiles-setup-dev.service
          1.776s systemd-binfmt.service
          1.724s alsa-restore.service
          1.487s accounts-daemon.service
          1.304s polkit.service
          1.150s wpa_supplicant.service
          1.066s proc-sys-fs-binfmt_misc.mount
          1.029s systemd-readahead-done.service
           923ms systemd-udev-trigger.service
           922ms systemd-tmpfiles-clean.service
           882ms systemd-fsck@dev-sdb10.service
           873ms systemd-fsck@dev-sdb5.service
           666ms tmp.mount
           570ms systemd-journal-flush.service
           358ms home.mount
           293ms systemd-sysctl.service
           276ms systemd-tmpfiles-setup.service
           262ms systemd-readahead-replay.service
           220ms systemd-fsck@dev-sdb7.service
           213ms systemd-user-sessions.service
           208ms systemd-udevd.service
           207ms udisks2.service
           163ms upower.service
           159ms systemd-random-seed-load.service
           138ms systemd-readahead-collect.service
           124ms var.mount
            87ms dev-sdb11.swap
            56ms bluetooth.service
            35ms sys-fs-fuse-connections.mount
            30ms rtkit-daemon.service
            26ms boot.mount
            20ms sys-kernel-config.mount

I would like to solve all the problems I have related to oss, one is the annoying beep issue, another is the big delay introduced and also as said in arch wiki, add mmap=0 by doing the following to support OSS:

/etc/pulse/default.pa:

load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0

why below error is raised? Yes, I know module-oss is deprecated but how to achieve this now if mmap=0 is not supported?

[pulseaudio] module.c: module-oss is deprecated: Please use module-alsa-card instead of module-oss!

So maybe it is necessary to remove completely pulseaudio and alsa, and install again OSS.
So how to remove completely pulseaudio and alsa but without affecting gnome3? I think as I have said in the previous post that gnome 3 depends on pulseaudio.

Thanks.

Last edited by toni (2013-05-12 16:14:29)

Offline

#12 2013-05-12 16:57:53

sonoran
Member
From: sonoran desert
Registered: 2009-01-12
Posts: 192

Re: systemd: oss.service - module-oss is deprecated

Your oss4.service file is identical to the oss.service file except for the name. Maybe make a copy and name it oss.service and keep them both? What's the worst that could happen - Quadrophenia?

As I recall the best way to lobotomize pulseaudio is to uninstall alsa-plugins-pulseaudio. Other packages depend on pulse libs and alsa libs so you cannot remove those.

On my system oss4 takes ~59 seconds to start, at which time it spams the tty with two "...not known yet" messages. Maybe the new version will fix that.

Offline

#13 2013-05-16 01:17:07

nuc
Member
Registered: 2012-04-26
Posts: 117

Re: systemd: oss.service - module-oss is deprecated

Hi toni!
The issue that OSSv4 starts very long is described here https://bugs.archlinux.org/task/33969 (read the whole bugreport), although it is annoying quite annoying, it does not appear to do any harm apart from that.

Also http://www.opensound.com/forum/viewforu … 358ee8299d is a very good source of information. You might want to make a thread about your issue there, too, because the support is quite competent.
(As you've already stated) The beep issue is also addressed there.

What I do not really understand, is why you create your own systemd service file, because on my system it is already present. Also the HG repo was dropped in favor of GIT so it is not up2date anymore http://opensound.git.sourceforge.net/gi … ;a=summary
Anyways, there arent too many changes so I just recommend sticking to OSSv4 from Arch repos.

Hope you will be able to resolve your issues

nuc

Offline

Board footer

Powered by FluxBB