How to Stop Your Ubuntu Laptop Draining Battery While Asleep

Closing your Ubuntu laptop lid at 90% battery before tossing it into a backpack, only to open it the next morning to a warm chassis and 12% battery remaining, is one of the most notorious Linux laptop complaints. Modern laptops frequently default Ubuntu to lightweight s2idle (Modern Standby) rather than genuine hardware deep (S3) sleep – leaving the CPU, Wi-Fi chip, NVMe SSD, or USB ports drawing steady power all night.

Step 1: Check Which Sleep Mode Ubuntu Is Currently Using (Takes 5 Seconds)

Linux displays both supported sleep states and the currently active default in one read-only system file.

  1. Open Terminal by pressing Ctrl + Alt + T.
  2. Run:
    cat /sys/power/mem_sleep
  3. Read the bracketed word in the output:
    • If it prints [s2idle] deep, your laptop supports true hardware deep S3 sleep yet Ubuntu defaulted to power-hungry s2idle!
    • If it prints s2idle [deep], your system already tries to use S3 deep sleep, meaning a USB peripheral or Nvidia driver is waking it up repeatedly overnight.
    • If it prints only [s2idle] with no deep option listed, your laptop’s UEFI BIOS only exposes Modern Standby to operating systems (check BIOS for a Sleep State: Linux / S3 toggle first).

Step 2: Switch Default Sleep Mode From s2idle to Deep (S3) Sleep

Whenever deep appears beside [s2idle] in the check above, telling the kernel to prefer mem_sleep_default=deep typically cuts overnight battery drain from 20%+ down to 1-2%.

  1. Test deep sleep safely for one night first without permanent edits, or configure it in GRUB:
    sudo nano /etc/default/grub
  2. Find GRUB_CMDLINE_LINUX_DEFAULT (for example, "quiet splash") and add mem_sleep_default=deep inside the quotes:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
  3. Press Ctrl + O, Enter, and Ctrl + X to save and exit nano.
  4. Apply the updated bootloader settings:
    sudo update-grub
  5. Reboot Ubuntu and run cat /sys/power/mem_sleep again to verify [deep] is now bracketed.

Step 3: Check BIOS Firmware for “Sleep State: Linux” and Wake-on-USB

Many ThinkPad, Dell Latitude, and HP EliteBook laptops ship from the factory set to Windows 10/11 Modern Standby, hiding deep S3 mode from Ubuntu until you flip one switch in BIOS setup (press F1, F2, or F12 on boot > Power / Config > set Sleep State from Windows and Linux to Linux S3). While there, also disable Always On USB / Charge in Sleep if plugged-in dongles or mouse receivers keep drawing current after lid close.

Step 4: Install TLP and Confirm No Wake Device Keeps Pinging the System

If your laptop uses pure s2idle with zero BIOS S3 option available, tightening background power rails helps markedly:

  • Check cat /proc/acpi/wakeup to see which devices (such as XHC USB controllers or Bluetooth) are marked *enabled to wake the machine unexpectedly.
  • Review our guide on tuning Bluetooth and USB power settings cleanly in Ubuntu, and remember that unplugging external USB hubs or setting Power > Power Saver mode before closing the lid prevents unnecessary battery bleed on Modern-Standby-only hardware.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.