[Arch Linux, systemd] Very loud beep never stops

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

rrodriguez1975
Member
Posts: 14
Joined: Fri Apr 26, 2013 10:40 am

[Arch Linux, systemd] Very loud beep never stops

Postby rrodriguez1975 » Fri Apr 26, 2013 10:49 am

Hi all!
I had a laptop with arch linux x86 (32-bit) and OSS installed. That laptop died... so I have bought a new one and I have migrated my linux distro from old laptop to new one.
Now, my distro is arch linux x86_64 (64-bit) and I have problems with OSS. Once login and oss service starts, an annoying constant and very loud beep is starting and it never stops. I have blacklisted pcspkr in order to avoid this beep, but when I execute ossdetect from console, the beep is starting again....
So do you know how to solve this? How can I configure my sound card correctly to be used with oss?

Thanks in advance!
Last edited by rrodriguez1975 on Sun Apr 28, 2013 8:59 am, edited 1 time in total.

cesium
Developer
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby cesium » Fri Apr 26, 2013 2:53 pm

Hmm.. Can you paste 'ossinfo -v3' and 'ossmix -a' output? Also, what happens when you mute channels in ossxmix? Maybe some input is turned on when it should be muted...

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Fri Apr 26, 2013 3:59 pm

rrodriguez1975 wrote:Hi all!
I had a laptop with arch linux x86 (32-bit) and OSS installed. That laptop died... so I have bought a new one and I have migrated my linux distro from old laptop to new one.
Now, my distro is arch linux x86_64 (64-bit) and I have problems with OSS. Once login and oss service starts, an annoying constant and very loud beep is starting and it never stops. I have blacklisted pcspkr in order to avoid this beep, but when I execute ossdetect from console, the beep is starting again....
So do you know how to solve this? How can I configure my sound card correctly to be used with oss?

Thanks in advance!


If you are an Arch Linux user, you should know that blacklisting of a module does not prevent it from loading. If you do not know such things, you may better try Linux Mint. It makes sense, because Arch Linux is extremely buggy, it is infected with systemd which can load any crap in an unpredictable way.

In short, pcspkr is likely to be loaded. You may see this with lsmod

Code: Select all

$ lsmod | grep pcspkr


You may try to unload it:

Code: Select all

$ sudo rmmod pcspkr


You may also try to prevent pcspkr from loading

Note: The blacklist command will blacklist a module so that it will not be loaded automatically, but the module may be loaded if another non-blacklisted module depends on it or if it is loaded manually.
However, there is a workaround for this behaviour; the install command instructs modprobe to run a custom command instead of inserting the module in the kernel as normal, so you can force the module to always fail loading with:

Code: Select all

/etc/modprobe.d/blacklist.conf
...
install module_name /bin/false
...

This will effectively blacklist that module and any other that depends on it.
https://wiki.archlinux.org/index.php/Ke ... obe.d.2F_2


See also:
Disable PC Speaker Beep
https://wiki.archlinux.org/index.php/Di ... eaker_Beep

It is not very probable that you have OSS4 installed.

Therefore, you may better ask such "questions" on Arch Linux forum:
https://bbs.archlinux.org/viewforum.php?id=23


cesium wrote:Hmm.. Can you paste 'ossinfo -v3' and 'ossmix -a' output? Also, what happens when you mute channels in ossxmix? Maybe some input is turned on when it should be muted...


and also:

Code: Select all

$ lsmod | grep oss
$ lsmod | grep snd

rrodriguez1975
Member
Posts: 14
Joined: Fri Apr 26, 2013 10:40 am

Re: Constant and continuous beep does not stop never

Postby rrodriguez1975 » Fri Apr 26, 2013 4:07 pm

cesium wrote:Hmm.. Can you paste 'ossinfo -v3' and 'ossmix -a' output? Also, what happens when you mute channels in ossxmix? Maybe some input is turned on when it should be muted...


