Boosting Battery Life on Dell XPS 9300 With Linux by Activating S3 Deep Sleep

When I recently set up my Dell XPS 9300 with Linux, the experience was smooth, right out of the box. It’s evident that Linux support has come a long way, especially when you venture outside of the ‘officially’ supported distros like Ubuntu. But there was one little snag: battery life. By default, my laptop was set to S2 sleep mode, which, while effective, can be a bit taxing on the battery. In my quest for more efficient power management, I switched over to S3 “deep sleep”. Let me share how.

What’s the Difference?

  • S2 Sleep: This is a light sleep mode, which means most of the device’s operations are still running in the background. Hence, it consumes more power.

  • S3 Deep Sleep: As the name suggests, it’s a deep sleep mode. Most of the device’s operations are suspended, making it a lot more energy-efficient.

Step-by-step Guide to Activate S3 Deep Sleep

  1. Check Current Sleep Mode: First, let’s ascertain which sleep mode your device is currently set to. Run the command:

    > $ cat /sys/power/mem_sleep 

    If it returns [s2idle] deep, it means it’s set to S2.

  2. Modify the Grub Configuration:

    • Open the grub config file located at /etc/default/grub.
    • Add the following line to it:
    • This ensures that S3 deep sleep is set as the default sleep mode.
  3. Generate a New Grub Configuration: Execute this command to generate a fresh grub configuration:

    sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
  4. Validate the Change:

    • After you’ve rebooted your laptop, validate if the change has taken effect.
    • Run the command:
      > $ cat /sys/power/mem_sleep
    • If the output is s2idle [deep], congratulations! Your laptop is now set to S3 deep sleep.

Final Words

It’s always a delight to make small tweaks that optimize the performance and longevity of our gadgets. Remember, while this guide is tailored for the Dell XPS 9300, the process might work for other models with slight modifications. Always ensure you have backups and you understand the changes you’re making to your system. Here’s to a longer-lasting battery and a smoother Linux experience!