• Uncategorized

About linux : Pop-OS-Dell-XPS-9310—-battery-drained-overnight-on-suspend

Question Detail

My laptop is suspending on lid close successfully, but if I don’t have it plugged in overnight, the battery is drained by the morning.

I’m including logs from a short suspend I ran just now. I can suspend it overnight and look at the logs afterward, but is there anything immediately suspicious here? I validated that all suspend-related targets are loaded via sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target

Apr 11 22:09:29 pop-os systemd[1]: Reached target Sleep.
Apr 11 22:09:29 pop-os systemd[1]: Starting Suspend...
Apr 11 22:09:29 pop-os kernel: [   44.986190] PM: suspend entry (s2idle)
Apr 11 22:09:29 pop-os systemd-sleep[3730]: Suspending system...
Apr 11 22:09:29 pop-os kernel: [   44.991600] Filesystems sync: 0.005 seconds
Apr 11 22:09:57 pop-os kernel: [   44.994638] Freezing user space processes ... (elapsed 0.002 seconds) done.
Apr 11 22:09:57 pop-os kernel: [   44.996920] OOM killer disabled.
Apr 11 22:09:57 pop-os kernel: [   44.996921] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Apr 11 22:09:57 pop-os kernel: [   44.998055] printk: Suspending console(s) (use no_console_suspend to debug)
Apr 11 22:09:57 pop-os kernel: [   45.315954] psmouse serio1: Failed to disable mouse on isa0060/serio1
Apr 11 22:09:57 pop-os kernel: [   46.377203] ACPI: EC: interrupt blocked
Apr 11 22:09:57 pop-os kernel: [   72.605807] ACPI: EC: interrupt unblocked
Apr 11 22:09:57 pop-os kernel: [   73.107660] pcieport 10000:e0:06.0: can't derive routing for PCI INT A
Apr 11 22:09:57 pop-os kernel: [   73.107666] nvme 10000:e1:00.0: PCI INT A: no GSI
Apr 11 22:09:57 pop-os kernel: [   73.114494] nvme nvme0: 8/0/0 default/read/poll queues
Apr 11 22:09:57 pop-os kernel: [   73.363725] OOM killer enabled.
Apr 11 22:09:57 pop-os kernel: [   73.363728] Restarting tasks ... 
Apr 11 22:09:57 pop-os kernel: [   73.364154] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
Apr 11 22:09:57 pop-os kernel: [   73.367166] done.
Apr 11 22:09:57 pop-os touchegg[1000]: libinput error: event0  - Lid Switch: client bug: event processing lagging behind by 1279ms, your system is too slow
Apr 11 22:09:57 pop-os /usr/libexec/gdm-x-session[1823]: (II) modeset(0): EDID vendor "SHP", prod id 5370
Apr 11 22:09:57 pop-os /usr/libexec/gdm-x-session[1823]: (II) modeset(0): Printing DDC gathered Modelines:
Apr 11 22:09:57 pop-os /usr/libexec/gdm-x-session[1823]: (II) modeset(0): Modeline "3840x2400"x0.0  592.50  3840 3888 3920 4000  2400 2403 2409 2469 -hsync -vsync (148.1 kHz eP)
Apr 11 22:09:57 pop-os /usr/libexec/gdm-x-session[1823]: (II) modeset(0): Modeline "3840x2400"x0.0  474.00  3840 3888 3920 4000  2400 2403 2409 2469 -hsync -vsync (118.5 kHz e)
Apr 11 22:09:57 pop-os systemd-sleep[3730]: System resumed.
Apr 11 22:09:57 pop-os bluetoothd[961]: Controller resume with wake event 0x0
Apr 11 22:09:57 pop-os kernel: [   73.413202] PM: suspend exit
Apr 11 22:09:57 pop-os systemd[1]: systemd-suspend.service: Succeeded.
Apr 11 22:09:57 pop-os systemd[1]: Finished Suspend.
Apr 11 22:09:57 pop-os systemd[1]: Stopped target Sleep.
Apr 11 22:09:57 pop-os systemd[1]: Reached target Suspend.
Apr 11 22:09:57 pop-os systemd[1]: Stopped target Suspend.
Apr 11 22:09:57 pop-os NetworkManager[968]: <info>  [1649729397.3461] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Apr 11 22:09:57 pop-os NetworkManager[968]: <info>  [1649729397.3461] device (wlp113s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Apr 11 22:09:57 pop-os ModemManager[1079]: <info>  [sleep-monitor] system is resuming
Apr 11 22:09:57 pop-os NetworkManager[968]: <info>  [1649729397.4258] manager: NetworkManager state is now DISCONNECTED

Question Answer

The hardware on this system only supports s2idle sleep, and not deep sleep for less energy consumption (details on different sleep states here https://www.kernel.org/doc/Documentation/power/states.txt).

pop-os:$~ sudo cat /sys/power/mem_sleep 
[s2idle]

I found this thread: https://www.dell.com/community/XPS/XPS-13-9310-Ubuntu-deep-sleep-missing/td-p/7734008 It suggests changing the disk management from RAID (Dell’s default) to AHCI via the Dell BIOS.

So far this has worked for a solution! I’ve lost only 10% battery overnight, and can go 3 days idling in suspend without a charge.

(Before this, I did try enabling hibernate through these instructions from System76 https://support.system76.com/articles/enable-hibernation/. This does not work great, because the Killer wifi driver does not load on wake from hibernate.)

Suspend ( considering hybrid suspend ), the machine’s state is stored in swap space and suspend via RAM (aka sleep) is invoked. This caused for minimal utilisation of power.

Reason to do so : wake up from hibernate is slower than wakeup from sleep. So to ensure system state is not lost, machine’s state is stored in swap space and sleep is invoked that uses minimal power and does not shut off the machine. Machine’s state is stored in RAM. If battery does not die, wake up happens from RAM which is faster.
Read More : https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

In case you want your battery to not die or drain, switch your lid close action from sleep/suspend to hibernate. Hibernate has zero power consumption. Follow the steps mentioned below.

$ grep HandleLidSwitch /etc/systemd/logind.conf 
HandleLidSwitch=suspend

If the line is commented, please uncomment by removing “#” and change option to hibernate.

HandleLidSwitch=hibernate

If you are new to Linux, please use gedit command to edit the file.

sudo gedit /etc/systemd/logind.conf

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.