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 = { firefox = {
enable = true; enable = true;
wayland = 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; disableTabBar = true;
defaultBookmarks = true; defaultBookmarks = true;
gnomeTheme = true; gnomeTheme = true;
@ -303,7 +303,8 @@ rec {
tokei # Text file statistics in a project tokei # Text file statistics in a project
poppler_utils # pdfunite poppler_utils # pdfunite
# ffmpeg # Convert video (magic), v4 # 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) imagemagick # Convert image (magic)
ueberzugpp # Display images in terminal (alacritty) ueberzugpp # Display images in terminal (alacritty)
(ripgrep.override {withPCRE2 = true;}) # fast as fuck (ripgrep.override {withPCRE2 = true;}) # fast as fuck
@ -360,6 +361,7 @@ rec {
httpie # Cool http client httpie # Cool http client
# suricata # suricata
cifs-utils # Mount samba shares cifs-utils # Mount samba shares
nfs-utils
appimage-run appimage-run
@ -383,6 +385,7 @@ rec {
clinfo # OpenCL info clinfo # OpenCL info
vulkan-tools # vulkaninfo vulkan-tools # vulkaninfo
libva-utils # vainfo libva-utils # vainfo
vdpauinfo
rocminfo # radeon comptute platform info rocminfo # radeon comptute platform info
hwloc hwloc
lm_sensors lm_sensors

View File

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

View File

@ -42,37 +42,6 @@
fsType = "vfat"; fsType = "vfat";
}; };
# TODO: Figure out those mount options, it makes many operations (e.g. filepicker) extremely slow as the gvs stuff hangs
# fileSystems."/media/Picture" = {
# device = "//192.168.86.100/Picture";
# fsType = "cifs";
# options = let
# # this line prevents hanging on network split
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
# in ["${automount_opts},credentials=/home/christoph/samba.login" "uid=1000" "gid=1000"];
# };
# fileSystems."/media/Video" = {
# device = "//192.168.86.100/Video";
# fsType = "cifs";
# options = let
# # this line prevents hanging on network split
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
# in ["${automount_opts},credentials=/home/christoph/samba.login" "uid=1000" "gid=1000"];
# };
# fileSystems."/media/Usenet" = {
# device = "//192.168.86.100/Usenet";
# fsType = "cifs";
# options = let
# # this line prevents hanging on network split
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
# in ["${automount_opts},credentials=/home/christoph/samba.login" "uid=1000" "gid=1000"];
# };
swapDevices = lib.mkForce [ swapDevices = lib.mkForce [
# { # {
# device = "/var/swap"; # device = "/var/swap";
@ -105,29 +74,32 @@
# nvidia.modesetting.enable = true; # Not officially supported by NVidia but needed for wayland # nvidia.modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect # video.hidpi.enable = lib.mkDefault true; # No longer has any effect
opengl.enable = true; opengl = {
enable = true;
# Vulkan # Vulkan
opengl.driSupport = true; driSupport = true;
opengl.driSupport32Bit = true; driSupport32Bit = true;
# AMD: https://nixos.wiki/wiki/AMD_GPU # AMD: https://nixos.wiki/wiki/AMD_GPU
opengl.extraPackages = with pkgs; [ extraPackages = with pkgs; [
# amdvlk # RADV (mesa) and AMDVLK (amd) can be used simultaneously # amdvlk # RADV (mesa) and AMDVLK (amd) can be used simultaneously
# OpenCL # OpenCL
# rocm-opencl-icd rocm-opencl-icd
# rocm-opencl-runtime rocm-opencl-runtime
# rocm-runtime # Wiki doesn't mention this, but it exists... # rocm-runtime # Wiki doesn't mention this, but it exists...
# TODO: Disabled for the moment, because hardware acceleration crashes AMDGPU driver # TODO: Disabled for the moment, because hardware acceleration crashes AMDGPU driver
# VAAPI/VDPAU: https://nixos.wiki/wiki/Accelerated_Video_Playback # VAAPI/VDPAU: https://nixos.wiki/wiki/Accelerated_Video_Playback
# vaapiVdpau # Taken from wiki vaapiVdpau # Taken from wiki
# libvdpau-va-gl # Taken from wiki libvdpau-va-gl # Taken from wiki
# libvdpau # NOTE: Don't know if needed/where it belongs... libvdpau # NOTE: Don't know if needed/where it belongs...
# libva # NOTE: Don't know if needed/where it belongs... libva # NOTE: Don't know if needed/where it belongs...
]; ];
};
sane.enable = true; # Scanning sane.enable = true; # Scanning
xpadneo.enable = true; # Xbox Controller xpadneo.enable = true; # Xbox Controller