全新安装 22.04 - 无声音,但设备存在

全新安装 22.04 - 无声音,但设备存在

编辑:底部更新 - 更多检查和测试 2022 年 7 月 29 日 13:10

我知道有丢失 HDMI 的问题,所以我花了几个小时阅读资料并尝试各种方法。前天同样的硬件在 20.04 上工作正常,所以我认为这不是硬件问题。

我读了一些资料并尝试了 GRUB 编辑,但我不认为这是我的问题 - 它无论如何都没有解决问题,但这是我开始阅读时发现的第一件事。

GRUB_CMDLINE_LINUX="intel_iommu=on,igfx_off"

我更新了 GRUB 并重新启动,但没有任何反应。

所以我决定真正思考一下为什么它不工作……就在我刚刚安装 amdgpu 驱动程序之后,仍然希望能快速修复。以下是详细信息

$ sudo inxi -F -x

 Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: Micro-Star MSI driver: amdgpu v: kernel bus-ID: 01:00.0
  Display: server: X.Org v: 1.22.1.1 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,vesa gpu: amdgpu resolution: 2560x1440~60Hz
  OpenGL: renderer: AMD Radeon RX 470 Graphics (polaris10 LLVM 13.0.1 DRM
    3.42 5.15.0-43-generic)
    v: 4.6 Mesa 22.0.1 direct render: Yes
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Giga.0byte
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
  Device-2: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
    vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus-ID: 01:00.1
  Sound Server-1: ALSA v: k5.15.0-43-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes

以下是来自

$ hwinfo --gfxcard

15: PCI 100.0: 0300 VGA compatible controller (VGA)             
  [Created at pci.386]
  Unique ID: VCu0.XsCzxvyR3V3
  Parent ID: vSkL.vfb7IfXn7N2
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "Micro-Star International Co., Ltd. [MSI] Radeon RX 470"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x67df "Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]"
  SubVendor: pci 0x1462 "Micro-Star International Co., Ltd. [MSI]"
  SubDevice: pci 0x3411 "Radeon RX 470"
  Revision: 0xcf
  Driver: "amdgpu"
  Driver Modules: "amdgpu"
  Memory Range: 0xc0000000-0xcfffffff (ro,non-prefetchable)
  Memory Range: 0xd0000000-0xd01fffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xe0ff (rw)
  Memory Range: 0xdfe00000-0xdfe3ffff (rw,non-prefetchable)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 142 (338427 events)
  Module Alias: "pci:v00001002d000067DFsv00001462sd00003411bc03sc00i00"
  Driver Info #0:
    Driver Status: amdgpu is active
    Driver Activation Cmd: "modprobe amdgpu"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #12 (PCI bridge)

Primary display adapter: #15

只是为了确定:

$ pactl info | grep '^Server Name'

Server Name: pulseaudio

我已卸载并重新安装了 alsa-base 和 pulseaudio。仍然没有效果。

尝试重新启动 pipewire......

$ systemctl --user restart pipewire-session-manager

我运行了 pavucontrol,它看到了两个声音设备。当我播放音频或视频文件时,它会显示音量。

使用 pavucontrol 播放超级高质量视频文件并显示输出级别

然后我检查了 alsamixer:

ALSA /proc/asound/cards

┌────────────────── /proc/asound/cards ───────────────────┐
│ 0 [PCH            ]: HDA-Intel - HDA Intel PCH          │
│                      HDA Intel PCH at 0xdff40000 irq 140│
│ 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI           │
│                      HDA ATI HDMI at 0xdfe60000 irq 141 │
└─────────────────────────────────────────────────────────┘

ALSA /proc/sound/pcm

