没有声音:main.c: pa_pid_file_create() 失败

没有声音:main.c: pa_pid_file_create() 失败

我无法使用,pulseaudio所以在 Ubuntu 19.04 中根本没有声音,我的笔记本电脑是 Lambda Tensorbook。有人能帮我解决这个“头痛”吗?提前谢谢。

x@x:~$ pulseaudio -vvv
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 12.0-378-g02fc89
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS:  -g -O0 -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 -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019
D: [pulseaudio] main.c: Found 12 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: yes
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Running from build tree: no
D: [pulseaudio] main.c: Optimized build: no
D: [pulseaudio] main.c: All asserts enabled.
I: [pulseaudio] main.c: Machine ID is a780a212b2e84b5f8f2f3abe253cfbbb.
I: [pulseaudio] main.c: Session ID is 2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/x/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/local/lib/pulse-12.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

x@x:~$ ps -ef | grep pulse
x         2089  1604  0 6月30 ?       00:00:00 /usr/bin/pulseaudio --daemonize=no
x         2318  2089  0 6月30 ?       00:00:00 /usr/lib/x86_64-linux-gnu/pulse/gsettings-helper
x        31671 31664  0 09:11 pts/2    00:00:00 grep --color=auto pulse

x@x:~$ snap list
Name  Version    Rev   Tracking  Publisher   Notes
core  16-2.39.2  7169  stable    canonical✓  core
vlc   3.0.7      1049  stable    videolan✓   -

答案1

如果您最近更新了 pulseaudio 或恢复了旧的主目录或配置文件,您可以尝试:

rm  ~/.config/pulse/*

这应该会删除当前显然不起作用的 pulseaudio 默认设置。

此后,请重新启动系统以构建新的 pulseaudio 配置文件。

答案2

我:[pulseaudio] main.c:使用模块目录 /usr/local/lib/pulse-12.0/modules。

看来您自己编译了一些与 pulseaudio 相关的内容。在/etc/ld.so.conf.d/指向的条目下的文件中添加注释/usr/local/lib/。使用sudo ldconfig -v更新/创建链接和缓存来获取新的库。

相关内容