Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940631 - net-misc/sunshine-0.23.1: system tray does not appear in plasma wayland session, throws GTK errors
Summary: net-misc/sunshine-0.23.1: system tray does not appear in plasma wayland sessi...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-02 04:53 UTC by steve_v
Modified: 2024-10-04 08:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info net-misc/sunshine (emerge-info-sunshine,10.28 KB, text/plain)
2024-10-02 04:53 UTC, steve_v
Details

Note You need to log in before you can comment on or make changes to this bug.
Description steve_v 2024-10-02 04:53:06 UTC
Created attachment 904635 [details]
emerge --info net-misc/sunshine

net-misc/sunshine-0.23.1 does not show a systray icon in plasma6 / wayland, startup prints:

Warning: Missing Wayland wire for wlr-export-dmabuf
Error: Couldn't find monitor [0]
Error: Couldn't find monitor [0]

libayatana-appindicator-WARNING **: 17:01:17.275: Unable to get the session bus: Cannot spawn a message bus when AT_SECURE is set

LIBDBUSMENU-GLIB-WARNING **: 17:01:17.275: Unable to get session bus: Cannot spawn a message bus when AT_SECURE is set

Gtk-CRITICAL **: 17:01:17.380: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Error: Couldn't find monitor [0]
Error: Couldn't find monitor [0]

I don't know if "Couldn't find monitor" is related (probably) but it doesn't seem to affect functionality, KMS capture and streaming work just fine.

If I set GDK_BACKEND=x11, the systray icon appears but is non-functional (doesn't accept clicks).

net-misc/sunshine-9999 exhibits exactly the same behaviour.

Systray works fine (both 0.23.1 and 9999) in an X11 session.


The upstream 2024.1002.11240 "prerelease" appimage also works fine, systray and all, and prints no alarming errors besides warning that it can't capture from KMS due to missing admin caps. That's an unrelated issue though.

I tried bumping the ebuild to 2024.1002.11240 but I'm getting nowhere, automake and co. I can handle, but my newfangled-build-system foo isn't really up to the task here.
Comment 1 James Le Cuirot gentoo-dev 2024-10-02 21:12:19 UTC
It works when filecaps haven't been set on the file. Remerge with USE=-filecaps or modify /usr/bin/sunshine-0.23.1 with setcap. It needs cap_sys_admin to work properly though. I don't know how the AppImage does it, but perhaps that isn't getting cap_sys_admin either.
Comment 2 steve_v 2024-10-03 02:23:55 UTC
(In reply to James Le Cuirot from comment #1)
> It needs cap_sys_admin to work properly though.

It needs cap_sys_admin to work *at all* on Wayland. Without it there is no functional capture back end.

> I don't know how the AppImage does
> it, but perhaps that isn't getting cap_sys_admin either.

It's not, at least not out of the box. Passing '--install' to the appimage is supposed to set cap_sys_admin, but it doesn't work (possibly due to permissions on /tmp). I haven't dissected the appimage to investigate further.

In any case, sunshine without caps is even more broken than sunshine with no tray icon.


Surely there must be a way to load an appindicator tray icon for a program with admin caps under Wayland, right? 
I mean I personally still consider Wayland a poorly-conceived experiment at this point, but a restriction like that is just ridiculous.
Comment 3 steve_v 2024-10-04 08:54:31 UTC
Reproduced in manual build from git master, bug upstreamed @ https://github.com/LizardByte/Sunshine/issues/3253