Remove kms hook only if necessary

This commit is contained in:
Manuel Thalmann 2023-05-04 20:06:46 +02:00
parent 7728cf9e87
commit ce68b0513f

View file

@ -7,7 +7,7 @@ echo "options nvidia_drm modeset=1" | sudo tee /etc/modprobe.d/nvidia.conf > /de
} | sudo tee /etc/modprobe.d/nvidia-power-management.conf > /dev/null; } | sudo tee /etc/modprobe.d/nvidia-power-management.conf > /dev/null;
sudo sed -i \ sudo sed -i \
-e "/^HOOKS=(/{" \ -e "/^HOOKS=(.* kms /{" \
-e "h; s/^/#/; p;" \ -e "h; s/^/#/; p;" \
-e "g; s/ kms / /" \ -e "g; s/ kms / /" \
-e "}" \ -e "}" \