Hi Cesium,
First of all, I highly appreciate your help. Thanks in advance.

Below the results step by step.

Once logging I do the following:

1.- Output for systemctl status oss.service

Code: Select all

oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled)
   Active: activating (start) since vie 2013-04-26 19:42:18 CEST; 1min 42s ago
 Main PID: 438 (soundon)
   CGroup: name=systemd:/system/oss.service
           ├─438 /bin/sh /usr/sbin/soundon
           ├─463 /usr/sbin/ossvermagic -z -s
           └─464 /usr/sbin/ossvermagic -z -s


2.- Output for ossinfo -v3

Code: Select all

No /dev/mixer device available in your system.
Perhaps Open Sound System is not installed or running.


3.- Output for ossmix -a

Code: Select all

/dev/mixer: No such file or directory


4.- At this point I do the following.
Output for systemctl status oss.service:

Code: Select all

oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled)
   Active: activating (start) since vie 2013-04-26 19:42:18 CEST; 2min 24s ago
 Main PID: 438 (soundon)
   CGroup: name=systemd:/system/oss.service
           ├─ 438 /bin/sh /usr/sbin/soundon
           ├─ 463 /usr/sbin/ossvermagic -z -s
           ├─ 464 /usr/sbin/ossvermagic -z -s
           ├─4944 sh -c gunzip -c /usr/lib/modules/3.8.8-2-ARCH/kernel/driver...
           └─4946 /bin/sh /usr/bin/gunzip -c /usr/lib/modules/3.8.8-2-ARCH/ke...


5.-As in step 2 it is said that maybe open sound system is not installed and running, first I do soundoff and then soundon:
5.1- Output for soundoff

Code: Select all

OSS not loaded.


5.2- Output for soundon

Code: Select all

/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory
/tmp/oss.tmpmodule: No such file or directory

(....)


6.- Again output for systemctl status oss.service after doing soundon:

Code: Select all

oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled)
   Active: activating (start) since vie 2013-04-26 19:42:18 CEST; 2min 59s ago
 Main PID: 438 (soundon)
   CGroup: name=systemd:/system/oss.service
           ├─ 438 /bin/sh /usr/sbin/soundon
           └─6421 sync


Again I show output twice again

Code: Select all

oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled)
   Active: active (exited) since vie 2013-04-26 19:45:39 CEST; 9s ago
  Process: 438 ExecStart=/usr/sbin/soundon (code=exited, status=0/SUCCESS)


7.- Now again I execute the commands you have told me.
7.1- Output for ossinfo -v3

Code: Select all

Version info: OSS 4.2 (b 2007/201303142120) (0x00040100) GPL
Platform: Linux/x86_64 3.8.8-2-ARCH #1 SMP PREEMPT Tue Apr 23 10:28:14 CEST 2013 (localhost)

Number of audio devices:    5
Number of audio engines:    9
Number of MIDI devices:        0
Number of mixer devices:    1


Device objects
 0: osscore0 OSS core services
 1: oss_hdaudio0 Intel HD Audio interrupts=444 (444)
    HD Audio controller Intel HD Audio
    Vendor ID    0x80861e20
    Subvendor ID 0x10431457
     Codec  0: Unknown (0x10ec0270/0x10431457)
     Codec  3: Unknown (0x80862806/0x80860101)
 2: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)

Mixer devices
 0: High Definition Audio 0x10ec027 (Mixer 0 of device object 1)
    Device file /dev/oss/oss_hdaudio0/mix0, Legacy device /dev/mixer0
    Priority: 10
    Caps:
    Device handle: PCI14571043-0000:00:1b.0-mx01
    Device priority: 10


