「已解决」pulseaudio 报错
安装好 i3-wm 后,原装的配置文件
中有音量控制相关的快捷键设定:
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
但是实际使用时没有半点效果,尝试输入命令来控制,结果报错:
$ pactl set-sink-volume @DEFAULT_SINK@ +10% && killall -SIGUSR1 i3status
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
其实在论坛上找到了和我情况一样的用户,但是不是很看得懂,有没有朋友帮忙翻译一下?到底发生了什么?我该怎么做?
https://bbs.archlinux.org/viewtopic.php?id=276790
最近编辑记录 hellowliu (2023-06-11 19:29:38)
ls -l ~/.pulse/
ls: cannot access '~/.pulse': No such file or directory
ls /run/user/$UID/pulse
dbus-socket native pid
systemctl --user status pulseaudio
* pulseaudio.service - Sound Service
Lodaed: lodaed (/usr/lib/systemd/user/pulseaudio.service; disabled; preset: enabled)
Active: active (running) since Sun 2023-6-11 18:25:30 CST; 14min ago
TriggeredBy: * pulseaudio.socket
Main PID: 2753 (pulseaudio)
Tasks: 8 (limit: 9232)
Memory: 16.0M
CPU: 12.394s
Cgroup: /user.slice/user-1000.slice/[email protected]/session.slice/pulseaudio.service
2753 /usr/bin/pulseaudio --daemonize=no --log-target=journal
2762 /usr/lib/pulse/gsettings-helper
Jun 11 18:25:29 myarch systemd[776]: Starting Sound Service. . .
Jun 11 18:25:30 myarch pulseaudio[2753]: stat('/etc/pulse/default.pa.d'): No such file or directory
Jun 11 18:25:30 myarch systemd[776]: Starting Sound Service. . .
Jun 11 18:25:30 myarch pulseaudio[2753]: Could not find org.bluez.BatteryProviderManager1.RegisterBattery>
Jun 11 18:26:55 myarch pulseaudio[2753]: org.freedesktop.DBus.Properties.Get /org/bluez/hci0/dev_8C_8B_62>