Introduction:

My laptop is shutting down suddenly — a Dell XPS 17 with Fedora Linux distro installed on it. So, no Windows is installed on my Dell XPS 17.

Problem analysis:

Wanted solution:

What I want is something like a MacBook. So around 5% it should go to sleep mode, it should not lose data, it should start quickly, and my laptop should not die during sleep mode.


Theory Recap:

<aside> 💡

There are different types of power states in the Linux power management system.


🧠 What do we call them in Linux?

They are part of the Linux sleep states or power-saving states, managed by:

They all fall under the umbrella of:

Power Management or Sleep States


🎯 The actual names in Linux:

Power State Name systemctl Command Description
Suspend to RAM systemctl suspend "Sleep" — stores in RAM, uses low power
Suspend to Disk systemctl hibernate "Hibernate" — stores to disk, no power
Suspend Hybrid systemctl hybrid-sleep "HybridSleep" — both RAM and disk

🧠 Is there a “Hibernate ecosystem”?

Not officially — the term “hibernate” refers specifically to:

So while HybridSleep uses Hibernate underneath (as a fallback), it's a separate mode.


✅ So what are they part of?

All of these are part of Linux's:

🔧 Power Management System — specifically sleep states (called S-states in ACPI: S3, S4)

If you want to group them under one umbrella, call them:


Let me know if you want a chart of which laptop models support which sleep modes on Linux — especially Dell XPS.

</aside>

<aside> 💡

✅ What is UPower?

UPower is a user-space power management service used in most modern Linux desktops (GNOME, KDE, etc.).

It doesn't put the system to sleep directly, but it:

UPower is like the battery supervisor. It watches your power level and says: “Okay, we're at 5%, time to hibernate.”


🧠 How does it relate to Hibernate, Suspend, HybridSleep?

UPower doesn’t perform sleep itself — it tells systemd what to do.

For example:

  1. Battery hits PercentageAction=8

  2. UPower says: "We're low. Action = Hibernate"

  3. UPower calls:

    
    systemctl hibernate
    

So UPower is not the engine, but the manager that decides when the engine should be used.


🔧 Key Components in Linux Power Management

Component Role
Kernel Low-level sleep/resume operations (actual S3/S4/S5 states)
systemd Executes suspend/hibernate (systemctl suspend, etc.)
UPower Watches battery, triggers systemd actions
logind Tracks user sessions, also helps with suspend/lock policies
GRUB + Initramfs Required for hibernation to resume properly from swap
BIOS/UEFI Controls hardware support for suspend states (S3/S4/S0ix)

🧰 Other important UPower settings in /etc/UPower/UPower.conf

You already saw some, but here are the key ones:

Option Meaning
UsePercentageForPolicy=true Use battery percentage instead of time
PercentageLow=20 When to warn user (low battery)
PercentageCritical=8 When to prepare action
PercentageAction=8 When to trigger suspend/hibernate
CriticalPowerAction=HybridSleep Action to take: Suspend, Hibernate, HybridSleep, PowerOff, Ignore
AllowRiskyCriticalPowerAction=true Required if using Suspend as critical action

Summary (How it All Fits Together)