You are not logged in.

#1 2024-09-17 00:00:41

godpraisearch
Member
Registered: 2022-04-21
Posts: 52

Putting laptop to sleep causes it to turn off

So this issue has been happening for over a week (even with updates). When putting my Lenovo Ideapad 5 laptop to sleep by either, leaving it, closing the lid, pressing the suspend button, or typing systemctl suspend in the  terminal, it always boots up from nothing, with no errors popping up. I have no idea on where to start for solving this issue, but I appreciate all the help.

Neofetch: https://imgur.com/a/rYRPRM3

Offline

#2 2024-09-17 12:11:22

Neroman
Member
Registered: 2024-09-13
Posts: 21

Re: Putting laptop to sleep causes it to turn off

I think this page can help you to troubleshoot your problem.
Also to restore state after suspend which powers machine off (hibernate) you need to use swap space.
You can check if use have it by:

 swapon --show 

or

 free -h 

Offline

#3 2024-09-17 20:58:44

godpraisearch
Member
Registered: 2022-04-21
Posts: 52

Re: Putting laptop to sleep causes it to turn off

This is my output for those commands:
┌──(luca@lenovo-ideapad-14are05)-[~]
└─$  swapon --show
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition  16G   0B  100
                                                                                                                     
┌──(luca@lenovo-ideapad-14are05)-[~]
└─$ free -h
               total        used        free      shared  buff/cache   available
Mem:            14Gi       6.9Gi       6.0Gi       320Mi       2.7Gi       8.0Gi
Swap:           15Gi          0B        15Gi

Haven't done anything but update my lapotp.

Offline

#4 2024-09-18 07:09:35

Neroman
Member
Registered: 2024-09-13
Posts: 21

Re: Putting laptop to sleep causes it to turn off

If it isn't swap, maybe you have just unconfigured initramfs (check for 'resume' hook). https://wiki.archlinux.org/title/Power_ … _initramfs
I would also check for status of these services for any warnings/errors: *link*

systemctl status systemd-hibernate-resume.service
systemctl status systemd-hibernate-clear.service

If there is output something like below - you need just to add hook to initramfs and regenerate them:

Assertion failed for Resume from hibernation

To regenerate after you added the 'resume' hook:

mkinitcpio -P

I also had problems with hibernation because of no resume hook and laptop got rebooted after

systemctl hibernate

Offline

#5 2024-09-25 01:56:21

godpraisearch
Member
Registered: 2022-04-21
Posts: 52

Re: Putting laptop to sleep causes it to turn off

Added resume to the initramfs since for some reason it wasn't there. Didn't change anything. Checking the services. I got the following.


┌──(luca@lenovo-ideapad-14are05)-[~]
└─$ systemctl status systemd-hibernate-resume.service 
○ systemd-hibernate-resume.service - Resume from hibernation
     Loaded: loaded (/usr/lib/systemd/system/systemd-hibernate-resume.service; static)
     Active: inactive (dead)
       Docs: man:systemd-hibernate-resume.service(8)
                                                                                                               
┌──(luca@lenovo-ideapad-14are05)-[~]
└─$ systemctl status systemd-hibernate-clear.service 
○ systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info
     Loaded: loaded (/usr/lib/systemd/system/systemd-hibernate-clear.service; static)
     Active: inactive (dead)
  Condition: start condition unmet at Tue 2024-09-24 18:47:18 PDT; 4min 28s ago
             └─ ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d8760>
       Docs: man:systemd-hibernate-clear.service(8)

Sep 24 18:47:18 lenovo-ideapad-14are05 systemd[1]: Clear Stale Hibernate Storage Info was skipped because of a>
...skipping...
○ systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info
     Loaded: loaded (/usr/lib/systemd/system/systemd-hibernate-clear.service; static)
     Active: inactive (dead)
  Condition: start condition unmet at Tue 2024-09-24 18:47:18 PDT; 4min 28s ago
             └─ ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d8760>
       Docs: man:systemd-hibernate-clear.service(8)

Sep 24 18:47:18 lenovo-ideapad-14are05 systemd[1]: Clear Stale Hibernate Storage Info was skipped because of a>

Offline

#6 2024-09-25 12:52:27

Neroman
Member
Registered: 2024-09-13
Posts: 21

Re: Putting laptop to sleep causes it to turn off

godpraisearch wrote:

Sep 24 18:47:18 lenovo-ideapad-14are05 systemd[1]: Clear Stale Hibernate Storage Info was skipped because of a>
...skipping...

This seems like efivars don't see your swap. The output is cutted, it would be good to see logs.

sudo journalctl -b | grep hibernate

Did you regenerated initramfs?

sudo mkinitcpio -P

But which one type of suspend do you want to use? https://wiki.archlinux.org/title/Power_ … hibernate#
If you want only classic suspend to RAM after closing the lid - you don't need configure or fix hibernation and even 'resume' hook.
There you can check available suspend methods for you hardware https://wiki.archlinux.org/title/Power_ … end_method

cat /sys/power/mem_sleep

If you want also to use hibernate (fully turning off laptop with saved state) you need to get to know why it doesn't let you to use it. Check journalctl with command above.
Also I saw your swap partition is zram type. And after update config maybe got deleted, idk. https://wiki.archlinux.org/title/Power_ … _with_zram
https://wiki.archlinux.org/title/Zram

Offline

#7 2024-09-27 01:46:44

godpraisearch
Member
Registered: 2022-04-21
Posts: 52

Re: Putting laptop to sleep causes it to turn off

sudo mkinitcpio -P

Didn't seem to change anything.

sudo journalctl -b | grep hibernate

Outputs nothing.

cat /sys/power/mem_sleep

Returns [s2idle]

Offline

#8 2024-10-04 00:18:59

godpraisearch
Member
Registered: 2022-04-21
Posts: 52

Re: Putting laptop to sleep causes it to turn off

So I have able to fix the issue by changing from kernel from linux-zen to linux-lts. I had this problem like a 2 years ago with linux-lts and switching to zen fixed it. I guess its the other way around now. If someone can change this thread to solved to tell me how, I would appreciate it.

Last edited by godpraisearch (2024-10-04 00:21:20)

Offline

Board footer

Powered by FluxBB