You are not logged in.

Announcement

Due to heavy spamming of forums registration is going in stages. If you wish to register as a new user with ArchBang Forums, first register and then send an e-mail to: archbangforums at gmail dot com. It should contain the problem you want to discuss or some other AB related content. You will be promoted from registering member with no posting rights to new member with posting rights after that. If your mail is ignored you haven't fulfilled the requirements.

#1 2012-06-14 00:04:57

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

I have sound, then it goes away by itself.

Hello everybody!

I am transitioning to ArchBang (have a broken Linux Mint 12 on internal and "getting to know" Archbang, which I have actually installed to my external), and have some troubleshooting to do.

After learning to do "aplay -l" and then make the appropriate ~/.asoundrc file (and not forgetting the dot, lol), I was able to get sound for the first time. Mr. Green pointed me off to the wiki, which has the "aplay -l" and ~/.asoundrc tips.

When I boot up and play a song (techniqually it's a video, an *flv video) it usually has sound. If not, it's because the ordering of my sound cards changed. I just tweak ~/.asoundrc and I'm good again.

But eventually the sound just stops. I check to see if the order of my sound cards changed again by doing an "aplay -l". I remember one time that they had, and in that one situation tweaking ~/.asoundrc fixed it. But usually my ~/.asoundrc and "aplay -l" output match, even after it stops.

Obviously the card is unmuted in alsamixer, or else it would have not worked to begin with.

Another funny thing, that I'm curious if is related, is that I've never been able to start volumeicon. I do "volumeicon -b" in terminal and get:

volumeicon: alsa_backend.c:88: asound_get_volume: Assertion `m_elem != ((void *)0)' failed.
Aborted


My user is a member of the audio group.


Today I installed vlc ("sudo pacman -S vlc" didn't work, and it occured to me to try "sudo packer -S vlc", which did work) and ran it from terminal.

I got a message about it not able to connect to pulseaudio, but it played sound anyways. This was before the sound stopped. Then the sound stopped after a while. After closing and opening vlc, it still complained that it could not connect to pulseaudio, and this time did not make sound.

I tryed changing a vlc setting from "Default" to "ALSA audio output". Still no sound. Also tried "Pulseaudio audio output". Also tried oss, which complained that it couldn't open /dev/dsp, which doesn't exist.

I am using USB speakers (which really means I am using a USB external sound card). I tried unplugging and replugging them. Still no sound.

Restarting does temporarily "fix" the issue, but eventually it will go away again.

I noticed the wiki said:

to make most programs use Alsa, make sure /etc/libao.conf only contains the following.

default_driver=alsa10



I have no /etc/libao.conf file. Do I need one?

I do not have an /etc/asound.conf file, so that is not conflicting with my ~/.asoundrc file.


Here is my "aplay -l" output:

**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Creative [HDA Creative], device 0: CA0110 Analog [CA0110 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Creative [HDA Creative], device 1: CA0110 Digital [CA0110 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [Bose USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Here is my ~/.asoundrc:

defaults.pcm.card 2
defaults.pcm.device 0
defaults.ctl.card 2


Here is my "sudo lsmod" output (taken when I had no sound):

Module                  Size  Used by
michael_mic             2074  8 
arc4                    1410  4 
ecb                     2105  4 
lib80211_crypt_tkip     8282  0 
snd_usb_audio          93519  0 
snd_hda_codec_ca0110     6264  1 
snd_usbmidi_lib        18744  1 snd_usb_audio
snd_hda_codec_hdmi     24120  1 
snd_rawmidi            18991  1 snd_usbmidi_lib
snd_hda_intel          24021  0 
snd_seq_device          5300  1 snd_rawmidi
snd_hda_codec          92713  3 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_ca0110
snd_hwdep               6556  2 snd_hda_codec,snd_usb_audio
snd_pcm                74812  4 snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi,snd_usb_audio
snd_page_alloc          7217  2 snd_pcm,snd_hda_intel
broadcom                7270  0 
snd_timer              19222  1 snd_pcm
snd                    59656  11 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_seq_device,snd_hda_intel,snd_rawmidi,snd_hda_codec_hdmi,snd_usbmidi_lib,snd_hda_codec_ca0110,snd_usb_audio
soundcore               6082  1 snd
wl                   2557159  0 
mei                    32216  0 
tg3                   137286  0 
iTCO_wdt               12877  0 
radeon                788124  0 
shpchp                 26305  0 
iTCO_vendor_support     1929  1 iTCO_wdt
i2c_i801                8116  0 
processor              26144  0 
serio_raw               4653  0 
button                  4502  0 
cfg80211              176857  1 wl
rfkill                 15604  1 cfg80211
lib80211                3949  2 wl,lib80211_crypt_tkip
psmouse                69539  0 
intel_agp              10872  0 
intel_gtt              14007  1 intel_agp
i2c_algo_bit            5359  1 radeon
drm_kms_helper         26947  1 radeon
ttm                    64384  1 radeon
drm                   204375  3 ttm,drm_kms_helper,radeon
joydev                  9991  0 
pci_hotplug            25324  1 shpchp
i2c_core               20593  5 drm,drm_kms_helper,i2c_algo_bit,i2c_i801,radeon
libphy                 17086  2 tg3,broadcom
dcdbas                  5552  0 
evdev                   9402  6 
ext4                  424467  1 
crc16                   1359  1 ext4
jbd2                   71704  1 ext4
mbcache                 5977  1 ext4
ses                     6174  0 
enclosure               6319  1 ses
usbhid                 36142  0 
hid                    84549  1 usbhid
usb_storage            44530  2 
sr_mod                 14823  0 
sd_mod                 28059  3 
cdrom                  35744  1 sr_mod
ahci                   20261  0 
libahci                19999  1 ahci
libata                167083  2 libahci,ahci
ehci_hcd               44104  0 
scsi_mod              133422  5 libata,sd_mod,sr_mod,usb_storage,ses
usbcore               146847  6 ehci_hcd,usb_storage,usbhid,snd_usbmidi_lib,snd_usb_audio
usb_common               954  1 usbcore



When my sound is out, doing "speaker-test -c 2" does nothing.


When I do "sudo ps ax|grep pulse" while there is no sound I just get:
[number] pts/0    S+     0:00 grep pulse


When I do "sudo lsof | grep snd" while there is no sound, I get absolutely nothing.

My /etc/rc.conf contains "alsa" in daemons:

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng @alsa)

I just made a /etc/libao.conf with:
default_driver=alsa10

I will now restart and see how long the sound lasts.

I thought Qemu was the culprit, but the sound has stopped without me ever running it that boot.
Could FireFox be the culprit?

When the sound ceases, FireFox, MPlayer, and VLC all can't make sound. So it is not application specific.

Any ideas?

Cheers,
Jake

Last edited by SpawnHappyJake (2012-06-14 00:15:38)


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#2 2012-06-14 00:12:51

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,743

Re: I have sound, then it goes away by itself.

Do not forget <code> tags they do make posts a little easier to read smile

Offline

#3 2012-06-14 00:23:18

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Thanks Mr. Green. I have just rebooted with my new /etc/libao.conf.

I have volumeicon in my tray now. Sometimes I get that, and sometimes I don't.

I had to tweak ~/.asoundrc because my sound cards re-ordered. I still had no sound until I slid the volume needle of volumeicon.

No, it wasn't too low for me to hear. It was almost full-blast before I touched it. Just me touching it woke it up or something.

Testing to see if this lasts.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#4 2012-06-14 00:25:07

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Nope. Only got one playing of one song. Then it quit.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#5 2012-06-14 06:16:40

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

Can you run this command on three separate occasions:

$ sudo lsof /dev/snd

First run should be on a fresh boot
Second should be when it's working
Third when it's not working

You might have to install lsof (but it's a great app that everyone should have anyway)


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#6 2012-06-14 09:04:36

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Took out /etc/libao.conf because it wasn't doing anything for me, and restarted.

"sudo lsof /dev/snd" never gave me any output. But "sudo ls /dev/snd" did.

My output of "sudo ls /dev/snd" never changed.

Fresh boot:

[shjake@archbang ~]$ sudo lsof /dev/snd
[shjake@archbang ~]$ sudo ls /dev/snd
by-id     controlC0  controlC2  hwC2D1     pcmC1D0p  pcmC2D0p  pcmC2D1p  timer
by-path  controlC1  hwC0D0     pcmC0D3p  pcmC2D0c  pcmC2D1c  seq
[shjake@archbang ~]$ cat ./.asoundrc
defaults.pcm.card 0
defaults.pcm.device 0
defaults.ctl.card 0
[shjake@archbang ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Audio [Bose USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0110 Analog [CA0110 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0110 Digital [CA0110 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[shjake@archbang ~]$ nano ./.asoundrc
[shjake@archbang ~]$ cat ./.asoundrc
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
[shjake@archbang ~]$ sudo ls /dev/snd
by-id     controlC0  controlC2  hwC2D1     pcmC1D0p  pcmC2D0p  pcmC2D1p  timer
by-path  controlC1  hwC0D0     pcmC0D3p  pcmC2D0c  pcmC2D1c  seq


Note: didn't have volumeicon in my tray this boot.



While it's playing music:

[shjake@archbang ~]$ sudo ls /dev/snd
by-id     controlC0  controlC2  hwC2D1     pcmC1D0p  pcmC2D0p  pcmC2D1p  timer
by-path  controlC1  hwC0D0     pcmC0D3p  pcmC2D0c  pcmC2D1c  seq


(sudo lsof /dev/snd still no output)



After it stopped making sound:


[shjake@archbang ~]$ sudo ls /dev/snd
by-id     controlC0  controlC2  hwC2D1     pcmC1D0p  pcmC2D0p  pcmC2D1p  timer
by-path  controlC1  hwC0D0     pcmC0D3p  pcmC2D0c  pcmC2D1c  seq
[shjake@archbang ~]$ sudo lsof /dev/snd
[shjake@archbang ~]$ cat ./.asoundrc
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
[shjake@archbang ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Audio [Bose USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0110 Analog [CA0110 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0110 Digital [CA0110 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#7 2012-06-14 09:37:31

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

<looks for embarrassed gif again>

$ sudo lsof | grep /dev/snd


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#8 2012-06-14 16:33:06

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

When started up:

[shjake@archbang ~]$ sudo lsof | grep /dev/snd
[shjake@archbang ~]$ cat ./.asoundrc
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
[shjake@archbang ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Audio [Bose USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0110 Analog [CA0110 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0110 Digital [CA0110 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Then I fired up vlc:

[shjake@archbang ~]$ vlc
VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547)
[0x1ab0108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x1b915a8] main playlist: stopping playback
[0x7f8120001268] xcb_xv vout display error: no available XVideo adaptor
[0x7f813c000978] pulse audio output error: PulseAudio server connection failure: Connection refused


Vlc is making audible music, dispite the pulse audio error.


While vlc playing:

[shjake@archbang ~]$ sudo lsof | grep /dev/snd
vlc       784     shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784     shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784     shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 789 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 789 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 789 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 790 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 790 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 790 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 797 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 797 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 797 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 800 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 800 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 800 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 801 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 801 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 801 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 802 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 802 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 802 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 803 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 803 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 803 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 804 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 804 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 804 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 805 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 805 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 805 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 806 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 806 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 806 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 807 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 807 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 807 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 822 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 822 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 822 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 823 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 823 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 823 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 824 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 824 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 824 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 825 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 825 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 825 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 826 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 826 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 826 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 827 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 827 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 827 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 828 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 828 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 828 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p
vlc       784 829 shjake  mem       CHR              116,2                10601 /dev/snd/pcmC1D0p
vlc       784 829 shjake    9r      CHR             116,33       0t0       8304 /dev/snd/timer
vlc       784 829 shjake   11u      CHR              116,2       0t0      10601 /dev/snd/pcmC1D0p


Then vlc stopped playing music. I opened it again, tried to play music, no sound came out, and I did the command again:


[shjake@archbang ~]$ sudo lsof | grep /dev/snd
vlc       9328      shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328      shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328      shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9333 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9333 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9333 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9334 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9334 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9334 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9338 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9338 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9338 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9340 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9340 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9340 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9341 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9341 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9341 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9342 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9342 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9342 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9343 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9343 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9343 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9344 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9344 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9344 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9345 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9345 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9345 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9348 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9348 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9348 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9349 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9349 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9349 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9353 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9353 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9353 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9354 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9354 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9354 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9355 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9355 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9355 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9356 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9356 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9356 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9357 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9357 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9357 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9358 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9358 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9358 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9359 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9359 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9359 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer
vlc       9328 9360 shjake  mem       CHR              116,2                   10601 /dev/snd/pcmC1D0p
vlc       9328 9360 shjake   10u      CHR              116,2          0t0      10601 /dev/snd/pcmC1D0p
vlc       9328 9360 shjake   12r      CHR             116,33          0t0       8304 /dev/snd/timer


"aplay -l" and ~/.asoundrc still matched after the stop.

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#9 2012-06-14 17:36:44

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

do you have pulse installed?


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#10 2012-06-14 22:31:29

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Looks like I do:

[shjake@archbang ~]$ sudo pacman -Ss pulse
extra/libao 1.1.0-2
    Cross-platform audio output library and plugins
extra/libcanberra-pulse 0.28-5
    PulseAudio plugin for libcanberra
extra/libpulse 2.0-2 [installed: 1.1-4]
    A featureful, general-purpose sound server (client library)
extra/paprefs 0.9.10-2
    A simple GTK-based configuration dialog for PulseAudio
extra/pavucontrol 1.0-1
    A GTK volume control tool for PulseAudio
extra/pulseaudio 2.0-2
    A featureful, general-purpose sound server
extra/pulseaudio-alsa 2-1
    ALSA Configuration for PulseAudio
community/floyd 2.0.1-4
    displays system load with pulse of keyboard LED
community/libcec 1.6.3-1
    Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter
community/xmms-pulse 0.9.4-3 (xmms-plugins xmms-io-plugins)
    An XMMS output plugin for the PulseAudio sound server

It's weird that sometimes I get a volumeicon on boot and sometimes I don't. Perhaps a funtion of whether or not the cards re-order?

The cards re-ordered in the boot I'm in now, and I got a volumeicon in the tray,

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#11 2012-06-15 06:49:40

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

TBH, I have no idea how pulse works and I have no idea why it would work and then stop - it makes no sense to me (which isn't really saying too much) but my wild guess would be pulse is the problem.

You can also play around with /usr/share/alsa/alsa.conf


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#12 2012-06-15 17:34:25

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Well, I know that Pulse Audio can cause programs "in" Wine to not have sound, and that doing a "sudo killall pulseaudio" can bring sound back "in" Wine. Haven't tried that command yet. Maybe I should. The thing is, I already looked for processes running pulse and didn't find any, so I didn't think that command would help.

Do you know how to restart the Alsa daemon?

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#13 2012-06-15 18:19:26

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

there is no alsa daemon.. you have to unload and load the modules


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#14 2012-06-17 13:07:40

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

According to /etc/rc.conf, there is an alsa daemon. See the last line:

#
# /etc/rc.conf - Main Configuration for Arch Linux

LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="America/Montreal"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

MODULES=()

UDEV_TIMEOUT=30
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

HOSTNAME="archbang"

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng @alsa)


Honestly, not having sound is a show-stopper for me. I like to listen to music while doing stuff and also would like to play a game every now and then in Wine. I would really love for this to be solved.

I tried "sudo killall pulse" as well as "sudo killall pulseaudio", both said "no process found". Neither command brought sound back.

Thanks for working with me,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#15 2012-06-17 18:47:09

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

all the alsa entry in the DAEMONS array does is reset your volume back to the default level.

I don't know - it may be time to remove ALSA and try OSS

Have you tried eliminating all the references to pulse in the asound.conf files?

# Use PulseAudio by default
#pcm.!default {
#  type pulse
#  fallback "sysdefault"
#  hint {
#    show on
#    description "Default ALSA Output (currently PulseAudio Sound Server)"
#  }
#}

#ctl.!default {
#  type pulse
#  fallback "sysdefault"
#}

I would probably do this in the the /etc/asound.conf file in case root needs to start something


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#16 2012-06-17 18:56:45

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

That might be the way to go. I think Wine only uses OSS anyways. What would the consequences of switching to OSS be?

What commands do I need to type, and what config files do I need to tweak?

Would it be as simple as "sudo pacman -R alsa" and "sudo pacman -S oss"?

Would VLC still work? I guess it wouldn't be the end of the world if I tried, because I could put it back if that works less.

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#17 2012-06-17 19:14:38

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

I'd probably try the asound stuff first... but if you want to test, try the following (it's untested but there's probably a wiki article on the arch site)

OSS used to be the default choice in linux until it changed to a proprietary license and ALSA took over... but OSS has since switched back to GPL.  So it wasn't a *technical* reason that caused the mass migration (but maybe OSS is now behind ALSA in features?  I don't really know... you *may* have issues since you have a USB device but it's a simple switch)

1) Install OSS

# pacman -S oss

2) Add oss to the DAEMONS array in /etc/rc.conf (and remove the alsa line)
3) Blacklist the ALSA module

# echo "blacklist soundcore" > /etc/modprobe.d/alsa.conf

4) Reboot
5) Test

$ osstest

Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#18 2012-06-17 19:24:24

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Shouldn't "blacklist soundcore" go in /etc/modprobe.d/modprobe.conf?


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#19 2012-06-17 19:27:26

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

SpawnHappyJake wrote:

Shouldn't "blacklist soundcore" go in /etc/modprobe.d/modprobe.conf?

pretty sure you can use either... any file ending in .conf will be read.  There may be ramifications in using modprobe.conf that I'm unaware of so feel free to use that.  If you boot up and soundcore is not loaded, you're good ($ lsmod | grep soundcore)


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#20 2012-06-17 19:42:25

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

I tried "blacklist soundcore" in /etc/modprobe.d/modprobe.conf and _not_ in /etc/modprobe.d/alsa.conf, and when I booted back in,
when I tried to run osstest, I got:

/dev/mixer: No such file or directory

I then put "blacklist soundcore" in /etc/modprobe.d/alsa.conf (so now it's in both config files), rebooted, and got the same thing.

On both occations, "sudo lsmod | grep soundcore" showed that soundcore was running.

So soundcore isn't being stopped by two blacklistings.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#21 2012-06-17 19:43:59

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

And VLC is playing music somehow. I'll see for how long.

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#22 2012-06-19 18:03:42

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Nope. Stops working after a while.
Also, I booted up today and the sound cards rearranged. No volumeicon. Maybe whether the volumeicon shows up or not is a function of whether or not the sound cards rearrange.

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#23 2012-06-20 23:26:01

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Still can't have sound permently. Sometimes it lasts a long time and cuts off after letting it sit for hours, and sometimes I don't get much music-time out of it. Once I only got one song out of it.

I'm amazed that soundcore is invincible the way it is. I have it blacklisted in two differet config files, and it still gets loaded.
On top of that, if I do "sudo modprobe -R soundcore" and then "sudo lsmod", soundcore still shows up. Even if I drop to a root shell and do "modprobe -R soundcore" and then an "lsmod", soundcore shows up.

In fact, I couldn't get any sound modules to unload.

Does anyone know how to remove alsa? I tried "sudo pacman -R alsa", and that didn't work.

After my sound stopped working, I tried to unload and reload the following:
snd_pcm_oss
snd_mixer_oss
snd_usb_audio
soundcore

Still no sound.

Any ideas?
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#24 2012-06-21 06:53:07

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

The ALSA modules are owned by the kernel so the only true way to totally remove it is to run a custom kernel.  But blacklisting *should* work.  I blacklist a number of modules myself and have never had an issue.

Maybe disabled all the entries in the DAEMONS array and see if it still gets loaded... my *guess* is that some app is not only forcing the load but taking over sound.

What do you have in your autostart file?  Any odd IM clients or SIP phones that could be trying to take audio over?


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#25 2012-06-21 12:47:18

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

I did not put anything in any startup stuff, however, if by default there is stuff in startup, then there would be.

In light of that, I looked at the "Autostarting" Arch Wiki to see if I can find where these startup files are.

/etc/rc.local looks suspicious, because it has lines that say "amixer". amixer is the mixer for alsa.

Here is this suspicious /etc/rc.local file:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

mkdir -p /var/lib/pacman/sync
cd /var/lib/pacman/sync
touch core.db extra.db community.db

amixer sset 'Master Mono' 90% unmute &> /dev/null
amixer sset 'Master' 90% unmute &> /dev/null
amixer sset 'PCM' 90% unmute &> /dev/null
amixer sset 'Front' 90% unmute &> /dev/null
amixer sset 'Center' 90% unmute &> /dev/null
amixer sset 'Surround' 90% unmute &> /dev/null
amixer sset 'Speaker' 90% unmute &> /dev/null
amixer sset 'Headphone' 90% unmute &> /dev/null

Here is my /etc/rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux

LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="America/Montreal"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

MODULES=()

UDEV_TIMEOUT=30
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

HOSTNAME="archbang"

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng @oss)

Nothing suspicious in /etc/rc.conf (to my novice eyes)



But I noticed that in the /etc/rc.d folder there is a bach script titled "alsa":

#!/bin/bash

. /etc/rc.conf
. /etc/conf.d/alsa
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Restoring ALSA Levels"
    if [[ ! -e /var/lib/alsa/asound.state ]]; then
      /usr/sbin/alsactl $ALSA_ARGS store || { stat_fail; exit 1; }
    fi
    if /usr/sbin/alsactl $ALSA_ARGS restore; then
      stat_done
      add_daemon alsa
    else
      stat_fail
      exit 1
    fi

    POWERSAVE=${POWERSAVE:-0}
    if [[ -e /sys/module/snd_ac97_codec/parameters/power_save ]] \
	  && (( $POWERSAVE )); then
      echo $POWERSAVE > /sys/module/snd_ac97_codec/parameters/power_save
      [[ -c /dev/dsp ]] && echo 1 > /dev/dsp
    fi
    if [[ -e /sys/module/snd_hda_intel/parameters/power_save ]] \
	  && (( $POWERSAVE )); then
      echo $POWERSAVE > /sys/module/snd_hda_intel/parameters/power_save
      [[ -c /dev/dsp ]] && echo 1 > /dev/dsp
    fi
    ;;
  stop)
    SAVE_VOLUME=${SAVE_VOLUME:-yes}
    if [[ "$SAVE_VOLUME" = "yes" ]]; then
      stat_busy "Saving ALSA Levels"
      /usr/sbin/alsactl $ALSA_ARGS store || { stat_fail; exit 1; }
    else
      stat_busy "Stopping ALSA"
    fi
    if [ "$MUTE_VOLUME" == "yes" ]; then
      /usr/bin/amixer -q set Master 0 mute || { stat_fail; exit 1; }
    fi
    stat_done
    rm_daemon alsa
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  force-restart)
    stat_busy "Trying to TERM or KILL processes that are blocking ALSA..."
    FILES="$(ls -1 /dev/snd/* | grep -vi control)"
    fuser -k -SIGTERM $FILES
    fuser -k $FILES
    stat_done
    $0 restart
    ;;
  *)
    echo "usage: $0 {start|stop|restart|force-restart}"
esac

The /etc/conf.d/asla file the above references:

# Arguments for alsactl
# example: ALSA_ARGS="--file /var/lib/alsa/asound.state"
ALSA_ARGS="--file /var/lib/alsa/asound.state"

# Enables powersaving mode for AC97 and hda_intel audio chips.
# Set to 1 to enable powersaving.
# Set to 0 to disable powersaving (default).
POWERSAVE=0

# Whether to save volume levels when stopped ("yes" or "no").
SAVE_VOLUME="yes"

# Whether to mute the master volume when stopped ("yes" or "no").
# Useful for bad audio cards which make a noise on system poweroff.
MUTE_VOLUME="no"

I'll try nutralizing alsa in /etc/rc.local and /etc/rc.d/alsa and /etc/conf.d/alsa.

Any other suggestions?

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#26 2012-06-21 13:06:47

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

I think the entries in /etc/rc.local *and* having alsa as a daemon on rc.conf are redundant but thats not your issue.

Is it correct to say that sound *always* works on a clean bootup but it will fail at a random time afterwards?

If so, I think there has to be another app taking control.

When I meant startup, I was referring to your (presumably) OpenBox autostart file

What about if you avoid VLC and use something like deadbeef... same issue?


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#27 2012-06-21 13:06:55

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Ok, I tried the idea I had last post, and now I have no sound period.

About my earlier post of trying to remove and reload modules...it's supposed to be a lowercase "r", to remove, not an uppercase "R".

After all that, soundcore still shows up under "lsmod". Doing "sudo modprobe -r soundcore" gives "FATAL: Module soundcore is in use."
Even if I add "-f" for "force".

No oss modules were loaded this time, even though I still have oss under "DAEMONS" in /etc/rc.conf. I did "sudo modprobe snd_pcm_oss" and that seemed to load them all.

But still no sound.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#28 2012-06-21 13:09:51

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Whoa! simultaneous posting! Mindwave harmonics, bro!

Yes, I always have sound on startup (until my latest "brilliant" idea ruined it), and then a random time later, it goes away.

It's not application specific. Before I was using MPlayer. It affects MPlayer, VLC, and even listening to YouTube in FireFox.

Let me look at that startup file you mention
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#29 2012-06-21 13:11:01

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Here is my OpenBox autostart:

(sleep 3 && /usr/bin/nm-applet --sm-disable) &
tint2 &
conky -q &
volumeicon -b &
nitrogen --restore &
#xcompmgr &
#xbacklight -set 100 &
#/usr/bin/synclient TouchpadOff=1 &
#batti &
#fbxkb &

I never touched it
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#30 2012-06-21 13:12:06

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Oh. volumeicon uses ALSA. Could that be the issue?


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#31 2012-06-21 13:19:48

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

I just commented out volumeicon, rebooted, and have sound. Let's see how long that lasts.

I am using VLC. No oss modules are loaded, yet when I switch VLC from "default" to "oss", it still makes sound.
How is this possible? The startup scrolling text did say "starting oss", but without modules?

Soundcore is still loaded.

When I switch VLC to OSS, it says it is using /dev/dsp.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#32 2012-06-21 13:22:48

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

/dev/dsp does not exist. Yet VLC says it is using it. /dev/dsp is created by snd_pcm_oss according to here: https://bbs.archlinux.org/viewtopic.php?id=99234

snd_pcm_oss is not loaded.

I must still be using ALSA.
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#33 2012-06-21 13:32:28

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

You could try booting to runlevel3 (i.e. no Xorg) and playing an mp3 via mpg123 or something... of course if it's random, who knows how long you have to wait, but until this thing is narrowed down you're kind of stuck


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#34 2012-06-21 13:35:38

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Ok. I'll give that a shot.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#35 2012-06-21 13:45:28

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

might be worth either sticking or twisting with regards to OSS too.

Either get back to ALSA and forget about OSS for a while (and, of course, strip it out) or determine why ALSA is still being run while trying to get OSS functional.

I would definitely get rid of volumeicon too even if it is temporary.  There are tons of alternatives and you can use alsamixer until you're ready to test one


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#36 2012-06-21 14:01:32

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Hmm. Well, I booted into runlevel 3 (typing this via iPhone) and told mpg123 to repeatedly play Hank Williams' "Hey Good Lookin'". (first mp3 I could find, the songs (really videos) I was playing before were *.flv files)

Used "--loop -1" to make an infinite loop. Anythig less than zero does that with mpg123.

I'm going to go for a run now. I'll see if it's still going when I come back.

Last time I went for a run to see if it would be stopped by the time I got back, it was still going. (about an hour) Then after using the computer for a good while, sound stopped (mind you this is the same boot from when it was playing music that whole time while I was running). I wonder if I have to be using the computer for it to stop.

Normally, it doesn't last anywhere near an hour.

Well, while that's cranking away, have you checked out my script yet?:
http://bbs.archbang.org/viewtopic.php?id=2992

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#37 2012-06-21 15:04:59

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

SpawnHappyJake wrote:

Well, while that's cranking away, have you checked out my script yet?:
http://bbs.archbang.org/viewtopic.php?id=2992

Cheers,
Jake

I did... I'll comment there instead though to keep things sane


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#38 2012-06-21 18:24:17

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

When I came back (must have been at least 2 hours), Hank Williams was still singing.

So I starting trying to simulate "using my computer" to see if user input would throw it off.
I stopped mpg123 and started playing songs with vlc (works from commandline).

In another tty I dropped to a root shell and went to /sys/class/scsi_host/host0/device/target:0:0:0/0:0:0:0

And ran cat on some of the files.

Also, I ran ls on several directories, and used cd.

I also mounted my external hard drive and started playing music off that.

I ran cat on ~/.asoundrc and ran aplay -l. They match.

So all that to see how it would handle while being used by a user. As opposed to having 0 user input while I'm out on a run.

So far I haven't been able to get the sound to cease, except for when I'm not having it play a song, of course. That's part of the test too. Seeing how it handles being stopped and then being told to play another song.

Maybe you're on to something Oliver!

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#39 2012-06-21 20:32:27

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Yep. Sound hasn't broken itself in runlevel 3. I think it's official.
The "bug" doesn't happen in runlevel 3, at least I haven't been able to get it to happen.

No OSS modules are loaded, and soundcore shows up under lsmod.

Other than getting OSS off and putting the ALSA stuff back, what are the next steps?

Where do I look for programs that seem to at random get started, assuming the problem is due to a program messing ALSA up that doesn't get ran in runlevel 3?

Do I look in /etc/inittab? What places do you recommend?

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#40 2012-06-21 20:50:50

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Hmm. Now I didn't get any sound on boot-up (switched back to runlevel 5), even though my aplay -l and ~/.asoundrc match. Of course, channels are loud enough and unmuted in alsamixer.

When I uninstalled OSS, it said that it put the ALSA modules back in place. I was hoping that'd fix it.

Rebooting.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#41 2012-06-21 20:59:57

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Ok, I removed both blacklistings of soundcore (which didn't do anything because soundcore loads anyways, even in runlevel 3, assumably because it's in the kernel image itself?).

Then I rebooted. The soundcards reordered, so I had to edit ~/.asoundrc. After that, I got sound. I'll see for how long.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#42 2012-06-22 00:39:53

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Ok guys, this might be a breakthrough!

Unfortunately, my sound still stops eventually, but I found out that if I tell it to use my PCI sound card and I plug my earbuds in that, I get sound through that sound card.

So maybe it's only usb audio functionality that has an issue.

I tried unloading snd_usb_audio and reloading it, but that didn't fix it.

My earbuds' cable is too short to get to me from that card (my usb speakers have a thing with a long cable on it that sits on my desk that I can put earbuds into), and I want to use my USB speakers anyways because they're those magic Bose speakers that create surround sound with only two physical speakers. You tell your system that it's a 5.1 card. And the sound quality is really good. My other speaker set (not usb speakers) seem to have become possesed (sometimes they decide what volume they want to be, crakle, and don't make as good sound quality). So simply using the other sound card is not a satisfactory solution.

Any other ideas?

Cheers,
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#43 2012-06-22 07:37:37

oliver
Administrator
Registered: 2010-11-04
Posts: 1,516

Re: I have sound, then it goes away by itself.

did you try disabling volume-icon?


Welly, welly, welly, welly, welly, welly, well. To what do I owe the extreme pleasure of this surprising visit?

Offline

#44 2012-06-22 10:37:44

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Yes, volumeicon is commented out in the OpenBox autostart thing.

Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#45 2012-06-22 23:53:53

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Ok, another discovery.

Recently I booted up and had no sound because the sound cards re-ordered. I edited ~/.asoundrc to match aplay -l. Still no sound.

I remembered that one time when I had volumeicon in my tray (before I took it out of startup, of course) and the sound wasn't working, by me lowering the volume way down and then back up, the sound came back in Mint.

This actually goes back to an earlier memory in Linux Mint. I couldn't get sound to work, and I reached for my physical volume knob, turned it way up, then brought it back down. On the way up it got shocked back to life. I may have had a similar incedent with the software volume in Mint, but after I jolted it a time or two, the issue never came back.

Turning the physical knob doesn't help my ArchBang situation, but I thought I'd give the software volume slider a shot.

Now that volumeicon is out of the startup, I thought I'd give alsamixer a shot (lower volume way down, then bring it back up).

I tried that with alsamixer once, and the sound still didn't come back.

But this last time, I tried it with alsamixer, and that _did_ make the sound come "back". Though that time I did not have sound from startup, so maybe "back" is a little misleading, but ultimately it is coming back because I lost sound the previous boot.

Thank you for your continued dedication!


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#46 2012-06-23 16:11:59

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Happened again. Booted up, sound cards were re-ordered, edited ~/.asoundrc to match "aplay -l", and still no sound. Lowering volume with alsamixer brought sound back. Then I brought the volume back up, and it was still good.

Notice the actual problem is still there. I might have a temporary fix for it, but it keeps breaking.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#47 2012-06-23 16:22:27

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

My sound just stopped. It stopped after already having done the alsamixer trick, which is what got me sound this boot. I tried the alsamixer trick again, and still no sound. Apparently the trick only works for getting sound the first time if there is no sound on startup, not after it goes away.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#48 2012-06-23 16:55:49

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Oops. I forgot to replace "oss" with "alsa" in rc.conf. That's why I wasn't having sound on startup. I'll see how it lasts now. I have a feeling it will still cut off after a while, given I'm just back where I was when I started.

Maybe this won't be solved until an snd_usb_audio update, or possibly a kernel update, given ALSA is in the kernel image.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#49 2012-06-25 09:56:52

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Sorry folks, I'll be unavailable this week. How about picking it up the next? Have a good one!
Jake


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

#50 2012-08-04 08:03:49

cirrus
Member
From: Glasgow , Scotland
Registered: 2012-07-10
Posts: 53
Website

Re: I have sound, then it goes away by itself.

i had same same where no soundcard was being recognised i added an alsa-base.conf file similar to http://pastebin.com/314T04RG then devices was found only alsamixer showed soundcard as 2nd device so i edited the file like so ..  install sound-slot-0 /sbin/modprobe snd-card-0 to -card-1  &  install sound-slot-1 /sbin/modprobe snd-card-1 to card-0 . good luck


Desktop 3x Boot Sabayon,Debian,Archbang
Arch-Arm - Raspberry Pi Model B Rev 1.0
GPU:ASUS® [G92 EN8800 GT TOP] 512MB DDR3]
http://cirrusminor.info

Offline

#51 2012-08-04 15:53:14

SpawnHappyJake
ArchBanger
Registered: 2012-01-13
Posts: 210

Re: I have sound, then it goes away by itself.

Thanks for the effort Cirrus, but that's not my problem. My installation can detect all sound cards just fine. It's just that eventually it stops putting sound out through the USB sound card, but not during runlevel 3 (command line). I have only witnessed the bug when booted into a GUI.


WARNING/DISCLAIMER: My posted solutions (or attempts thereof) are usually my attempt at (re)iterating something that worked for _me_. I do not guarantee they will work for you. Use at your own risk.
My solutions may not be the simplest solutions, either. However, I do not intentionally add pointless complications.

Offline

Board footer

Powered by FluxBB