Hibernation and Sleep options not working, "Login Screen" shows instead

Hibernation and Sleep options not working, “Login Screen” shows instead. When I press the Power Button (is set to Hibernate), or either when I manually try to start Hibernation, or after 1min of inactivity (temporaly test setting), in all these circumstances Hibernate and Sleep process not working as we expect. Instead, the screen is going to be black for few seconds, and then the Login screen shows up.

What I can do?

I assume you are using Nvidia. Put this code to file /lib/systemd/system-sleep/nvidia:

#!/bin/sh

case "$1" in
    pre)
        case "$SYSTEMD_SLEEP_ACTION" in
            suspend|hibernate)
                /usr/bin/nvidia-sleep.sh "$SYSTEMD_SLEEP_ACTION"
                ;;
            suspend-after-failed-hibernate)
                /usr/bin/nvidia-sleep.sh "suspend"
                ;;
        esac
        ;;
    post)
        /usr/bin/nvidia-sleep.sh "resume"
        ;;
esac

I got it working after that :slight_smile:

1 Like

Woala! Thank You! This was one awesome and fast help.

Yes it’s true, Nvidia is here… :grin:

Now both options Hibernate and Sleep working as expected.

By the way, how I can make to work “auto-login” after booting up from Hibernate or Sleep? Normally when I start the PC (standard boot), that “auto-login” process working without exceptions.

You’re welcome!

I don’t know about that auto-login. I tried looking up settings on power-management and other places, but did not find anything. Maybe someone else can help you. :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.