If you're using KDE Plasma 6.x with Wayland and Nvidia drivers 565.77, Discord version 0.0.82 (stable) cannot share screen without kde-plasma/kwin being compiled with screencast USE flag. The error log from journalctl states it clear: xdg-desktop-portal-kde[2134]: xdp-kde-screencast: zkde_screencast_unstable_v1 does not seem to be available So Kwin must be compiled with USE="screencast" Reproducible: Always Steps to Reproduce: 1. Boot KDE 6.2.4 with Wayland, Nvidia 565.77 2. Install net-im/discord 3. Try to share screen > check journalctl Actual Results: Screensharing didn't work because there's no xdp-kde-screencast available Expected Results: Have USE enabled for KWIN in order for Discord to be possible to screenshare The fix is easy: create a USE flag "plasma" for discord, and if that USE flag is used, it should mandate kwin[screencast] as dependency
Additional note: Discord is not compiled with kwin library specifically for kde-screencast, the kwin "screencast" USE flag only adds a missing plugin to Kwin in order to be used on UI.
Created attachment 917754 [details] Portage emerge --info
https://devmanual.gentoo.org/general-concepts/use-flags/index.html#when-not-to-use-use-flags > The usage of a USE flag should not control runtime dependencies when the package does not link to it. Doing so will create extra configuration for the package and re-compilation for no underlying file change on disk. This should be avoided and instead can be conveyed to the user via post install messages if needed. If you use the plasma profile this use flag is already set as well so this is more of user configuration issue tbh. Also I would assume this applies to mutter as well?
(In reply to Alfred Wingate from comment #3) > https://devmanual.gentoo.org/general-concepts/use-flags/index.html#when-not- > to-use-use-flags > > > The usage of a USE flag should not control runtime dependencies when the package does not link to it. Doing so will create extra configuration for the package and re-compilation for no underlying file change on disk. This should be avoided and instead can be conveyed to the user via post install messages if needed. > > If you use the plasma profile this use flag is already set as well so this > is more of user configuration issue tbh. Also I would assume this applies to > mutter as well? If you use Gnome, the plasma USE flag is not set, so that's implicitly a condition to trigger the possibility of using USE pipewire if you have pipewire. Otherwise, if you have no pipewire, discord sharing will work fine. The idea is that: - On gnome without pipewire already works - On plasma without pipewire works The last condition is to activate the pipewire USE flag only if you are actually using pipewire (since it doesn't exclusively depend on pipewire) on Plasma only. We can't set only one flag (such as pipewire) USE flag for discord in order to pull in kwin[screencast] if you're using gnome or any other DE, it wouldn't make sense since it would pull kwin with screencast, which is absolutely not needed in Gnome/i3/awesome/etc. The reason behind this is that Discord does not depend on Kwin at all, so making it a sole dependency if you're running Gnome would not make sense. And it doesn't depend on pipewire to share screen, either. But for users using both Plasma and Pipewire, this is the only time this condition should be set - to depend on kwin[screencast]. Only if both of these conditions are met in the same time, otherwise there's no issue. Same with ods-studio.
As observations: 1) no, it's not okay to have 2 USE flags conditioning one another, those are very extravagant cases, such as tests 2) I dropped the case for 2 USE flags, so I'll most probably add just a einfo notifying users that if they use plasma with kwin, they should enable USE="screencast" on discord in order to be able to screenshare on wayland, since plasma profile already has screencast enabled - the case above is for example if you're not exclusively on plasma profile, but have multiple DEs and on other profiles
New PR: https://github.com/gentoo/gentoo/pull/40446 I got the old one got auto-closed mistakenly.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb0e29959aa4574fd71cc355ba2a5d877eb28858 commit bb0e29959aa4574fd71cc355ba2a5d877eb28858 Author: Stefan Cristian B. <stefan.cristian+git@rogentos.ro> AuthorDate: 2025-02-05 12:45:45 +0000 Commit: Nick Sarnie <sarnex@gentoo.org> CommitDate: 2025-02-05 12:49:23 +0000 net-im/discord: einfo add for screenshare with kwin[screencast] and wayland Closes: https://bugs.gentoo.org/948978 Signed-off-by: Stefan Cristian B. <stefan.cristian+git@rogentos.ro> Closes: https://github.com/gentoo/gentoo/pull/40446 Signed-off-by: Nick Sarnie <sarnex@gentoo.org> net-im/discord/discord-0.0.84.ebuild | 6 ++++++ 1 file changed, 6 insertions(+)