Could the wrapper script be updated? Here's a version that accounts for vaapi/ozone on wayland, though it has not been tested under wayland yet, since I don't have a wayland-capable machine.
Update: it has been tested on wayland, and appears to work.
#!/usr/bin/env sh
EXTRA_FLAGS="$@"
#Check if XDG_SESSION_TYPE is set
if [ -z "$XDG_SESSION_TYPE" ]
then
echo "XDG_SESSION_TYPE is not set, cannot apply extra flags"
elif [ "$XDG_SESSION_TYPE" == "x11" ]
then
EXTRA_FLAGS="--no-sandbox ${EXTRA_FLAGS}"
elif [ "$XDG_SESSION_TYPE" == "wayland" ]
then
EXTRA_FLAGS="--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,WebrtcPipewireCapturer,UseOzonePlatform --ozone-platform=wayland ${EXTRA_FLAGS}"
else
echo "Unknown XDG_SESSION_TYPE: ${XDG_SESSION_TYPE}, cannot apply extra flags"
fi
echo "Passing extra electron flags: ${EXTRA_FLAGS}"
/opt/discord-development/DiscordDevelopment "${EXTRA_FLAGS}"
Pinned Comments
Moire commented on 2024-08-26 00:56 (UTC)
I highly recommend users install OpenAsar, a FOSS alternative to the Electron asar app currently used by Discord. It's smaller, improves performance, removes some tracking, adds customization, and also allows skipping otherwise required host updates. You may also do the latter without OpenAsar by adding
"SKIP_HOST_UPDATE": trueto~/.config/discorddevelopment/settings.json.