1

Reenable firefox hardware-video-decoding

This commit is contained in:
2023-09-21 12:31:11 +02:00
parent fa1a6ed31c
commit 21d0fa2c04
3 changed files with 34 additions and 57 deletions

View File

@ -60,7 +60,7 @@ rec {
firefox = {
enable = true;
wayland = true;
vaapi = false; # NOTE: Crashes AMDGPU driver fairly often (don't know why exactly)
vaapi = true; # NOTE: Crashes AMDGPU driver fairly often (don't know why exactly)
disableTabBar = true;
defaultBookmarks = true;
gnomeTheme = true;
@ -303,7 +303,8 @@ rec {
tokei # Text file statistics in a project
poppler_utils # pdfunite
# ffmpeg # Convert video (magic), v4
ffmpeg_5-full # v5, including ffplay
ffmpeg_5-full # I love ffmpeg (v5, including ffplay)
x265
imagemagick # Convert image (magic)
ueberzugpp # Display images in terminal (alacritty)
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
@ -360,6 +361,7 @@ rec {
httpie # Cool http client
# suricata
cifs-utils # Mount samba shares
nfs-utils
appimage-run
@ -383,6 +385,7 @@ rec {
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo
rocminfo # radeon comptute platform info
hwloc
lm_sensors

View File

@ -35,6 +35,7 @@ in {
(optionalAttrs cfg.wayland {
MOZ_ENABLE_WAYLAND = 1;
EGL_PLATFORM = "wayland";
# XDG_CURRENT_DESKTOP = "Hyprland"; # TODO: Or "sway"? # Already set by hyprland
})
(optionalAttrs cfg.vaapi {
@ -153,16 +154,17 @@ in {
(optionalAttrs cfg.vaapi {
# Firefox wayland hardware video acceleration
# https://github.com/elFarto/nvidia-vaapi-driver/#firefox=
"gfx.canvas.accelerated" = true;
"gfx.webrender.enabled" = true; # Should be set on gnome anyway
# TODO: Disable and check if it works by default
# "gfx.canvas.accelerated" = true; # Default value
# "gfx.webrender.enabled" = true; # Does not exist?
"gfx.x11-egl.force-enabled" = true;
"layers.acceleration.force-enabled" = true;
"media.av1.enabled" = false;
# "media.av1.enabled" = false;
"media.ffmpeg.vaapi.enabled" = true;
"media.hardware-video-decoding.force-enabled" = true;
"media.rdd-ffmpeg.enabled" = true;
"widget.dmabuf.force-enabled" = true;
"widget.wayland-dmabuf-vaapi.enabled" = true;
# "media.rdd-ffmpeg.enabled" = true; # Default value
# "widget.dmabuf.force-enabled" = true;
# "widget.wayland-dmabuf-vaapi.enabled" = true; # Does not exist?
})
(let