Arch Linux (xmonad) 中没有音频

Arch Linux (xmonad) 中没有音频

我正在使用 Arch Linux 和 xmonad 窗口管理器。我已经安装了alsa-utils ,据我所知,alsa 驱动程序应该默认安装。

但是当我尝试使用 cvlc 打开任何媒体文件时,我收到此错误:

┌─(severus)──(~) 
└─> $ cvlc /run/media/severus/Entertainment/Barton\ Springs\ -\ Bird\ Creek-qIKD169VDy0.opus 
VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
[0000000001624e78] pulse audio output error: PulseAudio server connection failure: Connection refused
[000000000166cf38] dummy interface: using the dummy interface module...
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
[0000000001624e78] alsa audio output error: cannot open ALSA device "default": No such file or directory
[0000000001624e78] core audio output error: Audio output failed
[0000000001624e78] core audio output error: The audio device "default" could not be used:
No such file or directory.
[0000000001624e78] core audio output error: module not functional
[00007f3318c0ebe8] core decoder error: failed to create audio output
[00007f3318c0ebe8] opus decoder error: Oops: No new buffer was returned!
^C
┌─(severus)──(~) 
└─> $ 

输出alsamixer

在此输入图像描述

在此输入图像描述

输出lspci -k| grep -A 3 -i audio

┌─(severus)──(~) 
└─> $ lspci -k|  grep -A 3 -i audio
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
    Subsystem: Hewlett-Packard Company Device 2212
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
--
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
    Subsystem: Hewlett-Packard Company Device 2212
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
┌─(severus)──(~) 
└─> $ 

请帮我解决这个问题。

答案1

问题是,输出被定向到错误的设备(HDMI),

我通过执行以下操作检测到了这一点:

speaker-test -D default:PCH -c 8

所以我创建了一个文件/etc/modprobe.d/alsa-base.conf

包含以下内容

options snd_hda_codec_realtek=0
options snd_hda_intel index=1

一切都很有魅力:D

更多信息 :https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

相关内容