我刚刚安装了 Xubuntu 16.04,一切都运行良好,直到有一天我意识到键盘上的声音控制不起作用。此外,我无法使用任务栏中的声音指示器控制音频。我可以看到一个空白图标。当我单击它时,我得到了声音菜单,但单击“声音设置...”会弹出一个窗口,上面写着:
Connection to Pulse Audio failed. Automatic retry in 5s In this case
this is likely because PULSE_SERVER in the Environment/X11 Root Window
Properties or default-server in client.conf is misconfigured This
situation can also arise when PulseAudio crashed and left stale
details in the X11 Root Window If this is the case, then PulseAudio
should autospawn again, or if this is not configured you should run
start-pulseaudio-x11 manually
这是我所看到的进程是否正在运行
[4][21:59][~]: ps aux | grep pulse
lightdm 1207 0.1 0.0 335808 9396 ? S<l 21:50 0:00 /usr/bin/pulseaudio --start --log-target=syslog
tfernan+ 3356 0.0 0.0 158236 3548 ? S 21:59 0:00 /usr/bin/pulseaudio --start --log-target=syslog
tfernan+ 3361 0.0 0.0 158236 656 ? Ss 21:59 0:00 /usr/bin/pulseaudio --start --log-target=syslog
tfernan+ 3362 0.0 0.0 313116 8852 ? D< 21:59 0:00 /usr/bin/pulseaudio --start --log-target=syslog
tfernan+ 3364 0.0 0.0 14224 988 pts/3 S+ 21:59 0:00 grep --color=auto pulse
我运行了以下命令:
sudo killall -9 pulseaudio
pulseaudio——kill
rm ~/.pulse-cookie
sudo apt--purge--reinstall 安装 pulseaudio
我尝试重新创建我的/etc/pulse/默认.pa文件为默认值,以防 apt 尚未执行此操作。
我尝试重新运行 pulseaudio:
[21][22:07][~]: pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
[22][22:07][~]: pulseaudio -D
E: [pulseaudio] main.c: Daemon startup failed.
我似乎守护进程已在运行。
我在运行时确实得到了一些有趣的输出脉冲音频-vv
以下是我觉得有趣的一句话:
E: [pulseaudio] module-udev-detect.c: You apparently ran out of inotify watches, probably because Tracker/Beagle took them all away. I wished people would do their homework first and fix inotify before using it for watching whole directory trees which is something the current inotify is certainly not useful for. Please make sure to drop the Tracker/Beagle guys a line complaining about their broken use of inotify.
答案1
所以我找到的问题的答案是这样的:
我安装了 Ulauncher,它很可能误用了 inotify,正如我的问题中的命令所指示的错误脉冲音频-vv。
我跑了killall -9 ulauncher我的 pavucontrol 窗口几乎立即就可以打开。
从那时起,我已经从系统中删除了 ulauncher,并且没有遇到任何问题。