我在循环中使用pulseaudio记录错误消息时遇到问题,想知道如何修复它们:
Aug 7 20:22:17 s pulseaudio[25638]: lock-autospawn.c: Cannot access autospawn lock.
Aug 7 20:22:17 s pulseaudio[25638]: main.c: Failed to acquire autospawn lock /tmp/.esd/sock
Aug 7 20:22:18 s pulseaudio[25644]: module-protocol-stub.c: Failed to create socket directory '/tmp/.esd/socket': Permission denied
删除 /tmp/.esd 后出现以下错误:
Aug 7 20:22:32 s pulseaudio[25690]: lock-autospawn.c: Cannot access autospawn lock.
Aug 7 20:22:32 s pulseaudio[25690]: main.c: Failed to acquire autospawn lock
Aug 7 20:22:37 s pulseaudio[25694]: core-util.c: Home directory /var/lib/gdm not ours.
答案1
尝试将其添加到您的 /etc/security/limits.conf :
@audio - rtprio 65
@audio - nice -10
@audio - memlock 40000
@pulse-rt hard nice -20
@pulse-rt soft nice -20
此外,您还必须将您的用户添加到pulse-rt 组。
答案2
/var/log/syslog
我在Ubuntu 14.04 上遇到了以下问题。
Mar 24 09:41:19 ripple pulseaudio[4838]: [autospawn] core-util.c: Failed to create secure directory (/run/user/112/pulse): No such file or directory
Mar 24 09:41:19 ripple pulseaudio[4838]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Mar 24 09:41:19 ripple pulseaudio[4838]: [pulseaudio] main.c: Failed to acquire autospawn lock
Mar 24 09:41:21 ripple pulseaudio[4840]: [autospawn] core-util.c: Failed to create secure directory (/run/user/112/pulse): No such file or directory
Mar 24 09:41:21 ripple pulseaudio[4840]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Mar 24 09:41:21 ripple pulseaudio[4840]: [pulseaudio] main.c: Failed to acquire autospawn lock
Mar 24 09:41:23 ripple pulseaudio[4844]: [autospawn] core-util.c: Failed to create secure directory (/run/user/112/pulse): No such file or directory
Mar 24 09:41:23 ripple pulseaudio[4844]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Mar 24 09:41:23 ripple pulseaudio[4844]: [pulseaudio] main.c: Failed to acquire autospawn lock
在我的系统上,查询文件/etc/passwd
显示用户112
是lightdm
,它是显示(登录)管理员。我不使用lightdm
。lightdm
每次重新启动后我都会手动停止。然而,有些lightdm
进程仍然存在。从htop
:
PID PPID USER START TIME+ PRI NI VIRT RES DATA SHR S CPU% MEM% Command
8273 2124 lightdm Mar20 6:42.31 20 0 404M 5108 224M 3936 S 0.0 0.0 /usr/lib/x86_64-linux-gnu/indicator-sou
2124 1 lightdm Mar20 0:44.20 20 0 39800 2128 620 1572 S 0.0 0.0 init --user --startup-event indicator-s
8265 2124 lightdm Mar20 0:00.00 20 0 257M 3016 216M 2484 S 0.0 0.0 /usr/lib/x86_64-linux-gnu/indicator-blu
我做了一个sudo kill 2124
.所有三个进程都消失了,日志消息也停止了。
在@grm 的例子中,@grm 似乎正在使用gdm
显示管理器,但原理可能是相同的。可能的解决方案是:
1) 确保没有与 关联的进程gdm
正在运行,或者...
2) 重新创建/tmp/.esd
并确保与 关联的进程gdm
具有对 的写访问权限/tmp/.esd
。
祝你好运!