From 5c9d3e3e67dff76339a8cc874a73bf867889b442 Mon Sep 17 00:00:00 2001 From: h-banii <121690516+h-banii@users.noreply.github.com> Date: Wed, 16 Oct 2024 19:11:33 -0300 Subject: [PATCH] fix: disable gpu memory buffer video frames (#2519) --- src/index.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index afc4e2fb..69f023cf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -131,17 +131,18 @@ if (config.get('options.disableHardwareAcceleration')) { } if (is.linux()) { - const disabledFeatures = [ - // Workaround for issue #2248 - 'UseMultiPlaneFormatForSoftwareVideo', - ]; + // Workaround for issue #2248 + if ( + process.env.XDG_SESSION_TYPE === 'wayland' || + process.env.WAYLAND_DISPLAY + ) { + app.commandLine.appendSwitch('disable-gpu-memory-buffer-video-frames'); + } // Stops chromium from launching its own MPRIS service if (config.plugins.isEnabled('shortcuts')) { - disabledFeatures.push('MediaSessionService'); + app.commandLine.appendSwitch('disable-features', 'MediaSessionService'); } - - app.commandLine.appendSwitch('disable-features', disabledFeatures.join()); } if (config.get('options.proxy')) {