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

相關內容