You are not logged in.
Hey there,
I‘m a completely new user to arch and linux in general, deciding that win10 won‘t be my future…
I installed Arch following the instructions for beginners and (besides the Hybrid graphics, but thats another topic) everything works pretty well. Yesterday I installed the game WarThunder. The game itself has no problems but I cannot hear any sound. Running the game by console shows me always the following error:
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Later I noticed, that the system is only capable of playing audio with firefox, amarok and speaker-test don‘t work either.
speaker-test
speaker-test 1.1.3
Wiedergabe-Gerät ist default
Stream-Parameter sind 48000 Hz, S16_LE, 1 Kanäle
Verwende 16 Oktaven rosa Rauschen
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Fehler beim Öffnen des Gerätes: -2, Datei oder Verzeichnis nicht gefunden
I did quite some researches to solve this and learned a lot about ALSA etc., but so far it was not enough to solve the error completely.
Well lets start with my setup: Arch with KDE5, Pulseaudio, ALSA lib and utils are installed, everything up to date.
Here are some reports that I run:
aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: HDMI [HDA Intel HDMI], Gerät 3: HDMI 0 [HDMI 0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: HDMI [HDA Intel HDMI], Gerät 7: HDMI 1 [HDMI 1]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: HDMI [HDA Intel HDMI], Gerät 8: HDMI 2 [HDMI 2]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: PCH [HDA Intel PCH], Gerät 0: CX20757 Analog [CX20757 Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
HDA Intel HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA Intel HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA Intel HDMI, HDMI 2
HDMI Audio Output
default:CARD=PCH
HDA Intel PCH, CX20757 Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, CX20757 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, CX20757 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
lspci -knn|grep -iA2 audio
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
Subsystem: Lenovo Device [17aa:3978]
Kernel driver in use: snd_hda_intel
--
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)
Subsystem: Lenovo Device [17aa:3978]
Kernel driver in use: snd_hda_intel
With Google I found a thread with a very similar hardware setup, and the solution in the linked post worked for me partly. After creating the file /etc/modprobe.d/default.conf with the content
options snd_hda_intel index=1
I was able to get sound from WarThunder, Amarok and speakertest without an error and all of them simultaneously, yeeehaa :-)
But the problem now is that I can play either sound with Firefox, but other applications are blocked or I can play sound from other applications, but then Firefox won't play a youtubevideo until I have closed all other sound applications.
Playing audio with Firefox and starting speakertest gives me the following:
speaker-test
speaker-test 1.1.3
Wiedergabe-Gerät ist default
Stream-Parameter sind 48000 Hz, S16_LE, 1 Kanäle
Verwende 16 Oktaven rosa Rauschen
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Fehler beim Öffnen des Gerätes: -16, Das Gerät oder die Ressource ist belegt
It seems that firefox can play audio only when there is no other sound application, but I have no idea why...
Maybe you can give me some hints in the right direction, my mind is overloaded right now. :-)
Thanks a lot for your help,
aventurin
Btw: Is it possible to set the console to english, then I could provide the reports in english too?
Last edited by aventurin33 (2017-02-25 00:18:42)
Offline
You say you have pulseaudio installed, do you use it as well? If you use pulse it would be beneficial to install pulseaudio-alsa (and alsa-plugins and lib32-alsa-plugins) so that all your audio is rerouted to pulse. You might also want to post
sudo fuser -v /dev/snd/*
pacmd list-cards
pacmd list-sinks
pacmd list-sink-inputs
during one of these resource is occupied situations to find out which applications are blocking your audio and how pulse is set up. Right now one of the applications in your chain opens the ALSA device for exclusive access (shameless self-plug - read this for a bit of a more in depth explanation of what is happening) preventing other applications from accessing it
For the english console output, you can prepend the command you want to have english output from with LC_ALL=C i.e.
LC_ALL=C speaker-test
Last edited by V1del (2017-02-24 08:57:00)
Online
Hey V1del,
it seems like I focussed too much on ALSA; I only experimented with the Audio settings in the KDE system settings (which controls basically pulseaudio, right?), but that didn't work out...
So after installing the 3 packages which you recommended everything works like a charm! Reading your post about ALSA exclusive access helped me understanding what happend, thanks for that
And for the next time I know that everything can be found in the Arch wiki, I should have read through the Pulseaudio article during the installation and make sure that it is properly configured.
Thank you again for the help, I really appreciate it.
aventurin
Offline