blueman icon indicating copy to clipboard operation
blueman copied to clipboard

`blueman-tray` won't start on Wayland

Open alba4k opened this issue 1 year ago • 26 comments

blueman: 2.3.5 BlueZ: 5.72 Distribution: Arch Linux Desktop environment: Hyprland

blueman-applet 22.58.44 WARNING  PluginManager:94 load_plugin: Failed to start plugin GameControllerWakelock: Only X11 platform is supported
blueman-applet 22.58.44 WARNING  PluginManager:151 __load_plugin: Not loading DhcpClient because its conflict has higher priority
blueman-applet 22.58.44 WARNING  PluginManager:151 __load_plugin: Not loading PPPSupport because its conflict has higher priority

Edit: this issue is about the tray icon, not the applet

alba4k avatar Feb 28 '24 21:02 alba4k

You posted a non fatal warning. Post a proper blueman-applet debug log as described https://github.com/blueman-project/blueman/wiki/Troubleshooting#debugging-blueman

infirit avatar Feb 28 '24 23:02 infirit

Well idk what changed but it's starting now

Still no icon in the tray tho

blueman-tray --loglevel debug

blueman-tray 18.50.52 DEBUG    Tray:57 _on_name_vanished: Applet shutdown or not available at startup

alba4k avatar Mar 01 '24 17:03 alba4k

Sound a lot like you have a broken dbus environment. Make sure you run dbus-update-activation-environment in your session. Check the hyprland docs how and what arguments you need to pass to it.

infirit avatar Mar 01 '24 18:03 infirit

To be clear, blueman does work and display notifications

Also, running that did not help

The only problem is that the tray icon fails to display (at least, on hyprland)

alba4k avatar Mar 01 '24 20:03 alba4k

So the blueman-applet process is running and working but running blueman-tray gives Tray:57 _on_name_vanished: Applet shutdown or not available at startup and dies?

cschramm avatar Mar 01 '24 20:03 cschramm

If I try to run blueman-tray while blueman-applet --loglevel debug is running, the latter will print (blueman-tray:1543409): Gtk-CRITICAL **: 22:46:47.057: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed while the former outputs nothing and returns 0

alba4k avatar Mar 01 '24 21:03 alba4k

For some reason blueman-tray seems to be unable to find the applet on the D-Bus session bus. Do you see org.blueman.Applet e.g. in dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames?

cschramm avatar Mar 02 '24 06:03 cschramm

Yes, I see both org.blueman.Applet and org.blueman.Tray (after starting only blueman-applet, manually at least). I don't see any of those after killing that process

alba4k avatar Mar 02 '24 19:03 alba4k

To be sure, blueman-applet is the core of blueman and it's supposed to always be running. The applet is what (re)starts blueman-tray (the tray icon). If you are killing it all the time stop that.

infirit avatar Mar 02 '24 22:03 infirit

Installed hyprlan and waybar. Then setup some basic environment variables for QT, Gtk, XDG_* and a couple others. Added exec-once for waybar and below that exec-once blueman-applet. It worked flawlessly.

Sound to me like you either are completely missing a place for tray icons, what eg waybar provides or your setup is broken. It's not an issue in blueman.

infirit avatar Mar 02 '24 23:03 infirit

Yes, I see both org.blueman.Applet and org.blueman.Tray

blueman-tray is already running then.

cschramm avatar Mar 03 '24 06:03 cschramm

blueman-tray is already running then.

Only if I start the applet. nothing is shown if I dont

Yes I have a system tray set up. Yes it works for everything else. Yes I see the tray icon on polybar on i3

alba4k avatar Mar 03 '24 10:03 alba4k

I have a system tray set up

... which is ... waybar? Does it give any warnings or related debug output when you start blueman-applet and blueman-tray?

cschramm avatar Mar 03 '24 13:03 cschramm

Yes, it is waybar.

