Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

How do I sleep?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
leyvi
l33t
l33t
Posts: 718
Joined: Fri Sep 08, 2023 1:22 pm

How do I sleep?

  • Quote

Post by leyvi » Wed Nov 05, 2025 2:29 pm

There seems to be a lot of different options for Suspend to RAM, and I don't know which to choose. What do you guys use?
Top
sublogic
Guru
Guru
User avatar
Posts: 388
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

Re: How do I sleep?

  • Quote

Post by sublogic » Thu Nov 06, 2025 1:34 am

leyvi wrote:There seems to be a lot of different options for Suspend to RAM, and I don't know which to choose. What do you guys use?
I just close the laptop lid :mrgreen:

(Okay, I had to enable it in xfce. Menu --> Applications --> Settings --> Power Manager --> "System" tab. Other desktops must have similar functionality.)

From the command line, loginctl suspend also works. I avoid writing directly to /sys/power/state behind the desktop's back, but it should work too.
The practical unit of "Learning Experience" is the milli-Gentoo.
Top
leyvi
l33t
l33t
Posts: 718
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Thu Nov 06, 2025 7:31 am

I'm asking because I have an extremely minimal install (WM only, no DE), and use OpenRC.
Top
leyvi
l33t
l33t
Posts: 718
Joined: Fri Sep 08, 2023 1:22 pm

Re: How do I sleep?

  • Quote

Post by leyvi » Thu Nov 06, 2025 7:33 am

sublogic wrote:From the command line, loginctl suspend also works. I avoid writing directly to /sys/power/state behind the desktop's back, but it should work too.
loginctl is elogind, right?
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

Re: How do I sleep?

  • Quote

Post by GDH-gentoo » Thu Nov 06, 2025 12:55 pm

leyvi wrote:loginctl is elogind, right?
Yes, it's a program from the elogind package.

Answering "by getting in bed" is soooo tempting.
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Thu Nov 06, 2025 1:52 pm

The extreme minimalist sleeps by having root write mem to /sys/power/state. Most people won't like that, since it puts the kernel into S3 without giving user processes a chance to react, so your screen doesn't lock on the way down, daemons don't go into an idle state, etc. The slightly less minimal approach is for root to use sys-power/hibernate-script, which is a massive shell script with hooks to handle many of the common pre-sleep steps, and which will enter S3 (or S5, depending on configuration) once the pre-sleep steps are done.

Separately, you could arrange for the ACPI daemon to map lid close, power button tapped, or similar events into doing one of the above methods. That would allow a physically present user to initiate sleep without needing a logged in shell.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic