nvidia_x11: fix suspend script paths since 470.57.02 (#131838)
nvidia 470.57.02 changed the path of `nvidia-sleep.sh` and systemd scripts, making `builder.sh` miss them and suspend-to-ram on systems where `hardware.nvidia.powerManagement.enable = true` is set fail.
This commit is contained in:
parent
f73b3543b5
commit
3f4bb8ff5a
@ -46,11 +46,17 @@ installPhase() {
|
||||
fi
|
||||
|
||||
# Install systemd power management executables
|
||||
if [ -e systemd/nvidia-sleep.sh ]; then
|
||||
mv systemd/nvidia-sleep.sh ./
|
||||
fi
|
||||
if [ -e nvidia-sleep.sh ]; then
|
||||
sed -E 's#(PATH=).*#\1"$PATH"#' nvidia-sleep.sh > nvidia-sleep.sh.fixed
|
||||
install -Dm755 nvidia-sleep.sh.fixed $out/bin/nvidia-sleep.sh
|
||||
fi
|
||||
|
||||
if [ -e systemd/system-sleep/nvidia ]; then
|
||||
mv systemd/system-sleep/nvidia ./
|
||||
fi
|
||||
if [ -e nvidia ]; then
|
||||
sed -E "s#/usr(/bin/nvidia-sleep.sh)#$out\\1#" nvidia > nvidia.fixed
|
||||
install -Dm755 nvidia.fixed $out/lib/systemd/system-sleep/nvidia
|
||||
|
Loading…
Reference in New Issue
Block a user