![Arch Linux 根本不播放声音](https://linux22.com/image/208959/Arch%20Linux%20%E6%A0%B9%E6%9C%AC%E4%B8%8D%E6%92%AD%E6%94%BE%E5%A3%B0%E9%9F%B3.png)
无论我做什么,我的 Arch Linux 安装都拒绝播放声音。我已经运行了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 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC245 Analog [ALC245 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
这是输出lspci -k
:
Usage: lspci [<switches>]
Basic display modes:
-mm Produce machine-readable output (single -m for an obsolete format)
-t Show bus tree
Display options:
-v Be verbose (-vv or -vvv for higher verbosity)
-k Show kernel drivers handling each device
-x Show hex-dump of the standard part of the config space
-xxx Show hex-dump of the whole config space (dangerous; root only)
-xxxx Show hex-dump of the 4096-byte extended config space (root only)
-b Bus-centric view (addresses and IRQ's as seen by the bus)
-D Always show domain numbers
-P Display bridge path in addition to bus and device number
-PP Display bus path in addition to bus and device number
Resolving of device ID's to names:
-n Show numeric ID's
-nn Show both textual and numeric ID's (names & numbers)
-q Query the PCI ID database for unknown ID's via DNS
-qq As above, but re-query locally cached entries
-Q Query the PCI ID database for all ID's via DNS
Selection of devices:
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots
-d [<vendor>]:[<device>][:<class>] Show only devices with specified ID's
Other options:
-i <file> Use specified ID database instead of /usr/share/hwdata/pci.ids
-p <file> Look up kernel modules in a given file instead of default modules.pcimap
-M Enable `bus mapping' mode (dangerous; root only)
PCI access options:
-A <method> Use the specified PCI access method (see `-A help' for a list)
-O <par>=<val> Set PCI access parameter (see `-O help' for a list)
-G Enable PCI access debugging
-H <mode> Use direct hardware access (<mode> = 1 or 2)
-F <file> Read PCI configuration dump from a given file
这是输出sudo alsactl init
Found hardware: "HDA-Intel" "ATI R6xx HDMI" "HDA:1002aa01,00aa0100,00100700" "0x103c" "0x8a31"
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
这是输出lspci -v | grep -A7 -i audio
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
Subsystem: Hewlett-Packard Company Device 8a31
Flags: bus master, fast devsel, latency 0, IRQ 87, IOMMU group 14
Memory at d05c8000 (32-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
--
04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
Subsystem: Hewlett-Packard Company Device 8a31
Flags: bus master, fast devsel, latency 0, IRQ 85, IOMMU group 18
Memory at d0580000 (32-bit, non-prefetchable) [size=256K]
Capabilities: <access denied>
Kernel driver in use: snd_rn_pci_acp3x
Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_sof_amd_renoir
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
Subsystem: Hewlett-Packard Company Device 8a31
Flags: bus master, fast devsel, latency 0, IRQ 88, IOMMU group 19
Memory at d05c0000 (32-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
奇怪的是,声卡似乎是 HDMI,所以也许这就是问题所在?
这是一台 HP Envy x360,除了这个小问题之外,它运行良好。我希望能够播放声音,并且非常感谢解决这个问题的任何帮助。谢谢!
答案1
我发现了以下内容ubuntu 论坛上的帖子其中OP描述了相同的问题并且也具有相同的ATI R6XX HDMI
设备。解决方案是radeon.audio=1
通过执行以下操作来设置内核标志:
/etc/default/grub
使用文本编辑器打开找到条目
GRUB_CMDLINE_LINUX_DEFAULT
添加
radeon.audio=1
在双引号部分的末尾保存文件并运行
sudo update-grub
例如:
更改原始/etc/default/grub
条目:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
到:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet radeon.audio=1"
请勿/boot/grub/grub.cfg
按照该线程中一位用户的指示进行编辑。
如果这不起作用,或者radeon.audio=1
已经设置,请报告您进入alsamixer
并按时列出了哪些设备F6
?按F6
alsamixer 应该允许您选择系统识别的卡。
答案2
我的猜测是 ALSA 默认使用 HDMI 输出声音。您可以通过将笔记本电脑插入带有 HDMI 的电视来测试这一点。
您还可以尝试强制 aplay 通过其他声音设备输出作为测试:aplay -Dhw:1,0 /usr/share/sounds/alsa/Noise.wav
。如果可行,您可以使用此处的说明将卡 1 设置为默认值:https://www.alsa-project.org/main/index.php/Setting_the_default_device。