I recently upgraded my nvidia drivers from 550.90 to 555.58-2 and i noticed that nvidia-sleep.sh has vanished.
Script is used by elogind after resume from suspend: /lib64/elogind/system-sleep/nvidia
#!/bin/sh
case "$1" in
post)
/usr/bin/nvidia-sleep.sh "resume"
;;
esac
I tried to reinstall the drivers (sudo pacman -R nvidia nvidia-utils nvidia-settings) then (sudo pacman -S nvidia nvidia-utils nvidia-settings) but without success.
According to the docs site nvidia-sleep is supposedly somewhere in /usr/share/nvidia. But it's not there
MAYBE i'm going insane and the script was removed before. My loginctl suspend was running smoothly before
Can anyone confirm?
Not going insane. It was removed in this commit (https://gitea.artixlinux.org/packages/nvidia-utils/commit/307c27bef9113cb81d8d37a0abaa50a4a5d535d8).
I haven't updated the nvidia drivers yet. In case it's any use to you ?
/usr/bin/nvidia-sleep.sh
#!/bin/bash
if [ ! -f /proc/driver/nvidia/suspend ]; then
exit 0
fi
RUN_DIR="/var/run/nvidia-sleep"
XORG_VT_FILE="${RUN_DIR}"/Xorg.vt_number
PATH="/bin:/usr/bin"
case "$1" in
suspend|hibernate)
mkdir -p "${RUN_DIR}"
fgconsole > "${XORG_VT_FILE}"
chvt 63
if [[ $? -ne 0 ]]; then
exit $?
fi
echo "$1" > /proc/driver/nvidia/suspend
exit $?
;;
resume)
echo "$1" > /proc/driver/nvidia/suspend
#
# Check if Xorg was determined to be running at the time
# of suspend, and whether its VT was recorded. If so,
# attempt to switch back to this VT.
#
if [[ -f "${XORG_VT_FILE}" ]]; then
XORG_PID=$(cat "${XORG_VT_FILE}")
rm "${XORG_VT_FILE}"
chvt "${XORG_PID}"
fi
exit 0
;;
*)
exit 1
esac
I manually reinstated the script there, but my suspend/resume routine still seems to be broken... AGAIN
I will have to investigate this further.
Maybe i will downgrade nvidia.
Thanks for your quick answer and clarification!
It may be that it's been removed because it's now handled differently ?
I mention in passing:
I have no joy with high level suspend / resume and nvidia.
For years I've used the lower level
echo "mem" > /sys/power/state
as it's the only way that doesn't result in an X black screen on resume on my machine.
yeah that works.
Im just sad because
loginctl suspend
worked so flawlessly before
I put a lot of effort in researching, reading documentation, editing config files and so on..
Back to the grind again. Happy hacking!
It has been fixed in world-gremlins, as it got wiped in PKGBUILD, which I got to add a patch so it doesn't happen again later