Linux
音頻無法正常工作
我正在執行 Debian 11。我無法同時使用耳機麥克風和音頻。我在執行命令時發現了一些錯誤
initframs
(不是這個問題),我發現我缺少一些 Realtek 韌體(那是我的板載主機板音效卡)。因此,然後我使用安裝了 realtek 韌體sudo apt-get install firmware-realtek
,重新啟動後我可以看到另外兩個選項。我使用Stereo Duplex
它並且它一直有效,直到我重新啟動我的電腦,現在我回到了初始部分。我沒有這些選項和包已安裝。我該怎麼辦?編輯:
這是輸出:
sudo dmesg -H |grep snd_
[ +0.000007] snd_hda_intel 0000:26:00.1: Handle vga_switcheroo audio client [ +0.000078] snd_hda_intel 0000:28:00.4: enabling device (0000 -> 0002) [ +0.003414] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC892: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line [ +0.000002] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0) [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0 [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: inputs: [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19 [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18 [ +0.000001] snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
我也通過執行得到相同的輸出:
journalctl -xb |grep snd
我也 grep-ed 這個以防萬一
journalctl -xb |grep Audio
Mar 03 11:26:26 Deb-PC kernel: ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio) Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Front Mic as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input30 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Rear Mic as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input31 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Line as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input32 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Line Out Front as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input33 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Line Out Surround as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input34 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Line Out CLFE as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input35 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Line Out Side as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input36 Mar 03 11:26:26 Deb-PC kernel: input: HD-Audio Generic Front Headphone as /devices/pci0000:00/0000:00:08.1/0000:28:00.4/sound/card1/input37 Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Front Mic (/dev/input/event19) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Rear Mic (/dev/input/event20) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Line (/dev/input/event21) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Line Out Front (/dev/input/event22) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Line Out Surround (/dev/input/event23) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Line Out CLFE (/dev/input/event24) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Line Out Side (/dev/input/event25) Mar 03 11:26:28 Deb-PC /usr/libexec/gdm-x-session[909]: (II) config/udev: Adding input device HD-Audio Generic Front Headphone (/dev/input/event26) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Front Mic (/dev/input/event19) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Rear Mic (/dev/input/event20) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Line (/dev/input/event21) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Line Out Front (/dev/input/event22) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Line Out Surround (/dev/input/event23) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Line Out CLFE (/dev/input/event24) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Line Out Side (/dev/input/event25) Mar 03 11:26:39 Deb-PC /usr/libexec/gdm-x-session[1425]: (II) config/udev: Adding input device HD-Audio Generic Front Headphone (/dev/input/event26)
.
我終於得到了這個“修復”。正如電信公司建議的那樣,這可能是 PulseAudio 問題(可能是設備尚未初始化)。所以,關於修復它的部分很簡單。我已經註意到
systemctl --user restart pulseaudio.service
或者pulseaudio -k
正在臨時解決我的問題,所以我只是添加pulseaudio -k
了~/.profile
. 也systemctl --user restart pulseaudio.service
應該工作(未經測試)。注意:添加
crontab
(甚至是特定於使用者的)將不起作用。它應該~/.profile
在使用者登錄後立即執行,否則登錄後音頻設備將再次損壞。如果有人遇到這個問題,希望這會有所幫助!