[Arch Linux, systemd] Very loud beep never stops

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, kodachi, cesium

Re: Constant and continuous beep does not stop never

Postby nuc » Sat Apr 27, 2013 7:09 pm

igorzwx wrote:
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.


Igor, you might be advised to read "How to Win Friends and Influence People" by Dale Carnegie. It is surely also translated into ukrainian.

You'll notice that offending people doesn't do any good: It will most probably not change the opinion of your opponent, but it will almost certainly lead to a quarrel. The only thing you feed is your own ego.
But don't panic! You aren't lost in no way! Even Abe Lincoln needed to experience it on its own (as you will get to know in the book; notice that Dale Carnegie studied Lincolns Biography to an extent as nobody did before and led to his book Lincoln the Unknown).

I have found an online version of the book for your convinience: http://images.kw.com/docs/2/1/2/212345/ ... twfaip.pdf

Some interesting chapters for you might be:
  • YOU CAN’T WIN AN ARGUMENT
  • A SURE WAY OF MAKING ENEMIES—AND HOW TO AVOID IT

EDIT: I have also heard yoga is a good way to keep calm...


@rrodriguez1975: As Igor said, you maybe should make a separate topic for this now, that exactly addresses your issue with OSS ;)
nuc
 
Posts: 32
Joined: Fri Aug 03, 2012 10:20 am

Re: Constant and continuous beep does not stop never

Postby igorzwx » Sat Apr 27, 2013 7:36 pm

nuc wrote:You'll notice that offending people doesn't do any good


Sorry, it was not meant to offend you, or influence your opinion.
Whether you feel offended or not, it depends on your subjective interpretations. Right?
If you do not like to feel offended, you may try correct your subjective interpretations.
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby nuc » Sat Apr 27, 2013 7:39 pm

igorzwx wrote:Sorry, it was not meant to offend you, or influence your opinion.
Whether you feel offended or not, it depends on your subjective interpretations. Right?
If you do not like to feel offended, you may try correct your subjective interpretations.

Where did I say I feel offended?
nuc
 
Posts: 32
Joined: Fri Aug 03, 2012 10:20 am

Re: Constant and continuous beep does not stop never

Postby igorzwx » Sat Apr 27, 2013 7:50 pm

nuc wrote:
igorzwx wrote:Sorry, it was not meant to offend you, or influence your opinion.
Whether you feel offended or not, it depends on your subjective interpretations. Right?
If you do not like to feel offended, you may try correct your subjective interpretations.

Where did I say I feel offended?


Yes, you did not say it.

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

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. https://wiki.archlinux.org/index.php/OS ... t_channels


It seems to be a strange solution for non-existing problem.
In the same way, you can disable all useful features of OSS4 and do not use them.
This particular switch enables/disables a kind of HW mixing.
It may look like this:

High Definition Audio ALC887:
Code: Select all
$ ossmix | grep input-mix-mut | grep green
codec3.jack.green.input-mix-mut ON|OFF (currently ON)


Intel ICH AC97:
Code: Select all
$ ossmix | grep vol.rec
vol.rec ON|OFF (currently OFF)


If it is enabled, you can record "total mixed output" together with microphone viewtopic.php?f=3&t=4656
You can, for example, speek by Skype with your friends, play music and record all this as "podcast".
However, it also records some computer generated noise (it can be reduced by some other switches).
You may want to disable this magic feature, if you are playing HiRes FLACs.
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby cesium » Sat Apr 27, 2013 8:36 pm

rrodriguez1975 wrote: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!


To do that, we'll have to patch the OSS hdaudio init to mute this on initialization and then rebuild OSS from source [you can edit the PKGBUILD to apply it before building I guess]. The attachment contains a diff which may or may not help. I haven't tested it at all (ENOTIME). Caveat emptor and all that.
Attachments
hdaudio.diff.gz
(825 Bytes) Downloaded 65 times
cesium
 
Posts: 896
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby igorzwx » Sat Apr 27, 2013 9:05 pm

