列表里面没有设备,只有dummy output,有时候重启又有设备可以播放声音,平时都没有
如果偶尔会有设备的话可能是驱动问题,操作系统内核日志看一下有没有报错
另外就是用户作业阶段的 PulseAudio/Pipewire 服务日志
journalctl
命令跟它的 --dmesg
、 -u
、 --user
命令选项看一下怎么用
journalctl --dmesg | grep snd
这个命令的输出也可以看一下
journalctl --dmesg | grep snd
Apr 04 21:08:34 ubuntu kernel: snd_rn_pci_acp3x 0000:03:00.5: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.1: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.1: Handle vga_switcheroo audio client
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.6: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: ALC236: picked fixup for PCI SSID 103c:0000
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC236: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: inputs:
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: Mic=0x19
Apr 04 21:08:38 ubuntu kernel: snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
這些訊息看起來都跟問題沒有直接關聯,請在能夠重現問題時立刻開一個終端機執行下列命令蒐集相關的運行紀錄:
journalctl --boot | grep -E '(snd|pulse|pipewire)'
journalctl --boot | grep -E '(snd|pulse|pipewire)'
Apr 04 21:08:34 ubuntu kernel: snd_rn_pci_acp3x 0000:03:00.5: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.1: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.1: Handle vga_switcheroo audio client
Apr 04 21:08:35 ubuntu kernel: snd_hda_intel 0000:03:00.6: enabling device (0000 -> 0002)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: ALC236: picked fixup for PCI SSID 103c:0000
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC236: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: inputs:
Apr 04 21:08:35 ubuntu kernel: snd_hda_codec_realtek hdaudioC1D0: Mic=0x19
Apr 04 21:08:38 ubuntu kernel: snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
Apr 04 21:08:40 ubuntu systemd[1703]: Listening on pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 21:08:40 ubuntu systemd[1703]: Listening on pipewire.socket - PipeWire Multimedia System Sockets.
Apr 04 21:08:40 ubuntu systemd[1703]: Started pipewire.service - PipeWire Multimedia Service.
Apr 04 21:08:40 ubuntu systemd[1703]: Started pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 21:08:40 ubuntu dbus-daemon[1137]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.30' (uid=119 pid=1726 comm="/usr/bin/pipewire-pulse" label="unconfined")
Apr 04 21:09:05 ubuntu systemd[2404]: Listening on pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 21:09:05 ubuntu systemd[2404]: Listening on pipewire.socket - PipeWire Multimedia System Sockets.
Apr 04 21:09:05 ubuntu systemd[2404]: Started pipewire.service - PipeWire Multimedia Service.
Apr 04 21:09:05 ubuntu systemd[2404]: Started pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 21:09:17 ubuntu systemd[1703]: Stopping pipewire-pulse.service - PipeWire PulseAudio...
Apr 04 21:09:17 ubuntu systemd[1703]: Stopped pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 21:09:17 ubuntu wireplumber[1725]: wireplumber: disconnected from pipewire
Apr 04 21:09:17 ubuntu systemd[1703]: Stopping pipewire.service - PipeWire Multimedia Service...
Apr 04 21:09:17 ubuntu systemd[1703]: Stopped pipewire.service - PipeWire Multimedia Service.
Apr 04 21:09:17 ubuntu systemd[1703]: Closed pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 21:09:17 ubuntu systemd[1703]: Closed pipewire.socket - PipeWire Multimedia System Sockets.
Apr 04 21:09:19 ubuntu boltd[3794]: watchdog: enabled [pulse: 90s]
這些看起來都跟問題沒有關係
現在音訊裝置清單是處於 dummy output 的狀態嗎?
再追加這個命令:
journalctl --boot --dmesg | grep sof
journalctl --boot --dmesg | grep sof
Apr 04 22:17:22 ubuntu kernel: software IO TLB: area num 16.
Apr 04 22:17:22 ubuntu kernel: PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
Apr 04 22:17:22 ubuntu kernel: software IO TLB: mapped [mem 0x00000000af170000-0x00000000b3170000] (64MB)
Apr 04 22:17:22 ubuntu kernel: integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
Apr 04 22:17:22 ubuntu kernel: integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
journalctl --boot | grep -E '(snd|pulse|pipewire)'
Apr 04 22:17:22 ubuntu kernel: snd_rn_pci_acp3x 0000:03:00.5: enabling device (0000 -> 0002)
Apr 04 22:17:22 ubuntu kernel: snd_hda_intel 0000:03:00.1: enabling device (0000 -> 0002)
Apr 04 22:17:22 ubuntu kernel: snd_hda_intel 0000:03:00.1: Handle vga_switcheroo audio client
Apr 04 22:17:22 ubuntu kernel: snd_hda_intel 0000:03:00.6: enabling device (0000 -> 0002)
Apr 04 22:17:23 ubuntu kernel: snd_hda_intel 0000:03:00.6: azx_get_response timeout, switching to polling mode: last cmd=0x800f0005
Apr 04 22:17:24 ubuntu kernel: snd_hda_intel 0000:03:00.6: No response from codec, disabling MSI: last cmd=0x800f0005
Apr 04 22:17:26 ubuntu kernel: snd_hda_intel 0000:03:00.6: azx_get_response timeout, switching to single_cmd mode: last cmd=0x800f0005
Apr 04 22:17:26 ubuntu kernel: snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
Apr 04 22:17:27 ubuntu systemd[1697]: Listening on pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 22:17:27 ubuntu systemd[1697]: Listening on pipewire.socket - PipeWire Multimedia System Sockets.
Apr 04 22:17:27 ubuntu systemd[1697]: Started pipewire.service - PipeWire Multimedia Service.
Apr 04 22:17:27 ubuntu systemd[1697]: Started pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 22:17:27 ubuntu dbus-daemon[1116]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.30' (uid=119 pid=1715 comm="/usr/bin/pipewire -c filter-chain.conf" label="unconfined")
Apr 04 22:17:29 ubuntu kernel: snd_hda_intel 0000:03:00.6: no codecs initialized
Apr 04 22:18:23 ubuntu systemd[2408]: Listening on pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 22:18:23 ubuntu systemd[2408]: Listening on pipewire.socket - PipeWire Multimedia System Sockets.
Apr 04 22:18:23 ubuntu systemd[2408]: Started pipewire.service - PipeWire Multimedia Service.
Apr 04 22:18:23 ubuntu systemd[2408]: Started pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 22:18:36 ubuntu systemd[1697]: Stopping pipewire-pulse.service - PipeWire PulseAudio...
Apr 04 22:18:36 ubuntu systemd[1697]: Stopped pipewire-pulse.service - PipeWire PulseAudio.
Apr 04 22:18:36 ubuntu wireplumber[1719]: wireplumber: disconnected from pipewire
Apr 04 22:18:36 ubuntu systemd[1697]: Stopping pipewire.service - PipeWire Multimedia Service...
Apr 04 22:18:36 ubuntu systemd[1697]: Stopped pipewire.service - PipeWire Multimedia Service.
Apr 04 22:18:36 ubuntu systemd[1697]: Closed pipewire-pulse.socket - PipeWire PulseAudio.
Apr 04 22:18:36 ubuntu systemd[1697]: Closed pipewire.socket - PipeWire Multimedia System Sockets.
看起來是音訊編碼/解碼晶片初始化失敗了,怎麼解決/規避問題需要再研究