Laptop refuse to enter sleep or hibernate

Hi!

This have suddenly sprung up.
I’m not sure when it happened or if it’s a BIOS update that cause it. I’m generally very unsure.
But I’ve notice the computer instantly wakes up if put it to sleep or hibernate.

From Journalctl
https://0x0.st/oChM.txt

[swebow@swebow-xmgcoreczne21 ~]$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
GP17 S4 *enabled pci:0000:00:08.1
GPP1 S4 *enabled pci:0000:00:01.2
GPP0 S4 *enabled pci:0000:00:01.1

I’ve installed TLP just before writing here and no difference what so ever.
I’m generally looking for advice. LTS nor bleeding edge seem to make a difference with the Kernel.

My battery is dying and I’m waiting for a replacement. Might that cause an issue?

image

1 Like

Hi everyone!

In case anyone have the same issue, it’s the Nvidia drivers causing the instant wakeup.

I used the following script from mr.orly97 on the Nvidia forums.
I edited it with the following:

sudo nano /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

Save it and restart your laptop. My Laptop runs in Hybrid mode set with Envycontrol.

Source:

1 Like

Can you, please, describe what and where you edited which files? The linked article has some discussion with a variation, which makes it confusing about the exact details.

Also, if you have edited a file under /lib/, AFAIK, you could override that package provided file with an equivalent under /etc/. I don’t know if the specific path works like that, so it would be great if you could test this method.
For example, instead of editing /lib/systemd/system-sleep/nvidia, copy that to /etc/systemd/system-sleep/nvidia, and modify as you explained.

Please, post the contents of the relevant files in the post, to keep the solution in our forum, in case the linked page (URL) changes.

Oh sorry, yeah it was the lib I edited. Is it more recommended to edit the etc one?

Let me update the OP with the correct info I did.

EDIT: Sadly the /etc/systemd/system-sleep/nvidia solution didn’t work.

1 Like

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