Do not automatically reboot after toggling between NVIDIA-FCKR modes

This commit is contained in:
2023-10-04 20:22:32 -04:00
parent 25ea2c0f90
commit 671262225a
+2 -6
View File
@@ -28,14 +28,10 @@ ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]
# disable GPU via acpi_call on next boot
echo -e '#!/usr/bin/env bash\necho '"'\_SB.PCI0.GPP0.PG00._OFF'"' > /proc/acpi/call' > /etc/local.d/NVIDIA-FCKR.start
chmod +x /etc/local.d/NVIDIA-FCKR.start
/usr/bin/reboot
echo 'Following the next reboot, only the integrated GPU will be used.'
elif [ "$1" == 'hybrid' ]; then
rm -rf /etc/modprobe.d/NVIDIA-FCKR.conf /lib/udev/rules.d/50-NVIDIA-FCKR.rules /etc/local.d/NVIDIA-FCKR.start
/usr/bin/reboot
echo 'Following the next reboot, both GPUs will be enabled.'
else
echo -e "invalid argument: $1\nusage: NVIDIA-FCKR [integrated/hybrid]"
fi