disable hw decoded video in firefox
This commit is contained in:
7
home-manager/firefox/config/nvidia-fixes.nix
Normal file
7
home-manager/firefox/config/nvidia-fixes.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
# benched for now, causes GPU to go into max clocks -> higher power usage
|
||||||
|
#"media.ffmpeg.vaapi.enabled" = true;
|
||||||
|
#"media.rdd-ffmpeg.enabled" = true;
|
||||||
|
#"gfx.x11-egl.force-enabled" = true;
|
||||||
|
#"widget.dmabuf.force-enabled" = true;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, osConfig, ... }:
|
||||||
let
|
let
|
||||||
merge = lib.foldr (a: b: a // b) { };
|
merge = lib.foldr (a: b: a // b) { };
|
||||||
search = {
|
search = {
|
||||||
@@ -94,7 +94,7 @@ in {
|
|||||||
profiles = {
|
profiles = {
|
||||||
default = {
|
default = {
|
||||||
name = "privacy-friendly";
|
name = "privacy-friendly";
|
||||||
settings = merge [
|
settings = merge ([
|
||||||
(import ./config/preferences.nix)
|
(import ./config/preferences.nix)
|
||||||
(import ./config/browser-features.nix)
|
(import ./config/browser-features.nix)
|
||||||
(import ./config/privacy.nix)
|
(import ./config/privacy.nix)
|
||||||
@@ -102,7 +102,7 @@ in {
|
|||||||
(import ./config/tracking-webaudio.nix)
|
(import ./config/tracking-webaudio.nix)
|
||||||
(import ./config/security.nix)
|
(import ./config/security.nix)
|
||||||
(import ./config/speed.nix)
|
(import ./config/speed.nix)
|
||||||
];
|
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable [(import ./config/nvidia-fixes.nix)]);
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
/* Hide tab bar. Used with Sidebery */
|
/* Hide tab bar. Used with Sidebery */
|
||||||
#TabsToolbar {
|
#TabsToolbar {
|
||||||
@@ -123,14 +123,14 @@ in {
|
|||||||
enable-webaudio = {
|
enable-webaudio = {
|
||||||
name = "privacy-but-enable-webaudio";
|
name = "privacy-but-enable-webaudio";
|
||||||
id = 2;
|
id = 2;
|
||||||
settings = merge [
|
settings = merge ([
|
||||||
(import ./config/preferences.nix)
|
(import ./config/preferences.nix)
|
||||||
(import ./config/browser-features.nix)
|
(import ./config/browser-features.nix)
|
||||||
(import ./config/privacy.nix)
|
(import ./config/privacy.nix)
|
||||||
(import ./config/tracking.nix)
|
(import ./config/tracking.nix)
|
||||||
(import ./config/security.nix)
|
(import ./config/security.nix)
|
||||||
(import ./config/speed.nix)
|
(import ./config/speed.nix)
|
||||||
];
|
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable [(import ./config/nvidia-fixes.nix)]);
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
/* Hide tab bar. Used with Sidebery */
|
/* Hide tab bar. Used with Sidebery */
|
||||||
#TabsToolbar {
|
#TabsToolbar {
|
||||||
@@ -160,10 +160,10 @@ in {
|
|||||||
visibility: collapse !important;
|
visibility: collapse !important;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
settings = merge [
|
settings = merge ([
|
||||||
(import ./config/preferences.nix)
|
(import ./config/preferences.nix)
|
||||||
(import ./config/speed.nix)
|
(import ./config/speed.nix)
|
||||||
];
|
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable [(import ./config/nvidia-fixes.nix)]);
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
clearurls
|
clearurls
|
||||||
darkreader
|
darkreader
|
||||||
|
|||||||
@@ -73,15 +73,15 @@ in {
|
|||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
# version = "570.86.16";
|
# version = "570.86.16";
|
||||||
# sha256_64bit = "sha256-RWPqS7ZUJH9JEAWlfHLGdqrNlavhaR1xMyzs8lJhy9U=";
|
# sha256_64bit = "sha256-RWPqS7ZUJH9JEAWlfHLGdqrNlavhaR1xMyzs8lJhy9U=";
|
||||||
# sha256_aarch64 = "sha256-RiO2njJ+z0DYBo/1DKa9GmAjFgZFfQ1/1Ga+vXG87vA=";
|
# sha256_aarch64 = "sha256-RiO2njJ+z0DYBo/1DKa9GmAjFgZFfQ1/1Ga+vXG87vA=";
|
||||||
# openSha256 = "sha256-DuVNA63+pJ8IB7Tw2gM4HbwlOh1bcDg2AN2mbEU9VPE=";
|
# openSha256 = "sha256-DuVNA63+pJ8IB7Tw2gM4HbwlOh1bcDg2AN2mbEU9VPE=";
|
||||||
# settingsSha256 = "sha256-9rtqh64TyhDF5fFAYiWl3oDHzKJqyOW3abpcf2iNRT8=";
|
# settingsSha256 = "sha256-9rtqh64TyhDF5fFAYiWl3oDHzKJqyOW3abpcf2iNRT8=";
|
||||||
# persistencedSha256 =
|
# persistencedSha256 =
|
||||||
# "sha256-3mp9X/oV8o2TH9720NnoXROxQ4g98nNee+DucXpQy3w=";
|
# "sha256-3mp9X/oV8o2TH9720NnoXROxQ4g98nNee+DucXpQy3w=";
|
||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -92,6 +92,12 @@ in {
|
|||||||
(gwe.override { nvidia_x11 = config.hardware.nvidia.package; })
|
(gwe.override { nvidia_x11 = config.hardware.nvidia.package; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
# for firefox, see https://github.com/elFarto/nvidia-vaapi-driver/#firefox
|
||||||
|
MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.nvidiaSetPower = lib.mkIf cfg.powerLimit.enable {
|
systemd.services.nvidiaSetPower = lib.mkIf cfg.powerLimit.enable {
|
||||||
description =
|
description =
|
||||||
"Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
"Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||||
@@ -112,17 +118,17 @@ in {
|
|||||||
environment.DISPLAY = ":0";
|
environment.DISPLAY = ":0";
|
||||||
environment.XAUTHORITY = "/home/kopatz/.Xauthority";
|
environment.XAUTHORITY = "/home/kopatz/.Xauthority";
|
||||||
};
|
};
|
||||||
# doesn't work
|
# doesn't work
|
||||||
#systemd.user.services.nvidiaSetOffset = lib.mkIf cfg.clock.enable {
|
#systemd.user.services.nvidiaSetOffset = lib.mkIf cfg.clock.enable {
|
||||||
# description = "Sets gpu offset";
|
# description = "Sets gpu offset";
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# serviceConfig = { Type = "oneshot"; };
|
# serviceConfig = { Type = "oneshot"; };
|
||||||
# script = ''
|
# script = ''
|
||||||
# ${config.hardware.nvidia.package.settings}/bin/nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=${
|
# ${config.hardware.nvidia.package.settings}/bin/nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=${
|
||||||
# toString cfg.clock.offset
|
# toString cfg.clock.offset
|
||||||
# }"'';
|
# }"'';
|
||||||
# environment = { DISPLAY = ":0"; };
|
# environment = { DISPLAY = ":0"; };
|
||||||
# after = [ "graphical-session.target" ];
|
# after = [ "graphical-session.target" ];
|
||||||
#};
|
#};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user