You are not logged in.
Hello everyone,
I have recently installed ArchLinux for the first time and I can't get the sound to work. I'm a relatively new Linux user so please bear with me.
I get beeps sometimes at errors or warning messages but that's it. I have tried unmuting the channels in alsamixer but there's still no sound. Tried headphones: nothing. The system is up to date.
$ 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: Generic_1 [HD-Audio Generic], device 0: ALC282 Analog [ALC282 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
$ cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
$ lspci -nn | grep -i audio
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:9840]
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d] (rev 02)
from /etc/modprobe.d/alsa-base.conf file:
options sna-hda-intel index=0 model=auto vid=1022 pid=780d
options sna-hda-intel index=-2 model=auto vid=1002 pid=9840
I don't have a /etc/asound.conf or ~/.asoundrc.
$ lsmod | grep '^snd' | column -t
snd_usb_audio 131860 0
snd_usbmidi_lib 21428 1 snd_usb_audio
snd_rawmidi 20278 1 snd_usbmidi_lib
snd_seq_device 5244 1 snd_rawmidi
snd_hda_codec_realtek 54803 1
snd_hda_codec_generic 56366 1 snd_hda_codec_realtek
snd_hda_codec_hdmi 40396 1
snd_hda_intel 22831 2
snd_hda_controller 22911 1 snd_hda_intel
snd_hda_codec 104665 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep 6652 2 snd_usb_audio,snd_hda_codec
snd_pcm 83207 5 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer 19294 1 snd_pcm
snd 61276 16 snd_hda_codec_realtek,snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_rawmidi,snd_hda_codec_generic,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
$ cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0c40000 irq 45
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0c44000 irq 16
$ speaker-test -c 2
speaker-test 1.0.28
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
Here's how the default card 0 looks in alsamixer:
Please let me know if more information is needed. Thank you very much in advance!
Last edited by naerro (2014-07-18 19:50:51)
Offline
The beep on errors is the pcspkr beep and is independent of anything related to alsa or any other sounds.
As for the real issue, I'm not completely sure, but it looks like the HDMI might be treated as the default/primary output. Do you have anything you can connect to the HDMI output to verify?
If this is the issue, or if you can't verify with HDMI speakers, then just create an ~/.asoundrc setting card1 to be the default (see the wiki page on alsa for how).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Naerro, you set the default device alsa to the FCH Azalia, but for some reason the HDMI card is set as the default one according to 'aplay -l'. Using ~/.asoundrc, could be possible, but I do not recommend it in your case. You did a good job following the wiki, I am glad someone actually reads it.
Modify your modprobe options to use index=1 for the HDMI card, instead of '-2', then reboot.
Speaker-test does not work, since the HDMI has a default device number 3, instead of the default pcm.defaults node value 0.
Also model=auto has been left on the wiki as a hint to use that module options if needed, you can drop it or specify it, although that should be unnecessary.
If you want to disable the beep, blacklist the pcskpr module.
@Trilby should for some reason the order of the sound cards be changed during the boot, and this is a special scenario, since both cards use the same alsa name reference 'Generic' and the same module snd_hda_intel, ~/.asoundrc would have to be changed again. The best option is to stick with modprobe using vid and pid, it just needs to work properly.
Offline
Thank you very much for the replies. I have tried both suggestions and setting the default in ~/.asoundrc worked!
The sound in VLC is distorted despite trying to fix it in alsamixer but seems it's a known issue with VLC. Normal audio plays fine. Still no sound in Firefox/Chromium but that might be a topic for another thread.
Offline
So:
options snd-hda-intel index=0 vid=1022 pid=780d
options snd-hda-intel index=1 vid=1002 pid=9840
did not work? Do you have other modprobe options in other files? Could you try these out with ~/.asoundrc disabled?
options snd-hda-intel index=1 vid=1002 pid=9840
options snd-hda-intel index=0 vid=1022 pid=780d
This should not matter, but maybe parsing has something to do with it. Please reboot. If that does not help, please try:
options snd-hda-intel index=0,1 vid=1022,1002 pid=780d,9840
or simply:
options snd-hda-intel index=0 vid=1022 pid=780d
If that does not work after a reboot each, could you post dmesg? This may seem unnecessary, since you have got it working, but it could help in other cases, since this method should work.
As for the distortions you could try increasing the buffer and period sizes.
As for the ~/.asoundrc, remember that using type hw is not recommended:
Simply setting a type hw as default card is equivalent to addressing hardware directly, which leaves the device unavailable to other applications. This method is only recommended if it is a part of a more sophisticated setup ~/.asoundrc or if user deliberately wants to address sound card directly (digital output through eic958 or dedicated music server for example).
Using defaults.pcm.!card 1 sustains the use of pcm.dmix for multiple sounds at one.
Edit: All of the above should work and make the FCH Azalia the default card (0,0).
Last edited by emeres (2014-07-18 23:00:43)
Offline
in your /etc/modprobe.d/alsa-base.conf
options sna-hda-intel index=0 model=auto vid=1022 pid=780d
options sna-hda-intel index=-2 model=auto vid=1002 pid=9840
sna ? I guess it can't work with "sna" ? I think it must be "snd"
Offline
@midixinga good thing you caught that.
Offline
Just so future people searching this problem know, the first method op used to solve his problem does indeed cause sound to not work in browsers (at least for me). Using emeres' solution of
options snd-hda-intel index=0 vid=1022 pid=780d
options snd-hda-intel index=1 vid=1002 pid=9840
fixes the problem. Now sound works everywhere perfectly. Also for searchers, I am using a Toshiba C75D-A. Since finding this thread in the first place took so long, then again I didn't use my laptop to search but it might help who knows.
Thanks emeres!
Offline
You are welcome.
Offline
@emeres
Sorry for the late reply, I didn't have the opportunity to test until now. I tried what you suggested and still no go. Here is the dmesg: http://pastebin.com/2Q6Zvdis. I have a laptop HP 255 if that helps any.
You also mentioned that it's bad practice setting the type as "hw" but what should I set it as? I wasn't able to find information about that.
Thanks in advance.
EDIT:
I managed to get it to work with alsa-base.conf only. I fixed the "sna" to "snd" in the config I had at the beginning of this thread and rebooted again. So now it looks like this:
options snd-hda-intel index=0 model=auto vid=1022 pid=780d
options snd-hda-intel index=-2 model=auto vid=1002 pid=9840
Now the sound in Firefox works as well!
Last edited by naerro (2014-07-28 18:51:33)
Offline
[ 8.238167] snd_hda_intel: unknown parameter 'vid' ignored
[ 8.238181] snd_hda_intel: unknown parameter 'pid' ignored
I wonder what causes this, since it should be supported (I cannot find the appropriate documentation part right now). Since the modprobe works now, does dmesg still output those lines? (dmesg | grep hda) If it does, post your sound configuration the current kernel.
zgrep SND /proc/config.gz
For future reference, instead of type hw use dmix, which enables software mixing (multiple sounds at once). Either define a new dmix or use the default one (pcm.dmix), but there could be limitations in certain situations when switching between different surround formats. Use it directly or through other pcms as their slave. Read documentation about pcm plugins.
However as I already stated defaults.pcm.card should be preferred here. Read the wiki for more explanation. It may make more sense to use one of the surround definitions for surround sound.
Last edited by emeres (2014-07-28 19:22:53)
Offline
[ 8.238167] snd_hda_intel: unknown parameter 'vid' ignored [ 8.238181] snd_hda_intel: unknown parameter 'pid' ignored
I wonder what causes this, since it should be supported (I cannot find the appropriate documentation part right now). Since the modprobe works now, does dmesg still output those lines?
I had these messages too; nevertheless it worked.
I changed my /etc/modprobe.d/alsa-base.conf to
options snd-hda-intel index=0 model=auto id=PCH
options snd-hda-intel index=1 model=auto id=HDMI
according to
cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf0530000 irq 48
1 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf0534000 irq 47
no more errors in journal
Offline
The id parameter is relevant as long as the devices are not named the same, in which case vid and pid method should be used and therefore is recommended as the universal solution from the beginning. Currently I use this and have no dmesg warnings:
alias snd-card-1 snd-hda-intel index=0 vid=1002 pid=4383
alias snd-card-2 snd-hda-intel index=1 vid=1002 pid=aa30
alias snd-card-3 snd-ice1724 index=2 model=prodigy71hifi vid=1412 pid=1724
alias snd-card-e1 snd-mixer-oss
Offline