You are not logged in.

#1 2023-03-25 02:00:11

orlfman
Member
Registered: 2007-11-20
Posts: 145

[solved]sleep causes the computer to shutdown

so a few times while trying to wake my computer up from sleep, it just shuts down instead. this isn't something that's a linux problem, as i had this problem with windows too (along with my intel 2.5g driver on windows sometimes causing a BSOD when going to sleep mode). i figured its a acpi issue. but i wonder if it shutting down while trying to wake from sleep mode can cause any problems? like corruption? i figured its probably minimal if any since it was already asleep? i just don't know if i should reinstall arch linux again and avoid sleep all together.
specs
arch linux only (i got rid of windows)
intel 13700kf
msi z690 edge wifi ddr5 (latest bios)
64gb ddr5
amd 6900 xt
corsair rmx 1000 (2021 version)

edit:
solved by enabling wake from usb event to use my keyboard to wake. it was my power button causing the shutdowns.

Last edited by orlfman (2023-03-28 02:16:28)

Offline

#2 2023-03-25 07:35:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [solved]sleep causes the computer to shutdown

"Shuts down" how?
Do you get a clean shutdown where the journal is flushed (and records the shutdown) etc. or does the system simply power off?
In the latter case, check smartctl whether the emergency power off increases w/ those incidents (not a problem w/ SSDs) and in any event you want to sync the fiesystems before sleeping the system to prevent data loss.

A remaining risk is that something™ might be continuously writing a (large) file, leaving it inconsistent in case of effectively crashing (eg. downloads, but pot. also databases)

Did you check for a BIOS/UEFI/firmware update?

Offline

#3 2023-03-25 15:29:54

orlfman
Member
Registered: 2007-11-20
Posts: 145

Re: [solved]sleep causes the computer to shutdown

seth wrote:

"Shuts down" how?
Do you get a clean shutdown where the journal is flushed (and records the shutdown) etc. or does the system simply power off?
In the latter case, check smartctl whether the emergency power off increases w/ those incidents (not a problem w/ SSDs) and in any event you want to sync the fiesystems before sleeping the system to prevent data loss.

A remaining risk is that something™ might be continuously writing a (large) file, leaving it inconsistent in case of effectively crashing (eg. downloads, but pot. also databases)

Did you check for a BIOS/UEFI/firmware update?

yeah by shutdown i mean a complete power off. the last thing journal shows is going into sleep. like this:

Mar 24 11:18:50 linux64 systemd[1]: Reached target Sleep.
Mar 24 11:18:50 linux64 systemd[1]: Starting System Suspend...
Mar 24 11:18:50 linux64 systemd-sleep[4402]: Entering sleep state 'suspend'...
Mar 24 11:18:50 linux64 kernel: PM: suspend entry (deep)

it goes into sleep mode but when i press the power button to turn it back on, there's a chance it just power's off instead. i am running the latest bios for my motherboard. as i noted i had the same issue with windows too. knowing it could cause data loss now i'm going to avoid sleep all together and just do a normal shutdown when i'm done.

i do have another question.. could the power button be doing it? the power button on my case has the ability to do a complete power off if you hold the button long enough. i wonder if its "user error" perhaps? maybe i'm holding the button for to long or pressing it just right to trigger that.

Last edited by orlfman (2023-03-25 15:32:38)

Offline

#4 2023-03-25 15:42:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [solved]sleep causes the computer to shutdown

cat /sys/power/mem_sleep

Setting that to s2idle *might* help you to save *some* battery.

could the power button be doing it?

Can't you wake the system by any other means?

cat /proc/acpi/wakeup

Offline

#5 2023-03-27 02:59:40

orlfman
Member
Registered: 2007-11-20
Posts: 145

Re: [solved]sleep causes the computer to shutdown

seth wrote:
cat /sys/power/mem_sleep

Setting that to s2idle *might* help you to save *some* battery.

could the power button be doing it?

Can't you wake the system by any other means?

cat /proc/acpi/wakeup

the only thing that ever has worked is pressing the power button to exit sleep mode. even on windows.
edit:
so thinking about it i checked out my bios and saw it had wake from USB event disabled by default. so i enabled that and now pressing any key on my keyboard wakes from sleep. i'll give that a try to see if its just confusion with the power button. i also ordered a new power button for my case as well. always wanted a new one anyways. grown tired of the red led light lol.

Last edited by orlfman (2023-03-27 03:17:44)

Offline

#6 2023-03-27 03:41:00

orlfman
Member
Registered: 2007-11-20
Posts: 145

Re: [solved]sleep causes the computer to shutdown

hope i'm not being premature but i think wake from USB event "fixed" it. so far putting my computer to sleep 20 times and using my keyboard to wake has worked 100% of the time.

Offline

Board footer

Powered by FluxBB