You are not logged in.

#1 2019-08-08 23:50:45

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

After unmuting ALSA, there is still no sound[solved]

After installing Arch Linux fresh today, I got it set up and ready to be used. When I went to play audio in Chromium, however, there was no sound but the video still played. So I searched and saw to try running "speaker-test -c 2" and when I did I got:

speaker-test 1.1.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Playback open error: -2,No such file or directory 

Also: "lspci | grep audio" gives me a blank output.

Output of "aplay -l"

**** List of PLAYBACK Hardware Devices ****
card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

(earlier I was trying to set up a JACK server with loopback, that is why the loopback cards are there. The JACK server still could not play sound)

My asound.conf:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw           
    card 1
}

I figure I must get ALSA in order before JACK can be, but I don't know how to fix this, everything seems like it is set correctly.
Any other outputs I will give, I don't know of any more relevant to post at the moment.


I do not post too often; should I link paste sites or use the code bbcode?

Last edited by kinru (2019-08-09 16:58:59)

Offline

#2 2019-08-09 02:02:16

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: After unmuting ALSA, there is still no sound[solved]

I removed everything JACK related because I suspected it might be causing problems. After that I ran

speake-test -c 2

again. In my unprivileged user I have the output:

speaker-test 1.1.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib dlmisc.c:287:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_jack.so ((null): libjack.so.0: cannot open shared object file: No such file or directory)
Playback open error: -6,No such device or address

I think uninstalling JACK broke something.

However, when I did su to root, the speaker-test ran but it was silent. Then I logged into tty with root and ran startx. In a console I ran "speaker-test -c 2" but it was still silent, but ran.

I also followed this section on the Arch Wiki, and it successfully removed the S/PDIF card from alsamixer. I forgot to mention I am using integrated graphics ever since my GPU died yesterday. sad

Last edited by kinru (2019-08-09 02:06:57)

Offline

#3 2019-08-09 08:17:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: After unmuting ALSA, there is still no sound[solved]

How exactly did you remove everything jack? FWIW granted you just get that error on your normal user, you likely have some ~/.asoundrc overwriting what's defined in the system wide file, and redirecting things to JACK. In general, two things here: What do you actually want output from? Right now your system wide file tells ALSA to play to your HDMI output, do you not actually want to play back to analog? Second if that definition where to be used as posted, it would mean exclusive access for whatever application first requests to be able to play audio. If that's not what you want you will want to define this differently.

FWIW you might want to post your modprobe configs and this ~/.asoundrc and

aplay -L

Last edited by V1del (2019-08-09 08:18:32)

Offline

#4 2019-08-09 12:57:36

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: After unmuting ALSA, there is still no sound[solved]

All I did to remove JACK is "pacman -Rdd jack2-dbus cadence qjackctl" I think there were maybe a few more packages after that too. I had to -Rdd because it "broke the dependency JACK" but I don't know what depended on it, maybe it was an optional dependency?

It is correct I had some kind of JACK configuration in my ~/.asoundrc, here is what it was:

pcm.!default {
    type plug
    slave { pcm "jack" }
}

pcm.jack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

ctl.mixer0 {
    type hw
    card 0
}

I changed the file name (in case I need it later) and made a new .asoundrc. Now the new file named .asoundrc is blank.

My /etc/asound.conf is now (I changed the 1's to 0's):

pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw           
    card 0
}

However the card #1 was not my HDMI sound card, that is my external AAC/DAC for my microphone. I want to play back on my card called "HD-Audio Generic" this is card #0 and is the motherboard's integrated sound. When I followed the wiki section it did remove the #0 card "S/PDIF".

Now my card and card number are like this

Card #0    =       HD-Audio Generic
Card #1    =       USB Audio Codec

After all this I rebooted and the "speaker-test -c 2" ran but as on the root user made no sound. The output was:

speaker-test 1.1.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
 1 - Front Right
Time per period = 5.520099
 0 - Front Left
 1 - Front Right
^CTime per period = 3.838244

As V1del requested here is my aplay -L:

null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
sysdefault:CARD=CODEC
    USB Audio CODEC, USB Audio
    Default Audio Device
front:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    Front speakers
surround21:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=CODEC
    USB Audio CODEC
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC887-VD Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=Generic
    HD-Audio Generic
    USB Stream Output

This one is strange. I see "pulse" in the output. I am running X and i3. I never instlaled it manually at any point. Maybe it is part of a package group that is installed?

Also here are my modprobe configs:

amdgppu.conf

options amdgpu si_suport=1
options amdgpu cik_support=0

nobeep.conf

blacklist pcspkr

radeon.conf

options radeon si_support=0
options radeon cik_support=0

sound.conf

options snd_hda_intel enable=0,1

I should say, I have 5.1 stereo headphones and all the cords are plugged in. It is not important to me if I get 5.1 or stereo atm, the game I play doesn't do 5.1 properly anyway.

Last edited by kinru (2019-08-09 13:01:19)

Offline

#5 2019-08-09 13:07:30

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: After unmuting ALSA, there is still no sound[solved]

I rebooted after all this and now I am getting sound!

Maybe I can now make my asound.conf empty?

Last edited by kinru (2019-08-09 13:09:47)

Offline

#6 2019-08-09 13:29:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: After unmuting ALSA, there is still no sound[solved]

The underlying problem of the "other" issues is that ALSA's index ordering isn't stable across reboots, You would want something like

#You'd probably want to define a stable index for snd-hda-intel as well, though I'm unsure on how the relation with the enable param is going to be
options snd_hda_intel enable=0,1
options snd_usb_audio index=-2

to ensure that the USB DAC never accidentally occupies index 0. Given that you could remove your asound.conf indeed (the configuration as is doesn't properly define itself as a default device and will be exclusive access to a single application.)

More generally, you really shouldn't remove packages other things are depending on by skipping dependency checks, to be fully covered you should reinstall some jack server otherwise you might incidentally run into code that loads jack and starts to fail (even if it would finally end up using ALSA anyway, there might be software which expects to be able to check for jack because they are linked against it)

Regarding the pulse in the aplay listing, that's just the PCM provided by the alsa-plugin package to redirect ALSA applications to pulse, it shouldn't have an effect when you are otherwise configured to not use pulse.

Offline

#7 2019-08-09 16:58:22

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: After unmuting ALSA, there is still no sound[solved]

The options

options snd_hda_intel enable=0,1
options snd_usb_audio index=-2

did not work out, I'm not sure why. The options I had previously did restrict ALSA to output from only one audio source (if that makes sense). I got a warning when I ran

alsamixer

I made /etc/asound.conf into an empty file, then the alsamixer command worked. I unmuted the channels as if it was a completely fresh install and everything seems to be working well. If the issue is truly resolved I will mark the title [solved].

Offline

Board footer

Powered by FluxBB