cesium wrote:To do that, we'll have to patch the OSS hdaudio init to mute this on initialization and then rebuild OSS from source [you can edit the PKGBUILD to apply it before building I guess]. The attachment contains a diff which may or may not help. I haven't tested it at all (ENOTIME). Caveat emptor and all that.


Thanks! I do not want to have this useful feature disabled for Intel HDA codecs. Or do you think we have to use PulseAudio for recording "total mixed output"?

You may better explain how to remove pcspkr module from Linux kernel (in the same way as ALSA modules are removed by "soundon" script).
It can be done with a few simple commands. Right?

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


Code: Select all
# cat /usr/sbin/soundon

if test -d /proc/asound || grep -q '^ *14 ' < /proc/devices
then
   if ! sh $OSSLIBDIR/scripts/remove_drv.sh>> $LOG

Code: Select all
$ cat /usr/lib/oss/scripts/remove_drv.sh

if test -d /lib/modules/`uname -r`/kernel/sound
then
   if ! test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
   then
      (cd /lib/modules/`uname -r`; tar cfj /lib/modules/`uname -r`/sound-preoss.tar.bz2 kernel/sound)
   fi

   rm -rf /lib/modules/`uname -r`/kernel/sound
   depmod -a
fi


pcspkr.ko is located here:

Code: Select all
$ cd /lib/modules/`uname -r`/kernel/drivers/input/misc
$ ls | grep pcspkr
pcspkr.ko


Example (Ubuntu): /lib/modules/3.5.0-25-generic/kernel/drivers/input/misc/pcspkr.ko

Code: Select all
$ uname -r
3.5.0-25-generic


Whet is needed is a simple script, for example: /usr/lib/oss/scripts/remove_pcspkr.sh
in this folder:

Code: Select all
$ ls /usr/lib/oss/scripts/
90-oss_usb-create-device.fdi
killprocs.sh
oss_usb-create-devices
remove_drv.sh
restore_drv.sh
setup-alsa.sh
showprocs.sh
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: Constant and continuous beep does not stop never

Postby cesium » Sat Apr 27, 2013 10:22 pm

Well, the diff is specifically targeted for his codec, and it is supposed to selectively mutes that particular jack on init, so no 'general feature' here (If I understand him correctly, he has _both_ a systemd/pcspkr problem and an unmuted input on init problem. The diff is for the second). As for pcspkr, the easiest way IMHO is to just physically delete it from the system. This is not however an OSS issue, so I don't think OSS install should be changed for it.
cesium
 
Posts: 896
Joined: Sun Aug 12, 2007 12:51 am

Re: Constant and continuous beep does not stop never

Postby igorzwx » Sat Apr 27, 2013 10:27 pm

cesium wrote:Well, the diff is specifically targeted for his codec, and it is supposed to selectively mutes that particular jack on init, so no 'general feature' here (If I understand him correctly, he has _both_ a systemd/pcspkr problem and an unmuted input on init problem. The diff is for the second). As for pcspkr, the easiest way IMHO is to just physically delete it from the system. This is not however an OSS issue, so I don't think OSS install should be changed for it.


This particular switch enables HW mixing in Intel HDA codecs. It allows to record "total mixed output" together with input from microphone. It is the so-called "loopback hardware mixer control":

Recording total mixed output
Many drivers offer support for loopback recording via the hardware. This is typically done with the 'vol' mixer control. If this can be used as a recording source, than the current sound output will be recorded. Note that this is the mixed total of all sound played, not of a single program.
ossmix vol.rec ON #sets 'vol' as default target, so any recording program uses it by default
ossrecord blah.wav
Some drivers have a 'loopback' mixer control (instead of 'vol'), which offers similar functionality. This can be set by ossmix or ossxmix mixer control programs.
http://www.opensound.com/wiki/index.php ... xed_output


It works on my computer with Intel HDA ALC887 codec, OSS4 and Linux Mint 14 Mate.
If pcspkr is loaded, this very useful feature of OSS4 cannot be used because of very loud beep produced by pcspkr.

ALSA does not support this magic feature of Intel HDA codecs, and, therefore, ALSA developers tend to claim that Intel HDA codecs do not have such features. To fool naive users they even created a special "market theory of soundcards" which "proves" that HDA codecs are simply a sort of "cheap crap" produced by "invisible market forces".

