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.
<aside> 💡
There are different types of power states in the Linux power management system.
They are part of the Linux sleep states or power-saving states, managed by:
systemctl suspend
, hibernate
, etc.)They all fall under the umbrella of:
Power Management or Sleep States
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 |
Not officially — the term “hibernate” refers specifically to:
So while HybridSleep uses Hibernate underneath (as a fallback), it's a separate mode.
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> 💡
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:
gnome-power-manager
, upower -d
, and system trays/etc/UPower/UPower.conf
UPower is like the battery supervisor. It watches your power level and says: “Okay, we're at 5%, time to hibernate.”
UPower doesn’t perform sleep itself — it tells systemd what to do.
For example:
Battery hits PercentageAction=8
UPower says: "We're low. Action = Hibernate"
UPower calls:
systemctl hibernate
So UPower is not the engine, but the manager that decides when the engine should be used.
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) |
/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 |
systemctl suspend
, hibernate
, etc.systemd
handles actual sleep/hibernate logic