我是一名普通的 pulseaudio 用户。无需特殊设置。
多年来我一直在这台笔记本电脑上使用 kubuntu 18.04,音质很好。
一两个月前,内核更新破坏了我的音频,所以我恢复到了以前的内核,直到下一个内核发布后才可以再次使用。
我刚刚在系统上安装了一些常规更新,音频不再起作用。
我不会经常重启 - 除非更新需要重启,所以我不确定是否有东西坏了,但直到我必须为新内核重启时才显现出来。
我怎样才能解决这个问题?
我刚刚重启,我的音频就消失了。设备消失了。(kubuntu 18.04 Intel 64 位)
昨天早些时候它运行良好。
我尝试返回到之前的内核。
我尝试了几个先前版本的 Linux 固件。
dmesg 显示此信息
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0: CX20756:
BIOS auto-probing.
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0:
autoconfig for CX20756: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speak$
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0:
speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0:
hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0: mono:
mono_out=0x0
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0: inputs:
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0:
Internal Mic=0x1a
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0: Mic=0x19
[Tue Jul 14 11:40:17 2020] snd_hda_codec_conexant hdaudioC1D0: Enable
sync_write for stable communication
[Tue Jul 14 11:40:17 2020] input: HDA Intel PCH Mic as
/devices/pci0000:00/0000:00:1b.0/sound/card1/input15
[Tue Jul 14 11:40:17 2020] input: HDA Intel PCH Headphone as
/devices/pci0000:00/0000:00:1b.0/sound/card1/input16
[Tue Jul 14 11:40:17 2020] input: HDA Intel HDMI HDMI/DP,pcm=3 as
/devices/pci0000:00/0000:00:03.0/sound/card0/input17
[Tue Jul 14 11:40:17 2020] input: HDA Intel HDMI HDMI/DP,pcm=7 as
/devices/pci0000:00/0000:00:03.0/sound/card0/input18
[Tue Jul 14 11:40:17 2020] input: HDA Intel HDMI HDMI/DP,pcm=8 as
/devices/pci0000:00/0000:00:03.0/sound/card0/input19
[Tue Jul 14 11:40:17 2020] input: HDA Intel HDMI HDMI/DP,pcm=9 as
/devices/pci0000:00/0000:00:03.0/sound/card0/input20
[Tue Jul 14 11:40:17 2020] input: HDA Intel HDMI HDMI/DP,pcm=10 as
/devices/pci0000:00/0000:00:03.0/sound/card0/input21
那是一大堆零,但我不知道它工作时是什么样子。
我尝试播放 mp3 但 Amarok 说没有设备 - 恢复为默认设置。
系统设置只显示默认设置。通常有一个模拟设备和一个数字(HDMI)设备。
我查看了我的包裹历史记录,没有发现其他问题。
bigbird@sananda:~/sandbox$ pulseaudio --check
bigbird@sananda:~/sandbox$ echo $?
1
bigbird@sananda:~/sandbox$ pulseaudio --start
E: [pulseaudio] main.c: Daemon startup failed.
不,它没有运行,而且它也不想运行。
bigbird@sananda:~/sandbox$ export PULSE_LOG=99
bigbird@sananda:~/sandbox$ pulseaudio --start
D: [pulseaudio] caps.c: Cleaning up privileges.
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/daemon.conf'
D: [pulseaudio] conf-parser.c: /etc/pulse/daemon.conf.d does not exist, ignoring.
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/client.conf'
D: [pulseaudio] conf-parser.c: /etc/pulse/client.conf.d does not exist, ignoring.
E: [pulseaudio] main.c: Daemon startup failed.
bigbird@sananda:/etc/pulse$ ls
client.conf daemon.conf default.pa default.pa.dpkg-old system.pa
所以,我有.conf 文件,但没有 conf.d 文件。
bigbird@sananda:/etc/pulse$ pulseaudio -vvvvv
D: [pulseaudio] caps.c: Cleaning up privileges.
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/daemon.conf'
D: [pulseaudio] conf-parser.c: /etc/pulse/daemon.conf.d does not exist, ignoring.
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 11.1
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/pulseaudio-3lFkjS/pulseaudio-11.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 02069b02445e453a99fc7b9858bb4a27.
I: [pulseaudio] main.c: Session ID is 3.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/bigbird/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-11.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.
W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.
E: [pulseaudio] module-equalizer-sink.c: Master sink not found
E: [pulseaudio] module.c: Failed to load module "module-equalizer-sink" (argument: ""): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.
I: [pulseaudio] main.c: Daemon terminated.
bigbird@sananda:/etc/pulse$ aplay -l
**** List of PLAYBACK Hardware Devices ****
Parsing configuration file '/etc/pulse/client.conf'
/etc/pulse/client.conf.d does not exist, ignoring.
Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
Trying to connect to /run/user/1000/pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
Trying to autospawn...
D: [pulseaudio] caps.c: Cleaning up privileges.
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/daemon.conf'
D: [pulseaudio] conf-parser.c: /etc/pulse/daemon.conf.d does not exist, ignoring.
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CX20756 Analog [CX20756 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
bigbird@sananda:/etc/pulse$ cd
bigbird@sananda:~$ ls .pulse
ls: cannot access '.pulse': No such file or directory
bigbird@sananda:~$ ls .config/pulse
02069b02445e453a99fc7b9858bb4a27-card-database.tdb 0be654d3d90b45c69c8747978a3a29fc-device-volumes.tdb
02069b02445e453a99fc7b9858bb4a27-default-sink 0be654d3d90b45c69c8747978a3a29fc-runtime
02069b02445e453a99fc7b9858bb4a27-default-source 0be654d3d90b45c69c8747978a3a29fc-stream-volumes.tdb
02069b02445e453a99fc7b9858bb4a27-device-manager.tdb cookie
02069b02445e453a99fc7b9858bb4a27-device-volumes.tdb default.pa
02069b02445e453a99fc7b9858bb4a27-runtime equalizer-presets.tdb
02069b02445e453a99fc7b9858bb4a27-stream-volumes.tdb equalizer-state.tdb
0be654d3d90b45c69c8747978a3a29fc-card-database.tdb equalizerrc
0be654d3d90b45c69c8747978a3a29fc-default-sink equalizerrc.availablepresets
0be654d3d90b45c69c8747978a3a29fc-default-source presets
0be654d3d90b45c69c8747978a3a29fc-device-manager.tdb
bigbird@sananda:~$
答案1
- 似乎 HDMI 音频是默认设备(通常不好):
安装 pavucontrol(Pulseaudio 音量控制),
在 配置选项卡,检查“配置文件”是否设置为 HDMI,而不是模拟。
此外,在输出设备选项卡,点击“内部音频”旁边的绿色按钮将其设为默认。
下一步是使用 alsamixer 检查 Alsa 级别的静音推子:(F6 选择声音设备)。
查看这里更多细节。 - 编辑 pulseaudio 错误:尝试此命令
mv ~/.config/pulse ~/.config/pulseold
然后重新启动 - 如果不行,尝试这个命令看看是否有进程锁定了音频设备:
sudo fuser -v /dev/snd/*