The obvious solution is to remove pcspkr with a magic script.

cesium wrote:As for pcspkr, the easiest way IMHO is to just physically delete it from the system


Yes. But Ubuntu users may forget about "depmod -a" http://manpages.ubuntu.com/manpages/qua ... mod.8.html

Since Ubuntu plans to move to systemd http://www.phoronix.com/scan.php?page=n ... px=MTMyMDE
Ubuntu/OSS4 users may soon have the same problem with "very loud beep" produced by pcspkr.

pcspkr can be "physically deleted from the system" together with ALSA modules and other "open source crap".
soundon can be updated to do the work. Right?

Could you please deliver the magic script to OSS4 users?
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: [Arch Linux, systemd] Very loud beep never stops

Postby rrodriguez1975 » Sun Apr 28, 2013 10:02 am

First I would like to give all of you thanks for the great support.

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


I think there is no need to block soundcore as it is not present in my system. See below when I execute modinfo command on it:

Code: Select all
$ modinfo soundcore
modinfo: ERROR: Module soundcore not found.


igorzwx wrote:In the same way, you can remove pcspkr module completely to get rid of beeping.


Right now I am a little confused about pcspkr module. What is pcspkr for? As I know this is the pc speaker. Sorry by my ignorance here, but if I remove pcspkr module I will continue having sound in my system or not? Is it not the responsible to produce the system sounds? or is it only responsible to produce some kind of sounds like the annoying beep?

cesium wrote:To do that, we'll have to patch the OSS hdaudio init to mute this on initialization and then rebuild OSS from source [you can edit the PKGBUILD to apply it before building I guess].


igorzwx wrote:Thanks! I do not want to have this useful feature disabled for Intel HDA codecs. Or do you think we have to use PulseAudio for recording "total mixed output"?.


But then if patch done... it affects for recording "total mixed output" as igorzwx has stated, so.... maybe it is not a good solution but an approach. By OSS hdaudio init enabled by default, as designed, I wonder if it is only happening to me with intel or is other hardware affected as well? I mean, if it is enabled by default and this cause the loud beep it means that something is not working correctly, so I am curious to know what is causing it... As I understand, by leave it enabled by default (without doing the patch), it has to work without causing problems.

What is the best - and the correct - approach I can do to solve it?

igorzwx wrote:If pcspkr is loaded, this very useful feature of OSS4 cannot be used because of very loud beep produced by pcspkr.


So removing pcspkr module is the solution? If I remove it no beep anymore and I can then leave unmuted this feature?

I have not started another thread because I think the main problem discussed here in all the posts is the same: the annoying and loud beep caused. We are discussing about who is causing it and we are trying to know the cause and then once known, to propose the correct approaches to solve it.

Anyway if you prefer I can close it and start another thread, but I think closing it without a solution is not correct. Muting it,as I have done, is an approach but not a solution as by default, and as designed it should be unmuted to be able to use the OSS4 feature commented (recording "total mixed output").
rrodriguez1975
 
Posts: 13
Joined: Fri Apr 26, 2013 10:40 am

Re: [Arch Linux, systemd] Very loud beep never stops

Postby igorzwx » Sun Apr 28, 2013 11:22 am

rrodriguez1975 wrote:So removing pcspkr module is the solution? If I remove it no beep anymore and I can then leave unmuted this feature?


Yes.

1. make a copy of it (cp)
2. remove (rm)
3. depmod -a

To restore:
1. copy it to the place (cp)
2. depmod -a
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: [Arch Linux, systemd] Very loud beep never stops

Postby rrodriguez1975 » Sun Apr 28, 2013 1:33 pm

igorzwx wrote:
rrodriguez1975 wrote:So removing pcspkr module is the solution? If I remove it no beep anymore and I can then leave unmuted this feature?


Yes.

1. make a copy of it (cp)
2. remove (rm)
3. depmod -a

To restore:
1. copy it to the place (cp)
2. depmod -a


