Article 6KJT1 How to add menu option or lid-close action to S0ix (sleep) laptop?

How to add menu option or lid-close action to S0ix (sleep) laptop?

by
ziphem
from LinuxQuestions.org on (#6KJT1)
Hello! I recently purchased a new laptop (13th Gen Intel), and for the life of me, could not figure out why it would not go to sleep when the lid was closed, and why the option to sleep or hibernate was nowhere to be found in the menu.

And now, after hours of time, I finally know more about S3 and S0ix than I ever wanted to know - but not enough to actually do anything of value.

Under /sys/power/mem_sleep, I have [s2idle].
Under /sys/power/state, I have freeze mem.

Ok, so I learned now I need to do either:
echo freeze | sudo tee /sys/power/state
or
echo mem | sudo tee /sys/power/state

to put this to sleep (haven't checked yet whether either stay asleep), with the latter reported to use less power.

However, neither option is listed in my Fedora 39 menu, and there's no sleep operation when I close my lid.

How am I able to accomplish either? It seems that Fedora doesn't recognize these options.

In addition, I notice that echo mem | sudo tee /sys/power/state does not lock the computer screen, which I guess makes sense since it's just a suspend command. I guess I have to do something like xdg-screensaver lock & echo mem | sudo tee /sys/power/state to provide basic protection.

Any help is greatly appreciated. Thank you!!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments