在 Xubuntu 22.04 上,我使用 Discord snap。它的小图标有时会从我的面板中消失,有时又不会消失。我不确定它应该位于指示器插件中还是状态托盘图标中;这些的设置菜单似乎从未显示它。重新启动面板似乎永远无法解决图标不显示在面板上的问题。似乎只有通过重新启动才能解决这个问题。
以下是一些相关的终端输出。以下是图标无法显示的示例。
~$ PANEL_DEBUG=1 xfce4-panel
xfce4-panel(main): version 4.16.3 on gtk+ 3.24.33 (3.24.29), glib 2.72.4 (2.68.3)
xfce4-panel(module-factory): reading /usr/share/xfce4/panel/plugins
xfce4-panel(application): found window manager after 1 tries
xfce4-panel(base-window): 0x564b8f52ff30: rgba visual=0x564b8f4fad90, compositing=true
xfce4-panel(base-window): 0x564b8f52ff30: rgba visual=0x564b8f4fad90, compositing=true
xfce4-panel(display-layout): 0x564b8f52ff30: display=:0.0{comp=true}, screen-0[0x564b8f4ee020]=[3520,1080] (eDP1=[0,180;1600,900], HDMI2=[1600,0;1920,1080])
xfce4-panel(positioning): 0x564b8f52ff30: screen=0x564b8f4ee020, monitors=2, output-name=(null), span-monitors=false, base=720,11
xfce4-panel(positioning): 0x564b8f52ff30: working-area: screen=0x564b8f4ee020, x=0, y=180, w=1600, h=900
xfce4-panel(struts): 0x564b8f52ff30: top=201, start_x=0, end_x=1599
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/1
xfce4-panel(module): new item (type=external-wrapper, name=whiskermenu, id=1)
xfce4-panel(external): whiskermenu-1: child spawned; pid=8657, argc=7
xfce4-panel(module): new item (type=object-type, name=launcher, id=13)
xfce4-panel(module): new item (type=object-type, name=launcher, id=15)
xfce4-panel(module): new item (type=object-type, name=launcher, id=14)
xfce4-panel(module): new item (type=object-type, name=directorymenu, id=18)
xfce4-panel(module): new item (type=object-type, name=tasklist, id=3)
xfce4-panel(module): new item (type=object-type, name=separator, id=4)
xfce4-panel(module): new item (type=object-type, name=clock, id=12)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/6
xfce4-panel(module): new item (type=external-wrapper, name=notification-plugin, id=6)
xfce4-panel(external): notification-plugin-6: child spawned; pid=8658, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/17
xfce4-panel(module): new item (type=external-wrapper, name=systray, id=17)
xfce4-panel(external): systray-17: child spawned; pid=8659, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/2
xfce4-panel(module): new item (type=external-wrapper, name=indicator, id=2)
xfce4-panel(external): indicator-2: child spawned; pid=8660, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/9
xfce4-panel(module): new item (type=external-wrapper, name=power-manager-plugin, id=9)
xfce4-panel(external): power-manager-plugin-9: child spawned; pid=8661, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/10
xfce4-panel(module): new item (type=external-wrapper, name=pulseaudio, id=10)
xfce4-panel(external): pulseaudio-10: child spawned; pid=8662, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/16
xfce4-panel(module): new item (type=external-wrapper, name=xfce4-clipman-plugin, id=16)
xfce4-panel(external): xfce4-clipman-plugin-16: child spawned; pid=8665, argc=7
xfce4-panel(external): systray-17: child is embedded; 7 properties in queue
xfce4-panel(systray): rgba visual is 0x560cb9491590
xfce4-panel(systray): registered manager on screen 0
xfce4-panel(external): whiskermenu-1: child is embedded; 7 properties in queue
xfce4-panel(external): pulseaudio-10: child is embedded; 7 properties in queue
xfce4-panel(external): power-manager-plugin-9: child is embedded; 7 properties in queue
xfce4-panel(external): indicator-2: child is embedded; 7 properties in queue
xfce4-panel(external): xfce4-clipman-plugin-16: child is embedded; 7 properties in queue
xfce4-panel(external): notification-plugin-6: child is embedded; 7 properties in queue
(wrapper-2.0:8658): Gtk-WARNING **: 09:00:12.357: Attempting to add a widget with type GtkToggleButton to a container of type XfcePanelPlugin, but the widget is already inside a container of type XfcePanelPlugin, please remove the widget from its existing container first.
(wrapper-2.0:8660): Gtk-WARNING **: 09:00:12.430: Theme parsing error: <data>:1:46: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
(wrapper-2.0:8660): Gtk-WARNING **: 09:00:12.430: Theme parsing error: <data>:1:78: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version
(wrapper-2.0:8660): Gtk-WARNING **: 09:00:12.430: Theme parsing error: <data>:1:108: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(wrapper-2.0:8660): Gtk-WARNING **: 09:00:12.430: Theme parsing error: <data>:1:136: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(wrapper-2.0:8662): Gtk-WARNING **: 09:00:12.431: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
(wrapper-2.0:8657): Gtk-WARNING **: 09:00:12.464: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:8658): Gtk-WARNING **: 09:00:12.467: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:8665): Gtk-WARNING **: 09:00:12.485: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:8661): Gtk-WARNING **: 09:00:12.532: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
从 Whisker 菜单打开 Discord 后,上述输出将显示在同一命令中
Discord 0.0.26
[8716:0418/090018.625660:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 8837: Permission denied (13)
libGL error: MESA-LOADER: failed to open i965: /snap/discord/151/gnome-platform/usr/lib/x86_64-linux-gnu/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /snap/discord/151/gnome-platform/usr/lib/x86_64-linux-gnu/dri, suffix _dri)
libGL error: failed to load driver: i965
Starting app.
Starting updater.
2023-04-18T08:00:18.641Z [Modules] Modules initializing
2023-04-18T08:00:18.641Z [Modules] Distribution: remote
2023-04-18T08:00:18.641Z [Modules] Host updates: disabled
2023-04-18T08:00:18.641Z [Modules] Module updates: enabled
2023-04-18T08:00:18.641Z [Modules] Module install path: /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules
2023-04-18T08:00:18.641Z [Modules] Module installed file path: /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/installed.json
2023-04-18T08:00:18.642Z [Modules] Module download path: /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/pending
[8837:0418/090018.704384:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[8716:0418/090018.713061:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 8874: Permission denied (13)
[8874:0418/090018.738772:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
[8846:0418/090018.811681:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
2023-04-18T08:00:18.852Z [Modules] No updates to install
2023-04-18T08:00:18.859Z [Modules] Host is up to date.
2023-04-18T08:00:18.866Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2023-04-18T08:00:19.055Z [Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[8716:0418/090019.221117:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.login1.Manager.Inhibit: object_path= /org/freedesktop/login1: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.147" (uid=1000 pid=8716 comm="/snap/discord/151/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.freedesktop.login1.Manager" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1014 comm="/lib/systemd/systemd-logind " label="unconfined")
WEIGHT /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/discord_krisp/NC_small_8k.thw
WEIGHT /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/discord_krisp/NC_small_16k.thw
WEIGHT /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/discord_krisp/c6.f.s.ced125.thw
WEIGHT /home/[my-user-name]/snap/discord/151/.config/discord/0.0.26/modules/discord_krisp/VAD_weight.thw
2023-04-18T08:00:21.698Z [Modules] Host is up to date.
2023-04-18T08:00:21.698Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2023-04-18T08:00:21.701Z [Modules] No module updates available.
我该如何开始调试这个问题?
答案1
你可能遇到过 [Bug] 图标无法可靠地显示在系统托盘中。
结论是,这与 ayatana-indicator-application 相冲突。
其中还包含一个用于重新启动 xfce4-panel 的脚本,对于某些人来说,该脚本可以解决以下问题:
#!/bin/bash
#Optionally sleep before restarting panel
sleep ${1:-0}
xfce4-panel -q
xfce4-panel &