View previous topic :: View next topic |
Author |
Message |
JessicaPietrov n00b
Joined: 23 Jan 2021 Posts: 4
|
Posted: Sat Jan 23, 2021 9:54 pm Post subject: Sound suddenly disappeared, "unable to open slave" |
|
|
Hello everyone, I wasn't expecting DuckDuckGo to fail on me for this one but I really can't find a solution.
Up until three to four days ago, my sound was working fine. All of snd_hda_intel and friends were built in my kernel, no asoundrc or really any intentional changes to ALSA configurations. It seemed to stop suddenly, when trying to play music I would get messages like these: Code: |
~> mpv c.wav
(+) Audio --aid=1 (pcm_s16le 2ch 44100Hz)
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/pcm/pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/pcm/pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
[ao/sdl] could not open audio: ALSA: Couldn't open audio device: No such file or directory
[ao] Failed to initialize audio driver 'sdl'
Could not open/initialize audio device -> no sound.
Audio: no audio
Exiting... (Errors when loading file)
|
My initial attempt to solve this was by doing a whole @world+kernel update, going as far as using the latest, still-in-testing packages: Code: |
~> equery list 'gentoo-sources'
* Searching for gentoo-sources ...
[IP-] [ ] sys-kernel/gentoo-sources-5.10.9:5.10.9
~> equery list 'alsa*'
* Searching for alsa* ...
[IP-] [ ] media-libs/alsa-lib-1.2.4:0
[IP-] [ ] media-libs/alsa-topology-conf-1.2.4:0
[IP-] [ ] media-libs/alsa-ucm-conf-1.2.4:0
[IP-] [ ] media-sound/alsa-utils-1.2.4:0.9
[IP-] [ ] sys-firmware/alsa-firmware-1.2.1:0
~>
|
Of course, this didn't fix it, and so I searched up the error messages and read through multiple forum posts, tried adding a line to /etc/modprobe.d/alsa.conf (and recompiling the kernel with sound drivers as modules): Code: |
options snd_hda_intel id=PCH index=0
|
This didn't work, same "unable to open slave" message. Also tried writing an asoundrc, because maybe ALSA has difficulty recognizing a default device/card?: Code: |
pcm.!default {
type hw
card PCH
}
ctl.!default {
type hw
card PCH
}
pcm.dsp {
type plug
slave.pcm "dmix"
}
|
Then I realized that, in the forum posts I've been reading, they had HDMI outputs AND PCH outputs and sometimes multiple soundcards installed. I, on the other hand, only seem to have one, as shown by lspci -nnkv: Code: |
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Subsystem: Lenovo Sunrise Point-LP HD Audio [17aa:380d]
Flags: bus master, fast devsel, latency 32, IRQ 124
Memory at a12a8000 (64-bit, non-prefetchable) [size=16K]
Memory at a1290000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [50] Power Management version 3
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Kernel driver in use: snd_hda_intel
|
and the outputs of aplay -l on said posts always showed actual usable devices/cards, whereas my aplay -l shows only: Code: |
**** List of PLAYBACK Hardware Devices ****
|
Which is curious because, even on cases where ALSA actually does not find any devices/cards it tells you just that: Code: |
aplay: device_list:274: no soundcards found...
|
When running aplay -L, it works just fine, it seems: Code: |
null
Discard all samples (playback) or generate zero samples (capture)
front:CARD=PCH
Front output / input
surround21:CARD=PCH
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
|
And when running amixer, only these two controls are shown: Code: |
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Digital',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 120
Front Left: Capture 0 [0%] [-30.00dB]
Front Right: Capture 0 [0%] [-30.00dB]
|
I don't have Pulse or JACK anywhere near my system, so I don't think the issue would be related to either. I am also in the audio group and nothing is muted. Here is the current kernel config after all of the fiddling: Code: |
~> grep SND_HDA* /usr/src/linux/.config
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
CONFIG_SND_HDA=y
CONFIG_SND_HDA_GENERIC_LEDS=y
CONFIG_SND_HDA_INTEL=y
# CONFIG_SND_HDA_HWDEP is not set
# CONFIG_SND_HDA_RECONFIG is not set
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1
# CONFIG_SND_HDA_PATCH_LOADER is not set
CONFIG_SND_HDA_CODEC_REALTEK=y
# CONFIG_SND_HDA_CODEC_ANALOG is not set
# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
# CONFIG_SND_HDA_CODEC_VIA is not set
CONFIG_SND_HDA_CODEC_HDMI=y
# CONFIG_SND_HDA_CODEC_CIRRUS is not set
# CONFIG_SND_HDA_CODEC_CONEXANT is not set
# CONFIG_SND_HDA_CODEC_CA0110 is not set
# CONFIG_SND_HDA_CODEC_CA0132 is not set
# CONFIG_SND_HDA_CODEC_CMEDIA is not set
# CONFIG_SND_HDA_CODEC_SI3054 is not set
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set
CONFIG_SND_HDA_CORE=y
CONFIG_SND_HDA_COMPONENT=y
CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_PREALLOC_SIZE=0
|
As of now, when I run speaker-test while having the asoundrc active, it gives me this output: Code: |
speaker-test 1.2.4
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory
|
instead of the standard "unable to open slave". Changes can also be observed in aplay and mpv output: Code: |
~> aplay c.wav
aplay: main:830: audio open error: No such file or directory
~> mpv c.wav
(+) Audio --aid=1 (pcm_s16le 2ch 44100Hz)
[ao/alsa] Playback open error: No such file or directory
[ao/sdl] could not open audio: ALSA: Couldn't open audio device: No such file or directory
[ao] Failed to initialize audio driver 'sdl'
Could not open/initialize audio device -> no sound.
Audio: no audio
Exiting... (Errors when loading file)
~>
|
This is where I'm stuck and out of ideas. Although, I find it weird the initial error message mentions "/var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/pcm/pcm_dmix.c:1075:(snd_pcm_dmix_open)", when any of those directories are nonexistent and my /var/tmp/portage/ is squeaky clean. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54397 Location: 56N 3W
|
Posted: Sat Jan 23, 2021 10:01 pm Post subject: |
|
|
JessicaPietrov,
Welcome to Gentoo.
Please post the output of and the content of /proc/asound/devices.
If you are not using pulseaudio, check that your user is in the audio group.
Your error is Code: | No such file or directory | rather than Permission denied, so that may be OK.
-- edit --
If you plan to use audio over HDMI turn on Code: | # CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set | Its a hack to prevent loosing the first few sec of the audio stream. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
JessicaPietrov n00b
Joined: 23 Jan 2021 Posts: 4
|
Posted: Sat Jan 23, 2021 10:20 pm Post subject: |
|
|
Code: | ~> ls -lh /dev/snd
drwxr-xr-x 2 root root 60 Jan 23 16:36 by-path
crw-rw---- 1 root audio 116, 2 Jan 23 16:14 controlC0
crw-rw---- 1 root audio 116, 1 Jan 23 16:14 seq
crw-rw---- 1 root audio 116, 33 Jan 23 16:14 timer |
Code: | ~> cat /proc/asound/devices
1: : sequencer
2: [ 0] : control
33: : timer |
Code: | ~> groups marsh
wheel audio video kvm users portage marsh libvirtd |
I should get to enabling silent stream sometime soon, I just never really used HDMI on this computer so far. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54397 Location: 56N 3W
|
Posted: Sat Jan 23, 2021 11:07 pm Post subject: |
|
|
JessicaPietrov,
All your sound devices are missing from /dev/snd.
You should have pcmC0D0c, pcmC0D0p and friends.
Why do you think that Code: | CONFIG_SND_HDA_CODEC_REALTEK=y | is your codec? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
JessicaPietrov n00b
Joined: 23 Jan 2021 Posts: 4
|
Posted: Sat Jan 23, 2021 11:23 pm Post subject: |
|
|
Oh geez, how in the hell did this happen?
Back when I set up this system (been over a year now, second Gentoo install), I could check /proc to find the codec for my soundcard, Realtek HD Generic. |
|
Back to top |
|
|
WvR Apprentice
Joined: 03 Mar 2011 Posts: 200 Location: Tsuruga, Japan
|
Posted: Sun Jan 24, 2021 12:45 am Post subject: |
|
|
I am sorry to come into this thread, but I have the __exact same problem__. In my case, sound just stopped working 2 days ago. This is the thread: https://forums.gentoo.org/viewtopic-t-1128765.html . I have the same problem.
Code: |
rooijen@sagittarius ~ $ ls -l /dev/snd
合計 0
drwxr-xr-x 2 root root 60 1月 23 20:46 by-path
crw-rw----+ 1 root audio 116, 2 1月 23 20:46 controlC0
crw-rw----+ 1 root audio 116, 1 1月 23 20:46 seq
crw-rw----+ 1 root audio 116, 33 1月 23 20:46 timer
|
and
Code: |
rooijen@sagittarius ~ $ cat /proc/asound/devices
2: [ 0] : control
33: : timer
|
and
Code: |
rooijen@sagittarius ~ $ groups rooijen
wheel video usb users portage rooijen
|
This must be due to some recent library update. I updated my world set a few days ago, the sound problem happened soon after that.[/url] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|