This is everything I get from `blueman-applet

output
blueman-applet 22.31.24 INFO     PluginManager:87 load_plugin: ['DiscvManager', 'Menu', 'NMDUNSupport', 'NMPANSupport', 'KillSwitch', 'RecentConns', 'Networking', 'DhcpClient', 'TransferService', 'StatusNotifierItem', 'NetUsage', 'ConnectionNotifier', 'ShowConnected', 'GameControllerWakelock', 'PowerManager', 'SerialManager', 'ExitItem', 'AuthAgent', 'AutoConnect', 'DisconnectItems', 'DBusService', 'StandardItems', 'PPPSupport', 'StatusIcon']
blueman-applet 22.31.24 WARNING  PluginManager:94 load_plugin: Failed to start plugin GameControllerWakelock: Only X11 platform is supported
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.Menu.Menu'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.DiscvManager.DiscvManager'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.StatusIcon.StatusIcon'>
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0 {'Address': '38:7A:0E:DB:63:BF', 'AddressType': 'public', 'Name': 'dell-xps', 'Alias': 'dell-xps', 'Class': 7078156, 'Powered': True, 'PowerState': 'on', 'Discoverable': True, 'DiscoverableTimeout': 0, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': False, 'UUIDs': ['0000110e-0000-1000-8000-00805f9b34fb', '0000184e-0000-1000-8000-00805f9b34fb', '00001845-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '00001844-0000-1000-8000-00805f9b34fb', '0000184d-0000-1000-8000-00805f9b34fb', '00001843-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '0000111f-0000-1000-8000-00805f9b34fb', '0000110a-0000-1000-8000-00805f9b34fb', '00001850-0000-1000-8000-00805f9b34fb', '0000184f-0000-1000-8000-00805f9b34fb', '0000111e-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0246d0548', 'Roles': ['central', 'peripheral', 'central-peripheral'], 'ExperimentalFeatures': ['671b10b5-42c0-4696-9227-eb28d1b049d6', '330859bc-7506-492d-9370-9a6f0614037f', '15c0a148-c273-11ea-b3de-0242ac130004', 'a6695ace-ee7f-4fb9-881a-5fac66c629af', '6fbaf188-05e0-496a-9885-d6ddfdb4e03e'], 'Manufacturer': 2, 'Version': 12}
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.DBusService.DBusService'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.NMDUNSupport.NMDUNSupport'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.NMPANSupport.NMPANSupport'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.PowerManager.PowerManager'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.KillSwitch.KillSwitch'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.RecentConns.RecentConns'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.Networking.Networking'>
blueman-applet 22.31.24 INFO     Networking:35 load_nap_settings: Loading NAP settings
blueman-applet 22.31.24 WARNING  PluginManager:151 __load_plugin: Not loading DhcpClient because its conflict has higher priority
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.TransferService.TransferService'>
blueman-applet 22.31.24 WARNING  PluginManager:151 __load_plugin: Not loading PPPSupport because its conflict has higher priority
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.ConnectionNotifier.ConnectionNotifier'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.ShowConnected.ShowConnected'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.SerialManager.SerialManager'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.ExitItem.ExitItem'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.AuthAgent.AuthAgent'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.AutoConnect.AutoConnect'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.DisconnectItems.DisconnectItems'>
blueman-applet 22.31.24 INFO     PluginManager:160 __load_plugin: loading <class 'blueman.plugins.applet.StandardItems.StandardItems'>
blueman-applet 22.31.24 INFO     KillSwitch:106 io_event  : killswitch registered 1
blueman-applet 22.31.24 INFO     KillSwitch:122 io_event  : State: True
blueman-applet 22.31.24 INFO     PowerManager:179 update_power_state: off False | foff False | on True | current state True | new state True
blueman-applet 22.31.24 INFO     KillSwitch:85 _on_connman_vanished: net.connman vanished
blueman-applet 22.31.24 INFO     TransferService:244 _on_dbus_name_vanished: org.bluez.obex not running or was stopped
blueman-applet 22.31.24 INFO     Applet:63 _on_dbus_name_appeared: org.bluez :1.12
blueman-applet 22.31.24 INFO     Functions:114 launch    : Gtk eventtime is 0, not using LaunchContext
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0/dev_C0_28_8D_4E_9E_53 {'Address': 'C0:28:8D:4E:9E:53', 'AddressType': 'public', 'Name': 'UE BOOM 2 Aaron', 'Alias': 'UE BOOM 2 Aaron', 'Class': 2360344, 'Icon': 'audio-headphones', 'Paired': True, 'Bonded': True, 'Trusted': True, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': ['00001101-0000-1000-8000-00805f9b34fb', '00001108-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110d-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000111e-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '000061fe-0000-1000-8000-00805f9b34fb'], 'Modalias': 'bluetooth:v000ApFFFFdFFFF', 'Adapter': '/org/bluez/hci0', 'ServicesResolved': False}
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0/dev_18_26_54_3C_0F_AD {'Address': '18:26:54:3C:0F:AD', 'AddressType': 'public', 'Name': 'S23 di Aaron', 'Alias': 'Galaxy S23', 'Class': 5898764, 'Icon': 'phone', 'Paired': True, 'Bonded': True, 'Trusted': True, 'Blocked': False, 'LegacyPairing': False, 'Connected': True, 'UUIDs': ['00001105-0000-1000-8000-00805f9b34fb', '0000110a-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110d-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001112-0000-1000-8000-00805f9b34fb', '00001115-0000-1000-8000-00805f9b34fb', '00001116-0000-1000-8000-00805f9b34fb', '0000111f-0000-1000-8000-00805f9b34fb', '0000112d-0000-1000-8000-00805f9b34fb', '0000112f-0000-1000-8000-00805f9b34fb', '00001132-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '00001849-0000-1000-8000-00805f9b34fb', '0000184c-0000-1000-8000-00805f9b34fb', '00001855-0000-1000-8000-00805f9b34fb', '0000fd7e-0000-1000-8000-00805f9b34fb', 'a23d00bc-217c-123b-9c00-fc44577136ee', 'a82efa21-ae5c-3dde-9bbc-f16da7b16c5a', 'cee50b63-5f79-4727-8b5d-504eb07e1e22', 'e9dc66d5-e94f-4ba5-809d-cc5595eefa71', 'fafbdd20-83f0-4389-addf-917ac9dae5b2'], 'Modalias': 'bluetooth:v0075p0100d0201', 'Adapter': '/org/bluez/hci0', 'ServicesResolved': True}
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0/dev_80_9F_F5_BF_C4_80 {'Address': '80:9F:F5:BF:C4:80', 'AddressType': 'public', 'Name': 'Galaxy Buds Pro (C480)', 'Alias': 'Galaxy Buds Pro', 'Class': 2360324, 'Icon': 'audio-headset', 'Paired': True, 'Bonded': True, 'Trusted': True, 'Blocked': False, 'LegacyPairing': False, 'Connected': True, 'UUIDs': ['00001101-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110d-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000111e-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '4b270bf0-ce26-4736-8619-9d59eb0121f5', 'a23d00bc-217c-123b-9c00-fc44577136ee', 'b4a9d6a0-b2e3-4e40-976d-a69f167ea895', 'e7ab2241-ca64-4a69-ac02-05f5c6fe2d62', 'f8620674-a1ed-41ab-a8b9-de9ad655729d'], 'Modalias': 'bluetooth:v0075pA013d0001', 'Adapter': '/org/bluez/hci0', 'ServicesResolved': True}
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0/dev_C0_28_8D_8A_40_99 {'Address': 'C0:28:8D:8A:40:99', 'AddressType': 'public', 'Name': 'UE BOOM 2 Andrea', 'Alias': 'UE BOOM 2 Andrea', 'Class': 2360344, 'Icon': 'audio-headphones', 'Paired': True, 'Bonded': True, 'Trusted': True, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': ['00001101-0000-1000-8000-00805f9b34fb', '00001108-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110d-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000110f-0000-1000-8000-00805f9b34fb', '0000111e-0000-1000-8000-00805f9b34fb', '00001131-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000fe61-0000-1000-8000-00805f9b34fb'], 'Modalias': 'bluetooth:v000ApFFFFdFFFF', 'Adapter': '/org/bluez/hci0', 'ServicesResolved': False}
blueman-applet 22.31.24 INFO     Networking:71 set_nap   : set nap False
blueman-applet 22.31.24 INFO     BluezAgent:56 register_agent: Register Agent
blueman-applet 22.31.24 INFO     ShowConnected:50 enumerate_connections: Found 2 existing connections
blueman-applet 22.31.24 DEBUG    Base:60 do_g_properties_changed: /org/bluez/hci0 {'Pairable': True}
blueman-applet 22.31.24 DEBUG    DiscvManager:92 on_adapter_property_changed: prop Pairable True

(blueman-tray:10283): Gtk-CRITICAL **: 22:31:24.628: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
blueman-applet 22.31.25 INFO     PowerManager:140 request_power_state: Requesting True
blueman-applet 22.31.25 INFO     KillSwitch:138 on_power_state_change_requested: True
blueman-applet 22.31.25 DEBUG    KillSwitch:151 on_power_state_change_requested: Using mechanism to set state: True
blueman-applet 22.31.25 INFO     PowerManager:125 check     : callbacks done
blueman-applet 22.31.25 INFO     PowerManager:96 set_adapter_state: True
blueman-applet 22.31.25 INFO     PowerManager:179 update_power_state: off False | foff False | on True | current state True | new state True

Additionally, this is what I get every time I try to manually start blueman-tray, in the applet's output

(blueman-tray:10283): Gtk-CRITICAL **: 22:31:42.539: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

alba4k avatar Mar 04 '24 21:03 alba4k

I'm getting the exact same issue, after killing and relaunching waybar, due to this my other systray icons are also getting hidden

(blueman-tray:62204): Gtk-CRITICAL **: 10:54:48.544: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

Enigma1309 avatar Mar 11 '24 05:03 Enigma1309

Oh, I did not get that the GTK assertion message comes from blueman-tray, not blueman-applet. That makes a lot more sense, then. :sweat_smile:

Just for better understanding of the linked issue, @Enigma1309: Did this actually start with that hyperdots update? You first stated that all icons are affected, not just blueman-tray, and later stated that it would be an issue with blueman-tray. So which one is correct or are you saying that blueman-tray breaks the other icons as well?

cschramm avatar Mar 11 '24 09:03 cschramm

blueman-tray breaks the other icons as well?

yup that's what i think so, since you can see that when relaunching waybar the only thing that's consuming a lot of processing power is blueman tray

Just did some testing and found this, image i removed blueman and relaunching the waybar shows the network-manager icon, it's probably a blueman issue

just let me reinstall and reboot now to see if the problem persists

Enigma1309 avatar Mar 11 '24 11:03 Enigma1309

Well, waybar definitely lacks separation there then, but anyway...

I think I get it. You're running into the GTK indicator implementation and getting exactly what's expected when the environment is not properly set up for the graphical session.

On X, with the StatusNotifierItem plugin disabled (I guess it does not work with waybar, so that blueman-tray falls back to the GTK status icon anyway), blueman-applet already running and no blueman-tray running (just killall blueman-tray when blueman-applet started one), DISPLAY= blueman-tray --loglevel debug gives me this:

blueman-tray 12.17.32 DEBUG    Tray:36 _on_name_appeared: Applet started on name org.blueman.Applet, showing indicator

(blueman-tray:257434): Gtk-CRITICAL **: 12:17:32.526: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
blueman-tray 12.17.32 INFO     Tray:46 _on_name_appeared: Using indicator "GtkStatusIcon"

(blueman-tray:257434): Gtk-CRITICAL **: 12:17:32.536: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(blueman-tray:257434): Gtk-CRITICAL **: 12:17:32.536: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(blueman-tray:257434): Gtk-CRITICAL **: 12:17:32.536: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

and SIGSEGVs.

So... whatever starts blueman-applet for you, which in terms starts blueman-tray, does not provide a proper environment for GTK to work. On X it means no proper DISPLAY, but I cannot recall if it's DISPLAY as well on Wayland.

cschramm avatar Mar 11 '24 11:03 cschramm

image

i think display configuration is good from my side,

anyways... I've reinstalled blueman after clearing pacman cache, rebooted the machine( thrice just to be sure ) and now i think it works idk what's the cause of this issue but now it has started working. thanks for putting your time in this Thank You <3

Enigma1309 avatar Mar 11 '24 11:03 Enigma1309

I've reinstalled blueman after clearing pacman cache

That's definitely not something that should fix such an issue. Did you happen to install a different version / revision?

cschramm avatar Mar 11 '24 11:03 cschramm

nope just did yay -S blueman

Enigma1309 avatar Mar 11 '24 12:03 Enigma1309

here are logs of the previous session if you're interested image

Enigma1309 avatar Mar 11 '24 12:03 Enigma1309

So... whatever starts blueman-applet for you, which in terms starts blueman-tray, does not provide a proper environment for GTK to work. On X it means no proper DISPLAY, but I cannot recall if it's DISPLAY as well on Wayland.

If blueman is using the Gtk.StatusIcon instead of the StatusNotifier then it's expected it breaks as it relies on X11.

On properly configured environments we can check for XDG_SESSION_TYPE environment variable. But as we regularly see badly configured environments its probably safer to import GdkX11 and if it fails we know it's definitely not X11.

Perhaps we should promote the StatusNotifier plugin as the default and disable the deprecated Gtk.StatusIcon.

infirit avatar Mar 11 '24 14:03 infirit

If blueman is using the Gtk.StatusIcon instead of the StatusNotifier then it's expected it breaks as it relies on X11.

Oh, true, GTK's Wayland backend does not support it. If that's the only problem, I would expect it to fail silently, though.

Perhaps we should promote the StatusNotifier plugin as the default and disable the deprecated Gtk.StatusIcon.

I'll have to double check, but it should be the default already, no?

I do have an idea what could go wrong on restarts even if of the StatusNotifierItem is enabled and used. Will check.

cschramm avatar Mar 11 '24 14:03 cschramm

StatusNotifierItem is the default as the applet plugin is enabled by default (its __autoload__ defaults to True) and its indicator implementation takes precedence over the fallback.

Please show us dconf read /org/blueman/general/plugin-list and - with a running blueman-applet - killall blueman-tray; blueman-tray --loglevel debug.

cschramm avatar Mar 12 '24 08:03 cschramm

currently only running blueman applet

blueman-tray: no process found
blueman-tray 17.08.59 DEBUG    Tray:35 _on_name_appeared: Applet started on name org.blueman.Applet, showing indicator
blueman-tray 17.08.59 INFO     Tray:45 _on_name_appeared: Using indicator "StatusNotifierItem"

lvindotexe avatar Mar 15 '24 16:03 lvindotexe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 15 '24 00:05 github-actions[bot]

that makes no sense

closing bugs just because they're not recieving work?

alba4k avatar May 15 '24 13:05 alba4k

It makes sense if we cannot make any progress. In this case we're still waiting on data on our assumption that people might be running into the GTK implementation, see https://github.com/blueman-project/blueman/issues/2282#issuecomment-1991059848

cschramm avatar May 15 '24 14:05 cschramm

disabling and re-enabling the plugin fixed that

alba4k avatar May 21 '24 20:05 alba4k