version 545.29.06
[Unit]
Description=NVIDIA system suspend actions
Before=systemd-suspend.service
#It is worth to add
After=sleep.target
[Service]
Type=oneshot
ExecStart=/usr/bin/logger -t suspend -s “nvidia-suspend.service”
ExecStart=/usr/bin/nvidia-sleep.sh “suspend”
[Install]
WantedBy=systemd-suspend.service
that way it occurs after sleep.target and before
system-suspend.service
That way customer might use
Before=sleep.target
instead of
Before=nvidia-suspend
It seems nvidia-suspend if it exists is last thing
to execute before system-suspend.
Hence, it makes sense to narrow it
after sleep.target and before system-suspend