diff --git a/scripts/nvidia/install.sh b/scripts/nvidia/install.sh index 004c843..631e68b 100755 --- a/scripts/nvidia/install.sh +++ b/scripts/nvidia/install.sh @@ -12,4 +12,4 @@ rpm-ostree install /tmp/rpms/kmods/kmod-nvidia*.rpm rpm-ostree install xorg-x11-drv-nvidia-cuda libva-nvidia-driver \ nvidia-vaapi-driver libva-utils vdpauinfo -cp /tmp/scripts/nvidia/modprobe.d/*.conf /etc/modprobe.d/ \ No newline at end of file +cp /tmp/scripts/nvidia/modprobe.d/*.conf /usr/lib/modprobe.d/ \ No newline at end of file diff --git a/scripts/nvidia/modprobe.d/nouveau-blacklist.conf b/scripts/nvidia/modprobe.d/nouveau-blacklist.conf index 31075c0..7c4bfbd 100644 --- a/scripts/nvidia/modprobe.d/nouveau-blacklist.conf +++ b/scripts/nvidia/modprobe.d/nouveau-blacklist.conf @@ -1 +1,5 @@ +# Nouveau must be blacklisted here as well beside from the initrd to avoid a +# delayed loading (for example on Optimus laptops where the Nvidia card is not +# driving the main display). + blacklist nouveau diff --git a/scripts/nvidia/modprobe.d/nvidia-atomic.conf b/scripts/nvidia/modprobe.d/nvidia-atomic.conf new file mode 100644 index 0000000..d2b00ba --- /dev/null +++ b/scripts/nvidia/modprobe.d/nvidia-atomic.conf @@ -0,0 +1 @@ +options nvidia NVreg_TemporaryFilePath=/var/tmp diff --git a/scripts/nvidia/modprobe.d/nvidia-power-management.conf b/scripts/nvidia/modprobe.d/nvidia-power-management.conf new file mode 100644 index 0000000..971ff91 --- /dev/null +++ b/scripts/nvidia/modprobe.d/nvidia-power-management.conf @@ -0,0 +1,6 @@ +# Enable complete power management. From: +# file:///usr/share/doc/nvidia-driver/html/powermanagement.html + +options nvidia NVreg_DynamicPowerManagement=0x02 +options nvidia NVreg_EnableS0ixPowerManagement=1 +options nvidia NVreg_PreserveVideoMemoryAllocations=1 diff --git a/scripts/nvidia/modprobe.d/nvidia-uvm.conf b/scripts/nvidia/modprobe.d/nvidia-uvm.conf new file mode 100644 index 0000000..9dd2b43 --- /dev/null +++ b/scripts/nvidia/modprobe.d/nvidia-uvm.conf @@ -0,0 +1,11 @@ +# Make a soft dependency for nvidia-uvm as adding the module loading to +# /usr/lib/modules-load.d/nvidia-uvm.conf for systemd consumption, makes the +# configuration file to be added to the initrd but not the module, throwing an +# error on plymouth about not being able to find the module. +# Ref: /usr/lib/dracut/modules.d/00systemd/module-setup.sh + +# Even adding the module is not the correct thing, as we don't want it to be +# included in the initrd, so use this configuration file to specify the +# dependency. + +softdep nvidia post: nvidia-uvm