diff --git a/config/common/nvidia-laptop-scripts.yml b/config/common/nvidia-laptop-scripts.yml new file mode 100644 index 0000000..19b620e --- /dev/null +++ b/config/common/nvidia-laptop-scripts.yml @@ -0,0 +1,3 @@ +type: script +scripts: + - nvidiaoptimuspowermanagement.sh \ No newline at end of file diff --git a/config/files/usr/etc/modprobe.d/nvidia.conf b/config/files/usr/etc/modprobe.d/nvidia.conf deleted file mode 100644 index 3778926..0000000 --- a/config/files/usr/etc/modprobe.d/nvidia.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Enable DynamicPowerManagement -# http://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/dynamicpowermanagement.html -options nvidia NVreg_DynamicPowerManagement=0x02 diff --git a/config/recipes/laptop/recipe-bluefin-dx-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-bluefin-dx-nvidia-laptop-userns.yml index bb70a8c..e776953 100644 --- a/config/recipes/laptop/recipe-bluefin-dx-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-bluefin-dx-nvidia-laptop-userns.yml @@ -20,4 +20,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/bluefin-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml index dee0692..bc8adae 100644 --- a/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml @@ -20,4 +20,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/bluefin-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml b/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml index 2abc29e..e75c5ac 100644 --- a/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml @@ -22,4 +22,5 @@ modules: - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml index bdd34a9..25f411b 100644 --- a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml @@ -19,4 +19,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/cinnamon-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml index 60056cb..574b588 100644 --- a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml @@ -21,4 +21,5 @@ modules: - from-file: common/disableuserns-scripts.yml - from-file: common/cinnamon-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-kinoite-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-kinoite-nvidia-laptop-userns.yml index 77bd126..c0fb499 100644 --- a/config/recipes/laptop/recipe-kinoite-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-kinoite-nvidia-laptop-userns.yml @@ -20,4 +20,5 @@ modules: - from-file: recipes/laptop/laptop-bling.yml - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-kinoite-nvidia-laptop.yml b/config/recipes/laptop/recipe-kinoite-nvidia-laptop.yml index d85954e..ca4531b 100644 --- a/config/recipes/laptop/recipe-kinoite-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-kinoite-nvidia-laptop.yml @@ -22,4 +22,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-sericea-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-sericea-nvidia-laptop-userns.yml index 4235310..2590e70 100644 --- a/config/recipes/laptop/recipe-sericea-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-sericea-nvidia-laptop-userns.yml @@ -18,4 +18,5 @@ modules: - from-file: recipes/laptop/laptop-bling.yml - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-sericea-nvidia-laptop.yml b/config/recipes/laptop/recipe-sericea-nvidia-laptop.yml index 8856f6f..2d80e47 100644 --- a/config/recipes/laptop/recipe-sericea-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-sericea-nvidia-laptop.yml @@ -20,4 +20,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml index 1a5d706..484cdc5 100644 --- a/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml @@ -20,4 +20,5 @@ modules: - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml b/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml index 5184dbd..87b4ed8 100644 --- a/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml @@ -22,4 +22,5 @@ modules: - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop-userns.yml index 0825981..c170770 100644 --- a/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop-userns.yml @@ -19,4 +19,5 @@ modules: - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml - from-file: common/wayfire-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop.yml b/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop.yml index 9b9d6c3..69d2e8d 100644 --- a/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-wayblue-wayfire-nvidia-laptop.yml @@ -21,4 +21,5 @@ modules: - from-file: common/wayfire-scripts.yml - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml + - from-file: common/nvidia-laptop-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/scripts/nvidiaoptimuspowermanagement.sh b/config/scripts/nvidiaoptimuspowermanagement.sh new file mode 100644 index 0000000..bff85fa --- /dev/null +++ b/config/scripts/nvidiaoptimuspowermanagement.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -oue pipefail + +echo " +# Enable Fine-Grained DynamicPowerManagement +# https://download.nvidia.com/XFree86/Linux-x86_64/545.29.06/README/dynamicpowermanagement.html +options nvidia NVreg_DynamicPowerManagement=0x02 +" >> /usr/etc/modprobe.d/nvidia.conf