From bb5f79e199cc34ee48257fc9d13b4b4b41fa8d3e Mon Sep 17 00:00:00 2001 From: mirkobrombin Date: Sat, 3 Aug 2024 18:14:21 +0200 Subject: [PATCH] chore: enable NVreg_PreserveVideoMemoryAllocations and sysd power units --- .../etc/modprobe.d/nvidia-power-management.conf | 1 + recipe.yml | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 includes.container/etc/modprobe.d/nvidia-power-management.conf diff --git a/includes.container/etc/modprobe.d/nvidia-power-management.conf b/includes.container/etc/modprobe.d/nvidia-power-management.conf new file mode 100644 index 0000000..eaf4f34 --- /dev/null +++ b/includes.container/etc/modprobe.d/nvidia-power-management.conf @@ -0,0 +1 @@ +options nvidia NVreg_PreserveVideoMemoryAllocations=1 \ No newline at end of file diff --git a/recipe.yml b/recipe.yml index 697550d..c8a584f 100644 --- a/recipe.yml +++ b/recipe.yml @@ -48,6 +48,15 @@ stages: - libnvidia-fbc1 - nvidia-container-toolkit + - name: nvidia-sysd-units + type: shell + commands: + - mkdir -p /etc/systemd/system/systemd-suspend.service.wants + - mkdir -p /etc/systemd/system/systemd-hibernate.service.wants + - ln -s /usr/lib/systemd/system/nvidia-suspend.service /etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service + - ln -s /usr/lib/systemd/system/nvidia-hibernate.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service + - ln -s /usr/lib/systemd/system/nvidia-resume.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service + - name: extra-utilities type: apt source: