大约一周以来,我在调整音量或插入耳机时会错过通知气泡。我正在使用纯 xfce4-session 运行 ubuntu bionic,这意味着元包 xubuntu-desktop 不在我的系统上。
dbus-monitor --session interface='org.freedesktop.Notifications'
signal time=1565429537.386265 sender=org.freedesktop.DBus -> destination=:1.73 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.73"
signal time=1565429537.386395 sender=org.freedesktop.DBus -> destination=:1.73 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.73"
插入耳机或输入命令后没有列出任何内容
pactl set-sink-volume 0 100%
发送后 notify-send test
method call time=1565430913.692873 sender=:1.74 -> destination=:1.27 serial=6 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=GetServerInformation
method call time=1565430913.693595 sender=:1.74 -> destination=:1.27 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "notify-send"
uint32 0
string ""
string "test"
string ""
array [
]
array [
dict entry(
string "urgency"
variant byte 1
)
]
int32 -1
signal time=1565430923.336805 sender=:1.27 -> destination=(null destination) serial=23 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
uint32 4
uint32 1
在日记中搜索
journalctl -b --user -u
dbus.service | grep notifyd
Aug 10 10:49:56 beelzemon dbus-daemon[1916]: [session uid=1000 pid=1916] Activating via systemd: service name='org.freedesktop.Notifications' unit='xfce4-notifyd.service' requested by ':1.17' (uid=1000 pid=2062 comm="xfce4-power-manager " label="unconfined")
和
journalctl -b --user -u xfce4-notifyd
-- Logs begin at Sat 2019-07-27 22:58:00 CEST, end at Sat 2019-08-10 11:32:17 CEST. --
Aug 10 10:49:57 beelzemon systemd[1863]: Starting XFCE notifications service...
Aug 10 10:49:58 beelzemon systemd[1863]: Started XFCE notifications service.
和
systemctl --user list-dependencies default.target
default.target
● └─basic.target
● ├─paths.target
● ├─sockets.target
● │ ├─dbus.socket
● │ ├─dirmngr.socket
● │ ├─gpg-agent-browser.socket
● │ ├─gpg-agent-extra.socket
● │ ├─gpg-agent-ssh.socket
● │ └─gpg-agent.socket
● └─timers.target
服务状态
systemctl --user status xfce4-notifyd.service
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
Active: active (running) since Sat 2019-08-10 10:49:58 CEST; 1h 14min ago
Main PID: 2145 (xfce4-notifyd)
CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
└─2145 /usr/lib/i386-linux-gnu/xfce4/notifyd/xfce4-notifyd
Aug 10 10:49:57 beelzemon systemd[1863]: Starting XFCE notifications service...
Aug 10 10:49:58 beelzemon systemd[1863]: Started XFCE notifications service.
我看不到任何错误。
注意声音效果很好,其他通知(如 guake)也正常工作。
抱歉,文字太多了。
编辑,pulseaudio-plugin 已配置,如果音量改变则发送通知。
我的系统上没有软件包 xfce4-volumed。
apt list --installed | egrep 'volumed|pulseaudio|pavucontrol'
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gstreamer1.0-pulseaudio/bionic-updates,now 1.14.5-0ubuntu1~18.04.1 i386 [installed,automatic]
osspd-pulseaudio/bionic,now 1.3.2-9 i386 [installed,automatic]
pavucontrol/bionic,now 3.0-4 i386 [installed,automatic]
pulseaudio/bionic-updates,now 1:11.1-1ubuntu7.2 i386 [installed]
pulseaudio-module-bluetooth/bionic-updates,now 1:11.1-1ubuntu7.2 i386 [installed]
pulseaudio-utils/bionic-updates,now 1:11.1-1ubuntu7.2 i386 [installed,automatic]
xfce4-pulseaudio-plugin/bionic,now 0.4.1-0ubuntu1 i386 [installed]
pulseaudio 是为用户会话配置的。
ps -ef | grep pulse
alex 7316 1 0 15:21 ? 00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
alex 7347 1991 0 15:22 ? 00:00:01 /usr/lib/i386-linux-gnu/xfce4/panel/wrapper-2.0 /usr/lib/i386-linux-gnu/xfce4/panel/plugins/libpulseaudio-plugin.so 22 10485802 pulseaudio PulseAudio-Modul Die Lautst??rke des PulseAudio-Klangsystems anpassen
alex 7414 3936 0 15:32 pts/4 00:00:00 grep --color=auto pulse
P:S 错误不在 /home 中。Testuser 和 guest-session 相同。
答案1
抱歉,我发现了。我正在使用 i3。元包将 dunst 带到我的系统上。清除该包并重新启动后,pulseaution 的通知已修复systemd[9580]: dunst.service: Two services allocated for the same bus name org.freedesktop.Notifications, refusing operation
。
我在日记里发现了这一点,这让我走上了正确的道路