┌────────────────────── /proc/asound/pcm ───────────────────────┐
│00-00: ALC1150 Analog : ALC1150 Analog : playback 1 : capture 1│
│00-01: ALC1150 Digital : ALC1150 Digital : playback 1          │
│00-02: ALC1150 Alt Analog : ALC1150 Alt Analog : capture 1     │
│01-03: HDMI 0 : HDMI 0 : playback 1                            │
│01-07: HDMI 1 : HDMI 1 : playback 1                            │
│01-08: HDMI 2 : HDMI 2 : playback 1                            │
│01-09: HDMI 3 : HDMI 3 : playback 1                            │
└───────────────────────────────────────────────────────────────┘

默认级别:1

┌─────────────────────────────────── AlsaMixer v1.2.6 ───────────────────────────────────┐
│ Card: HDA ATI HDMI                                             F1:  Help               │
│ Chip: ATI R6xx HDMI                                            F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All                       F6:  Select sound card  │
│ Item: S/PDIF                                                   Esc: Exit               │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                            ┌──┐     ┌──┐     ┌──┐     ┌──┐                             │
│                            │OO│     │OO│     │OO│     │OO│                             │
│                            └──┘     └──┘     └──┘     └──┘                             │
│                         < S/PDIF >S/PDIF 1 S/PDIF 2 S/PDIF 3                           │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
│                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────┘

以上级别均不会从“00”上升

除了从 HDMI 端口接一根绳子和一个锡罐外,我几乎没有其他主意了。有什么想法吗?

编辑:更新 - 更多检查和测试 - 2022 年 7 月 29 日 13:10

更多来自 ALSA 的信息

$ aplay -l | grep HDMI

card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]

尝试在每个设备上播放声音,但结果却一片寂静

$ aplay -D hw:1,3 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1358: Channels count non available


$ aplay -D hw:1,7 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1358: Channels count non available


$ aplay -D hw:1,8 /usr/share/sounds/alsa/Front_Right.wav

aplay: main:831: audio open error: Device or resource busy


$ aplay -D hw:1,9 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1358: Channels count non available

尝试此操作后,我意识到 pavucontrol 仍然处于打开状态。我将其关闭,然后尝试再次播放 hw:1,8:

$ aplay -D hw:1,8 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1358: Channels count non available

以下是 HDMI 的具体内容:

$ aplay -L | grep HDMI

hw:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
hw:CARD=HDMI,DEV=7
    HDA ATI HDMI, HDMI 1
hw:CARD=HDMI,DEV=8
    HDA ATI HDMI, HDMI 2
hw:CARD=HDMI,DEV=9
    HDA ATI HDMI, HDMI 3
plughw:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
plughw:CARD=HDMI,DEV=7
    HDA ATI HDMI, HDMI 1
plughw:CARD=HDMI,DEV=8
    HDA ATI HDMI, HDMI 2
plughw:CARD=HDMI,DEV=9
    HDA ATI HDMI, HDMI 3
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA ATI HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA ATI HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 3
    HDMI Audio Output
dmix:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
dmix:CARD=HDMI,DEV=7
    HDA ATI HDMI, HDMI 1
dmix:CARD=HDMI,DEV=8
    HDA ATI HDMI, HDMI 2
dmix:CARD=HDMI,DEV=9
    HDA ATI HDMI, HDMI 3
usbstream:CARD=HDMI
    HDA ATI HDMI

我已经尝试过 plughw 了

$ aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono


$ aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono


$ aplay -D plughw:1,8 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono


$ aplay -D plughw:1,9 /usr/share/sounds/alsa/Front_Right.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

我还是困惑。也许我的看法是错误的,如果有人有任何想法,我洗耳恭听。

答案1

启动“设置”>“声音”,然后检查选择了哪些输出设备。我并不是想侮辱你的智商;我之所以把它扔在那里,是因为每次我在 Raspberry Pi 4 上全新安装 22.04 桌面时,输出设备默认都是耳机。我将其更改为内置数字立体声设备,但每次重启时它都会默认为耳机,即使我没有耳机。我唯一的输出路径是 HDMI > TV > HDMI-ARC > 5.1 音频。这是我在 22.04 中发现的几个烦恼之一。

相关内容