[Desktop] Basic wayland support + enable hardware accelaration in Firefox

This commit is contained in:
Antoine Viallon 2022-10-04 22:33:32 +02:00
parent d0ff636208
commit 5a67e17898
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
3 changed files with 13 additions and 0 deletions

View file

@ -100,6 +100,8 @@ in {
}; };
security.rtkit.enable = true; # Real-time support for pipewire security.rtkit.enable = true; # Real-time support for pipewire
# Enable running X11 apps on Wayland
programs.xwayland.enable = true;
# Hardware-agnostic audio denoising # Hardware-agnostic audio denoising
systemd.user.services.pipewire-noise-filter = { systemd.user.services.pipewire-noise-filter = {

View file

@ -51,6 +51,7 @@ in {
"__GL_YIELD" = "USLEEP"; # use usleep(0) instead of sched_yield() -> better performance in most cases "__GL_YIELD" = "USLEEP"; # use usleep(0) instead of sched_yield() -> better performance in most cases
"__GL_ALLOW_UNOFFICIAL_PROTOCOL" = "1"; # allow unofficial GLX protocol if also set in Xorg conf "__GL_ALLOW_UNOFFICIAL_PROTOCOL" = "1"; # allow unofficial GLX protocol if also set in Xorg conf
"__GL_VRR_ALLOWED" = "1"; # Try to enable G-SYNC VRR if screen AND app is compatible "__GL_VRR_ALLOWED" = "1"; # Try to enable G-SYNC VRR if screen AND app is compatible
"KWIN_DRM_USE_EGL_STREAMS" = "1"; # Make KWin use EGL Streams, because otherwise performance will be horrible.
}; };
}; };
} }

View file

@ -13,8 +13,11 @@ let
prefs prefs
); );
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped { in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
forceWayland = true;
cfg = { cfg = {
smartcardSupport = true; smartcardSupport = true;
pipewireSupport = true;
ffmpegSupport = true;
enablePlasmaBrowserIntegration = true; enablePlasmaBrowserIntegration = true;
}; };
@ -113,5 +116,12 @@ in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
"privacy.trackingprotection.enabled" = true; "privacy.trackingprotection.enabled" = true;
"browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true; "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true;
"media.ffmpeg.vaapi.enabled" = true;
"media.ffvpx.enabled" = true;
"media.navigator.mediadatadecoder_vpx_enabled" = true;
"media.rdd-ffmpeg.enabled" = true;
"media.rdd-ffvpx.enabled" = true;
"media.rdd-opus.enabled" = true;
}); });
} }