I have done what you have indicated:
1.- Make a copy of it: cp /lib/modules/`uname -r`/kernel/drivers/input/misc/pcspkr.ko.gz /path/to/another/place
2.- Remove: rm /lib/modules/`uname -r`/kernel/drivers/input/misc/pcspkr.ko.gz
3.- depmod -a
4.- Reboot

After reboot and once logged in into my distro, few minutes later when oss service is started, the loud beep starts and then immediately stops so not working this solution.
rrodriguez1975
 
Posts: 13
Joined: Fri Apr 26, 2013 10:40 am

Re: [Arch Linux, systemd] Very loud beep never stops

Postby igorzwx » Sun Apr 28, 2013 2:00 pm

rrodriguez1975 wrote:
igorzwx wrote:
rrodriguez1975 wrote:So removing pcspkr module is the solution? If I remove it no beep anymore and I can then leave unmuted this feature?


Yes.

1. make a copy of it (cp)
2. remove (rm)
3. depmod -a

To restore:
1. copy it to the place (cp)
2. depmod -a


I have done what you have indicated:
1.- Make a copy of it: cp /lib/modules/`uname -r`/kernel/drivers/input/misc/pcspkr.ko.gz /path/to/another/place
2.- Remove: rm /lib/modules/`uname -r`/kernel/drivers/input/misc/pcspkr.ko.gz
3.- depmod -a
4.- Reboot

After reboot and once logged in into my distro, few minutes later when oss service is started, the loud beep starts and then immediately stops so not working this solution.


the module is pcspkr.ko, not pcspkr.ko.gz

You did not remove it.

Code: Select all
$ lsmod | grep pcspkr
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: [Arch Linux, systemd] Very loud beep never stops

Postby rrodriguez1975 » Sun Apr 28, 2013 2:45 pm

igorzwx wrote:the module is pcspkr.ko, not pcspkr.ko.gz

You did not remove it.

Code: Select all
$ lsmod | grep pcspkr



There is no pcspkr.ko file in the entire arch distro. arch distro use gzip compressed modules: pcspkr.ko.gz

If I execute the command:
Code: Select all
lsmod | grep pcspkr


nothing is output (pcspkr module is not loaded)
rrodriguez1975
 
Posts: 13
Joined: Fri Apr 26, 2013 10:40 am

Re: [Arch Linux, systemd] Very loud beep never stops

Postby igorzwx » Sun Apr 28, 2013 3:01 pm

rrodriguez1975 wrote:After reboot and once logged in into my distro, few minutes later when oss service is started, the loud beep starts and then immediately stops so not working this solution.

If I execute the command:
Code: Select all
$ lsmod | grep pcspkr

nothing is output (pcspkr module is not loaded)


If you unmute that switch, beep starts, or not?
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: [Arch Linux, systemd] Very loud beep never stops

Postby rrodriguez1975 » Sun Apr 28, 2013 3:33 pm

igorzwx wrote:
rrodriguez1975 wrote:After reboot and once logged in into my distro, few minutes later when oss service is started, the loud beep starts and then immediately stops so not working this solution.

If I execute the command:
Code: Select all
$ lsmod | grep pcspkr

nothing is output (pcspkr module is not loaded)


If you unmute that switch, beep starts, or not?


Below I explain you what happens when this switch is muted (1) and when it is unmuted (2) - pcspkr is removed in both scenarios - :
1) Now this switch is muted, but anyway, once oss service is started, as I stated in a previous post, and then beep starts, but as immediately the mixer.save file is read on oss service started, the beep stops as in mixer.save it is set to mute.

2) If this switch is unmuted, on oss service started, immediately beep starts but it does not stop never, as in mixer.save this is set to unmute.

Anyway, I have been thinking about removing pcspkr in this way and it is not a good solution since on every kernel update, new kernel comes with this compressed gzip module and it is needed to manualy remove it every time kernel is updated. I know kernel updates are not done every day or even week, but it requires to manualy remove it from kernel.
rrodriguez1975
 
Posts: 13
Joined: Fri Apr 26, 2013 10:40 am

PreviousNext

Return to Linux

Who is online

Users browsing this forum: No registered users and 3 guests