Audio devices
HD Audio play pcm1                /dev/oss/oss_hdaudio0/pcm0  (device index 0)
    Legacy device /dev/dsp0
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Out engine  1: 0/HD Audio play pcm1
                     Available for use
      Engine      2: 5/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      3: 6/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      4: 7/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      5: 8/HD Audio play pcm1 (vmix)
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Device handle: PCI14571043-0000:00:1b.0-au01
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 8
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play pcm2                /dev/oss/oss_hdaudio0/pcm1  (device index 1)
    Legacy device /dev/dsp1
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 1/HD Audio play pcm2
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Device handle: PCI14571043-0000:00:1b.0-au02
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play spdifout            /dev/oss/oss_hdaudio0/spdout0  (device index 2)
    Legacy device /dev/dsp4
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 2/HD Audio play spdifout
                     Available for use
    Input formats (0x00001410):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_AC3        - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE    - 32 bit signed little endian
    Output formats (0x00001410):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_AC3        - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE    - 32 bit signed little endian
    Device handle: PCI14571043-0000:00:1b.0-au03
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 32000 - 192000 (32000,44100,48000,88200,96000,176400,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio rec mix4                 /dev/oss/oss_hdaudio0/pcmin0  (device index 3)
    Legacy device /dev/dsp5
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      In engine   1: 3/HD Audio rec mix4
                     Available for use
      Engine      2: 5/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      3: 6/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      4: 7/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      5: 8/HD Audio play pcm1 (vmix)
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Device handle: PCI14571043-0000:00:1b.0-au04
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio rec select               /dev/oss/oss_hdaudio0/pcmin1  (device index 4)
    Legacy device /dev/dsp6
    Caps: TRIGGER MMAP
    Modes: INPUT
      In engine   1: 4/HD Audio rec select
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE    - 16 bit signed little endian
      AFMT_S32_LE    - 32 bit signed little endian
    Device handle: PCI14571043-0000:00:1b.0-au05
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated


Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0



7.2- Output for ossmix -a

Code: Select all

Selected mixer 0/High Definition Audio 0x10ec0270
Known controls are:
codec1.jack.int-speaker.mode <mix2|mix3> (currently mix2)
codec1.jack.int-speaker.mute ON|OFF (currently OFF)
codec1.jack.black.mode1 <mix3|input> (currently mix3)
codec1.jack.black [<leftvol>:<rightvol>] (currently 35.9:35.9 dB)
codec1.jack.black.mute1 ON|OFF (currently OFF)
codec1.jack.black.pcm2 [<leftvol>:<rightvol>] (currently 52.4:52.4 dB)
codec1.jack.black.pcm2-mute ON|OFF (currently OFF)
codec1.jack.black.mix1-mute ON|OFF (currently OFF)
codec1.jack.int-mic [<leftvol>:<rightvol>] (currently 35.9:35.9 dB)
codec1.jack.black.mode2 <mix2|mix3> (currently mix2)
codec1.jack.black.mute2 ON|OFF (currently OFF)
codec1.record.mix4.mute.mix3 ON|OFF (currently OFF)
codec1.record.mix4.mute.int-mic ON|OFF (currently OFF)
codec1.record.mix4.mute.mix1 ON|OFF (currently OFF)
codec1.record.mix4 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
codec1.record.select.select <mix3|int-mic|mix1> (currently mix3)
codec1.record.select [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
codec1.misc.pcm1 [<leftvol>:<rightvol>] (currently 52.4:52.4 dB)
codec1.misc.mix3 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
codec1.misc.int-mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
codec1.misc.mix1 <mix3|int-mic> (currently mix3)
codec1.misc.pcm1-mute ON|OFF (currently OFF)
codec1.misc.mix1-mute ON|OFF (currently OFF)
codec1.misc.mix2 <pcm1|mix1> (currently pcm1)
codec4.jack.int-digout.mute ON|OFF (currently OFF)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm5 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm6 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


Could you tell me if by modifying the config file and by doing chrooting I can solve this problem instead of loggin into linux to try solve this? I tell you it because if I login into linux, once service is started, the beep starts to sound and it is very very loud and annoying and I cannot work while this annoying beep is in progress....

Thanks.

cesium
Developer
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby cesium » Fri Apr 26, 2013 4:22 pm

I am not so sure of the cause right now. A possible cause in such cases is unmuted inputs which send in junk. It would be easiest to test this by starting OSS and running 'ossxmix' (the graphical audio mixer) to mute everything. You can hopefully mute your speakers (or put them in a very low volume) when trying this.

If you want to edit a config file instead, edit /usr/lib/oss/etc/mixer.save before loading OSS. This is a text file, which you can edit. The ossmix output will be useful here. In general try to set mute controls to '0001' and volume controls to '0000'... This file is loaded automatically by OSS when it starts up (it runs the 'savemixer -L' command to load it).

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Fri Apr 26, 2013 4:25 pm

cesium wrote:I am not so sure of the cause right now. A possible cause in such cases is unmuted inputs which send in junk. It would be easiest to test this by starting OSS and running 'ossxmix' (the graphical audio mixer) to mute everything. You can hopefully mute your speakers (or put them in a very low volume) when trying this.

If you want to edit a config file instead, edit /usr/lib/oss/etc/mixer.save before loading OSS. This is a text file, which you can edit. The ossmix output will be useful here. In general try to set mute controls to '0001' and volume controls to '0000'... This file is loaded automatically by OSS when it starts up (it runs the 'savemixer -L' command to load it).


rrodriguez1975 wrote:

Code: Select all

/dev/mixer: No such file or directory


Code: Select all

No /dev/mixer device available in your system.
Perhaps Open Sound System is not installed or running.




It is exactly the case. OSS modules are not loaded.
See:

Code: Select all

$ dmesg | grep oss

$ lsmod | grep oss
$ lsmod | grep snd

$ lsmod | grep pcspkr


rrodriguez1975 wrote:1.- Output for systemctl status oss.service

Code: Select all

oss.service - Open Sound System v4
   Loaded: loaded (/usr/lib/systemd/system/oss.service; enabled)
   Active: activating (start) since vie 2013-04-26 19:42:18 CEST; 1min 42s ago
 Main PID: 438 (soundon)
   CGroup: name=systemd:/system/oss.service
           ├─438 /bin/sh /usr/sbin/soundon
           ├─463 /usr/sbin/ossvermagic -z -s
           └─464 /usr/sbin/ossvermagic -z -s



The problem is systemd, of course.
You may better ask such questions on on Arch Linux forum:
https://bbs.archlinux.org/viewforum.php?id=23

cesium
Developer
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby cesium » Fri Apr 26, 2013 4:28 pm

Ahm, he loaded OSS manually later on. systemd has its issues, but I'm not so sure this is related...

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Fri Apr 26, 2013 4:34 pm

cesium wrote:Ahm, he loaded OSS manually later on. systemd has its issues, but I'm not so sure this is related...


By definition, systemd can load and unload everything on the fly. It may load OSS, then unload it, and load pcspkr instead, even if it is blacklisted, see: https://wiki.archlinux.org/index.php/Ke ... obe.d.2F_2

rrodriguez1975 wrote:
2.- Output for ossinfo -v3

Code: Select all

No /dev/mixer device available in your system.
Perhaps Open Sound System is not installed or running.


3.- Output for ossmix -a

Code: Select all

/dev/mixer: No such file or directory


5.1- Output for soundoff

Code: Select all

CODE: SELECT ALL
OSS not loaded.



Commands:

Code: Select all

$ dmesg | grep oss

$ lsmod | grep oss
$ lsmod | grep snd

$ lsmod | grep pcspkr


To disable pcspkr, he may try this:

Note: The blacklist command will blacklist a module so that it will not be loaded automatically, but the module may be loaded if another non-blacklisted module depends on it or if it is loaded manually.
However, there is a workaround for this behaviour; the install command instructs modprobe to run a custom command instead of inserting the module in the kernel as normal, so you can force the module to always fail loading with:
/etc/modprobe.d/blacklist.conf
...
install module_name /bin/false
...
This will effectively blacklist that module and any other that depends on it.
https://wiki.archlinux.org/index.php/Ke ... obe.d.2F_2


The problem is "annoying loud beep sound". Right?
It is produced by pcspkr.
It has nothing to do with OSS4.

rrodriguez1975 wrote:when I execute ossdetect from console, the beep is starting again....


Do you believe that ossdetect can produce "an annoying constant and very loud beep"?
It is pcspkr, of course. It notifies "console events". For example:

I hate the terminal beep and I want it removed completely. I added this line to my /etc/modproble.d/blacklist.conf file:

Code: Select all

blacklist pcspkr

However when I reboot the lsmod output shows it loaded:

Code: Select all

[root@localhost ~]# lsmod | grep pcspkr
pcspkr                  7105  0

I'm running CentOS 5.7
http://superuser.com/questions/390838/b ... centos-5-7

The same story.
Rodriguez may better ask such questions on Arch Linux forum:
https://bbs.archlinux.org/viewforum.php?id=23

cesium
Developer
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby cesium » Fri Apr 26, 2013 5:51 pm

Hmm.. can systemd load pcspkr in response to ossdetect? It doesn't do much but iterate over pci ids (and speakers dont have any). In any event this can be easily checked by checking 'lsmod' when the beep is heard...

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Fri Apr 26, 2013 6:00 pm

cesium wrote:Hmm.. can systemd load pcspkr in response to ossdetect? It doesn't do much but iterate over pci ids (and speakers dont have any). In any event this can be easily checked by checking 'lsmod' when the beep is heard...


systemd can load pcspkr in response to "terminal", because it needs pcspkr.
systemd can also load pcspkr for any other unpredictable reasons.

Blacklisting does not prevent pcspkr from loading
https://wiki.archlinux.org/index.php/Ke ... obe.d.2F_2

Therefore:

Code: Select all

$ lsmod | grep pcspkr


In a word, Ubuntu developers seem to be going to infect Ubuntu with systemd
Ubuntu Plans To Move To Systemd's Logind
http://www.phoronix.com/scan.php?page=n ... px=MTMyMDE
Gentoo On systemd, Torvalds in Bullshit, udev Forked
http://igurublog.wordpress.com/2012/10/ ... -torvalds/

Mark Shuttleworth: Rumours and allegations of a move from Upstart to systemd are unfounded: Upstart has a huge battery of tests, the competition has virtually none. Upstart knows everything it wants to be, the competition wants to be everything. Quality comes from focus and clarity of purpose, it comes from careful design and rigorous practices. After a review by the Ubuntu Foundations team our course is clear: we’re committed to Upstart, it’s the better choice for a modern init, innit. For our future on cloud and client, Upstart is crisp, clean and correct. It will be a pleasure to share all the Upstart-enablement patches we carry with other family friends as soon as their release is ready and they can take a breath, so to speak.
http://www.markshuttleworth.com/archives/1121
http://en.wikipedia.org/wiki/Mark_Shuttleworth
Last edited by igorzwx on Sat Apr 27, 2013 4:08 am, edited 2 times in total.

rrodriguez1975
Member
Posts: 14
Joined: Fri Apr 26, 2013 10:40 am

Re: Constant and continuous beep does not stop never

Postby rrodriguez1975 » Fri Apr 26, 2013 7:46 pm

Hi all,
Thanks very much for helping me and guide in the right direction.

I agree with you, I think the problem is with systemd. It is really a shit!

I had already read all the links you post here related to arch linux, and I have made a lot of things commented in Arch linux forum but nothing stated there work for me.

I know that blacklisting by adding blacklist pcspkr in /etc/modprobe.d/modprobe.conf is not effective as it can be loaded by another processes or reason so as they said the effective way is what you say:

/etc/modprobe.d/blacklist.conf
...
install module_name /bin/false
...

But this is not completely true, I have blacklisted using this two ways and none is working, pcspkr module is being loaded anyway apparently by systemd....

Also I have tried at boot time parametrizing the kernel by adding pcspkr.disable=1 or modprobe.blacklist=pcspkr but nothing works so it seems to be a problem of systemd....

The reason because I have post my problem here is the following:
Initially I posted my problem in Arch linux forum of course, but it seems nobody knows what it is causing such annoying beep, and after reading a lot of information in arch forums and even in other forums related to other distros I have not found any effective method to solve this issue so I thought why not asking it in a forum more specialized in oss and with people expert on it? So googling I search this forum, and I thought it was the correct place to post it, so this is what I have done.

Anyway, in my previous old laptop (32 bits) that died, I had this distro installed and using oss and systemd and I never had this issue. This issue has appeared once I have migrated the distro to new laptop (64 bits) - I have put old hard drive into and external enclosure - and initially I thought that maybe in the oss configuration files there was something specific to the old laptop sound car so as the new laptop has a different one I thoguth I had to configure properly the oss configuration files to take it into account. Sorry by my ignorance but i am not an expert using oss...

I highly appreciate your help.

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Fri Apr 26, 2013 8:20 pm

rrodriguez1975 wrote:Hi all,
Thanks very much for helping me and guide in the right direction.

I agree with you, I think the problem is with systemd. It is really a shit!

I had already read all the links you post here related to arch linux, and I have made a lot of things commented in Arch linux forum but nothing stated there work for me.

I know that blacklisting by adding blacklist pcspkr in /etc/modprobe.d/modprobe.conf is not effective as it can be loaded by another processes or reason so as they said the effective way is what you say:

/etc/modprobe.d/blacklist.conf
...
install module_name /bin/false
...

But this is not completely true, I have blacklisted using this two ways and none is working, pcspkr module is being loaded anyway apparently by systemd....

Also I have tried at boot time parametrizing the kernel by adding pcspkr.disable=1 or modprobe.blacklist=pcspkr but nothing works so it seems to be a problem of systemd....

The reason because I have post my problem here is the following:
Initially I posted my problem in Arch linux forum of course, but it seems nobody knows what it is causing such annoying beep, and after reading a lot of information in arch forums and even in other forums related to other distros I have not found any effective method to solve this issue so I thought why not asking it in a forum more specialized in oss and with people expert on it? So googling I search this forum, and I thought it was the correct place to post it, so this is what I have done.

Anyway, in my previous old laptop (32 bits) that died, I had this distro installed and using oss and systemd and I never had this issue. This issue has appeared once I have migrated the distro to new laptop (64 bits) - I have put old hard drive into and external enclosure - and initially I thought that maybe in the oss configuration files there was something specific to the old laptop sound car so as the new laptop has a different one I thoguth I had to configure properly the oss configuration files to take it into account. Sorry by my ignorance but i am not an expert using oss...

I highly appreciate your help.


rrodriguez1975 wrote:I have blacklisted using this two ways and none is working, pcspkr module is being loaded anyway apparently by systemd....


The simplest solution:

Code: Select all

$ lsmod | grep pcspkr
$ sudo rmmod pcspkr
$ sudo rmmod -f pcspkr
$ lsmod | grep pcspkr


Code: Select all

$ whereis rmmod
rmmod: /sbin/rmmod /usr/share/man/man8/rmmod.8.gz


If it works, you may add a launcher to panel with command "sudo /sbin/rmmod pcspkr"

To make it more comfortable, you may add "/sbin/rmmod" to sudoers file.
It can be done with "gedit", or other text editor of your choice.
The manual is here: https://wiki.archlinux.org/index.php/Sudo

EXAMPLE:

Code: Select all

$ sudo EDITOR=gedit visudo


Add this line to the very bottom of the sudoers file:

Code: Select all

[USERNAME] ALL = NOPASSWD: /sbin/rmmod


Substitute [USERNAME] with your user name. Example:

Code: Select all

rodriguez ALL = NOPASSWD: /sbin/rmmod


In this case, "sudo /sbin/rmmod pcspkr" will not ask for password.
Therefore, you can also add "sudo /sbin/rmmod pcspkr" to StartUp applications.

When "annoying very loud beep" begins, click on the launcher to unload pcspkr.

You may also try to add command

Code: Select all

/sbin/rmmod pcspkr


to /etc/rc.local
See: https://wiki.archlinux.org/index.php/Rc ... 2Frc.local
WARNING: It may not work with systemd.

You may also try to add

Code: Select all

/sbin/rmmod pcspkr


to the soundon script (at the beginning of the script).
It should work. The manual (with examples) is here: viewtopic.php?f=3&t=5204

Code: Select all

$ whereis soundon
soundon: /usr/sbin/soundon /usr/share/man/man1/soundon.1.gz



If pcspkr is constantly loaded by systemd, you may try to remove pcspkr from the kernel.
You may ask for help on Arch Linux forum. Although it is not very probable that they know how to do this, you may want to know how much they know about Linux.
In any case, you may ask Cesium. He knows how to remove any modules from Linux kernel (and how to restore them). See: viewtopic.php?f=3&t=5204

Another option: Linux Mint Mate 14 (preferably 32bit, because 64bit usually means the problem of "non-existing (or buggy) Linux drivers").

WARNING: The first thing to do with Linux Mint is to set root password with passwd
Otherwise, you may soon need to learn chroot to regain administrator privileges
https://wiki.archlinux.org/index.php/Change_Root

PulseAudio no more required
by stefano-k » Thu Jan 26, 2012 12:07 am
Upgrading to mate-settings-daemon-1.1.1, we readded support to gstreamer (instead of pulseaudio) for media (volume) keys. So, now MATE dont requires PulseAudio.

Now there are two packages that provides mate-settings-daemon:

- mate-settings-daemon-gstreamer (default): uses gstreamer to provides media keys.

- mate-settings-daemon-pulse: uses pulseaudio to provides media keys.
http://forums.mate-desktop.org/viewtopic.php?f=5&t=38



Could you please rename this topic? For example:
[Arch Linux, systemd] Very loud beep never stops

When this problem is solved, you may better start a new thread, if you have questions about OSS4.
Preferably, one question per one thread.
Last edited by igorzwx on Sat Apr 27, 2013 6:23 pm, edited 1 time in total.

nuc
Moderator
Posts: 110
Joined: Fri Aug 03, 2012 10:20 am
Sound Card: Khadas Tone Board
OS: ArchLinux
Contact:

Re: Constant and continuous beep does not stop never

Postby nuc » Sat Apr 27, 2013 12:42 pm

Hm, that's really weird. Systemd's auto-magic really sucks - I mean the reason for using Arch is exactly that it doesn't provide any "auto-magic".
That's really an issue with Systemd and IMO makes it an unfortunate decision for Arch. :/ Which is actually sad because I do like the some ideas of systemd.

I've had a simililar problem with auto-loading services, though it was partly my own fault:
I had alsa-utils installed and systemd loaded it without my knowledge! I know it's stupid to have alsa-utils installed while using OSS, but nevertheless this is unacceptable.
I use Arch because I want to know my system. Systemd seems to be uncapable of giving it's users the neccessairy trust.

Anyways, someday by accident I've noticed that the alsa-utils daemon is being loaded while I skimmed through the boot logs. I immediately disabled alsa-utils.service. But simply disabling didn't do the job. Systemd still loaded it at boot (again WITHOUT MY KOWLEDGE, although disabled).
The only thing that worked was masking, see https://bbs.archlinux.org/viewtopic.php?id=152049.

I have also reported it as a bug on the systemd bugtracker: https://bugs.freedesktop.org/show_bug.cgi?id=56690
To my surprise Lennart is wiling to fix it:
Lennart Poettering wrote:It is indeed a bit confusing that "systemctl disable alsa-store.service" does nothing and does not write any message. We should fix that.

----------------------
I am very surprised "install <module-name> /bin/false" doesn't do the job for you, since there shouldn't be any chance to load the module with this command. That behavior is surely not correct, I think you should report it on systemd's bugtracker.
Your issue seems to be quite more severe than mine, so I don't think the systemd devs would reject it.

Btw did you block the "soundcore" module? This is neccessairy because otherwise ASLA is loaded my default:
This will install the OSS, run the OSS install script (temporarily disabling the ALSA modules) and install the OSS kernel modules. Since ALSA is enabled by default in the boot scripts, you need to disable it so it does not conflict with OSS. You can do this by blacklisting the module.

see https://wiki.archlinux.org/index.php/OSS#Install

Wish you luck ;)

nuc


PS: What is this pcspkr module actually for? Is it some ALSA stuff?

lsmod shows this:

Code: Select all

$ lsmod | grep pcspkr
pcspkr                  2027  0

So it seems to be loaded.
https://github.com/Nuc1eoN/4Front-Tech-Website

rrodriguez1975
Member
Posts: 14
Joined: Fri Apr 26, 2013 10:40 am

Re: Constant and continuous beep does not stop never

Postby rrodriguez1975 » Sat Apr 27, 2013 4:44 pm

Thanks, I have blacklisted alsa as you have said.

Also I have already solved this issue "partially". As stated here https://wiki.archlinux.org/index.php/OSS#Microphone_playing_through_output_channels, it was a problem related to Microphone playing through output channels:

"By default, OSS plays back the microphone through the speakers. To disable this in ossxmix find the Misc section and uncheck every input-mix-mute box. "

In my case there was a conflict with mic-in in ossxmix: The conflict was between section "codec1 | jack | int-mic" and "codec1 | misc | int-mic" so by muting int-mic in misc I have solved the problem. Now, once log in in Arch, the beep only sound less than a second and then stops as when oss service is initialized, file "mixer.save" in "/usr/lib/oss/etc" is read and there int-mic is set to mute.

Anyway, despite beep is kept less than a second and then immediatelly is muted, it would be great to avoid it so any ideas here? Maybe, by default, avoid OSS plays back the microphone through the speakers without waiting to read mixer.save file on oss service initialized?

Thanks all!

igorzwx
Known Member
Posts: 1261
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby igorzwx » Sat Apr 27, 2013 6:21 pm

nuc wrote:I do like the some ideas of systemd.


It seems that certain ideas might be very attractive for naive boys, innocent girls, and those who suffer from senile dementia and/or Alzheimer's disease.

The old believe everything; the middle-aged suspect everything; the young know everything.
Oscar Wilde http://en.wikiquote.org/wiki/Oscar_Wilde



nuc wrote:did you block the "soundcore" module? This is neccessairy because otherwise ASLA is loaded my default.

rrodriguez1975 wrote:I have blacklisted alsa


ALSA moduled are not likely to be loaded, if OSS4 is installed.
The reason is simple: ALSA modules should be completely deleted by the secret magic script.
systemd cannot load modules which do not exist.
In the same way, you can remove pcspkr module completely to get rid of beeping.

NOTE: ALSA modules can be restored with certain secret commands, if you need them. See: viewtopic.php?f=3&t=5204

It might be difficult to help you, because you do not read answers.

igorzwx wrote:Could you please rename this topic? For example:
[Arch Linux, systemd] Very loud beep never stops

When this problem is solved, you may better start a new thread, if you have questions about OSS4.
Preferably, one question per one thread.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 8 guests