You are not logged in.

#1 2012-11-14 11:26:20

j0lly
Member
From: ~Milan
Registered: 2011-08-16
Posts: 49

Systemctl suspend drain too much battery on sleep

Hello everybody,

I moved to systemd few times ago with a very good result in term of cleaning//system speed and so on, but i noticed that the suspend function from systemd drain a lot of power during sleep.
I can't debug right now (no more pm-utils) maybe is just a feeling (also because ai swhitched from a macbook to a samsung ultrabook in almost same period of the systemd swhitch) but i notice a heavy battery drain on sleep. I can say with my macbook the battery was lasting days with less 10% battery on sleep while with my new laptop it can't survive a night on 5/10% battery suspention.

How can i track it and what can be? if the laptop suspend, how it is possible that "drain power" more than the necessary? can some process still alive while laptop is sleeping???

the samsung battery is bigger that the macbook (because macbook lost a lot of mah down to 75%) and the system while asleep is less the half the consumption of the macbook in terms of Watts (powertop).

Thanks for any hints

P.S.
srty for my english


...why not

Offline

#2 2012-11-14 14:42:51

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Systemctl suspend drain too much battery on sleep

Different systems; different batteries; suspending to RAM when battery is below the safe zone for suspending to RAM; no attempt to debug any of this; one battery seems to have both more and less consumption than the other; you haven't made any connection to systemd, but bring it up anyway; you admit it all might be "just a feeling."   

What is it you're expecting here?  Even if your macbook "was lasting days with less [than] 10% battery on sleep" you would barely be able to use it upon resuming anyway, nevermind how the Samsung is doing (this is like complaining that your car's engine won't idle through the night, and then drive you to the next town in the morning, on 5% fuel in the tank.  Just turn the engine off). There's no useful information here at all.  At least make an attempt to figure out what you think the culprit might be, before opening a thread like this.  You haven't mentioned if you even bothered testing if the same thing happens on a full battery, which would be the proper reaction to your "observation."

Offline

#3 2012-11-14 15:04:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Systemctl suspend drain too much battery on sleep

I think you should set up a script in system-sleep to record time and remaining power on every sleep/wake.  Get that going, and then maybe figure out some other metrics that might be of value to also record when it goes to sleep.  Like maybe how much ram is being used, system load, etc.  Not that I think any of this will make a damn bit of difference for reasons ANOKNUSA has already pointed out, but if you want to find out what kind of power consumption is being used during sleep, this would probably be a decent way to log stuff.

In the end, I think this comes down to a hardware issue.  It all depends on how your hardware handles the S3.  I will also reiterate what ANOKNUSA stated above... different hardware; different batteries!

Offline

#4 2012-11-16 09:22:21

j0lly
Member
From: ~Milan
Registered: 2011-08-16
Posts: 49

Re: Systemctl suspend drain too much battery on sleep

ANOKNUSA,

WonderWoofy wrote:

think you should set up a script in system-sleep to record time and remaining power on every sleep/wake.  Get that going, and then maybe figure out some other metrics that might be of value to also record when it goes to sleep.  Like maybe how much ram is being used, system load, etc.  Not that I think any of this will make a damn bit of difference for reasons ANOKNUSA has already pointed out, but if you want to find out what kind of power consumption is being used during sleep, this would probably be a decent way to log stuff.

That's exacly what i was expecting from my post.

I'll be back after some debug,
Thanks

~J0lly


...why not

Offline

#5 2013-01-29 10:15:59

eruditorum
Member
Registered: 2012-11-12
Posts: 130

Re: Systemctl suspend drain too much battery on sleep

I have the same problem here.
My samsung laptop's battery in S3 sleep lasts much longer in Windows than in Linux.

According to logs, it seems that not all CPUs are shut down when entering S3 (CPU1 is off, but nothing is said about CPU0!):

[35079.564318] PM: Syncing filesystems ... done.
[35079.927678] PM: Preparing system for mem sleep
[35080.005525] Freezing user space processes ... (elapsed 0.01 seconds) done.
[35080.018419] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[35080.031739] PM: Entering mem sleep
[35080.031841] Suspending console(s) (use no_console_suspend to debug)
[35080.058912] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[35080.059209] sd 0:0:0:0: [sda] Stopping disk
[35080.694103] PM: suspend of devices complete after 662.768 msecs
[35080.694508] PM: late suspend of devices complete after 0.401 msecs
[35080.747292] PM: noirq suspend of devices complete after 52.858 msecs
[35080.747953] ACPI: Preparing to enter system sleep state S3
[35080.779127] PM: Saving platform NVS memory
[35080.780560] Disabling non-boot CPUs ...
[35080.883651] smpboot: CPU 1 is now offline
[35080.884208] Extended CMOS year: 2000
[35080.885751] ACPI: Low-level resume complete
[35080.885791] PM: Restoring platform NVS memory
[35080.886175] Extended CMOS year: 2000
[35080.886234] Enabling non-boot CPUs ...
[35080.889714] smpboot: Booting Node 0 Processor 1 APIC 0x2
[35080.900482] Initializing CPU#1
[35080.904198] CPU1 is up
[35080.908565] ACPI: Waking up from system sleep state S3
[35081.089917] PM: noirq resume of devices complete after 94.388 msecs
[35081.090223] PM: early resume of devices complete after 0.262 msecs
[35081.090331] i915 0000:00:02.0: setting latency timer to 64
[35081.090613] mei 0000:00:16.0: irq 42 for MSI/MSI-X
[35081.090676] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[35081.090773] snd_hda_intel 0000:00:1b.0: irq 44 for MSI/MSI-X
[35081.090870] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[35081.090900] ahci 0000:00:1f.2: setting latency timer to 64
[35081.091035] iwlwifi 0000:01:00.0: RF_KILL bit toggled to enable radio.
[35081.091662] mei 0000:00:16.0: wd: failed to find the client
[35081.105002] Extended CMOS year: 2000
[35081.191350] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[35081.431547] ata5: SATA link down (SStatus 0 SControl 300)
[35083.924553] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[35084.128116] ata1.00: failed to get Identify Device Data, Emask 0x1
[35084.130129] ata1.00: failed to get Identify Device Data, Emask 0x1
[35084.130139] ata1.00: configured for UDMA/133
[35084.130543] sd 0:0:0:0: [sda] Starting disk
[35084.147727] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S
[35084.154466] iwlwifi 0000:01:00.0: Radio type=0x2-0x2-0x1
[35084.479794] PM: resume of devices complete after 3394.609 msecs
[35084.480466] PM: Finishing wakeup.
[35084.480469] Restarting tasks ... done.
[35084.483713] video LNXVIDEO:00: Restoring backlight state

Also wondering on what is this misterious MEI...

UPDATE: now enabled Hyper-Threading in BIOS. Still nothing about CPU0 switching off, system only puts CPU{1,2,3} to sleep.

Last edited by eruditorum (2013-01-29 10:45:25)

Offline

#6 2013-01-29 11:55:44

snakeroot
Member
Registered: 2012-10-06
Posts: 164

Re: Systemctl suspend drain too much battery on sleep

eruditorum wrote:

Also wondering on what is this misterious MEI...

MEI (for Management Engine Interface) is an Intel-specific hardware monitoring and remote management interface, for which "mei" is the driver. I've never been able to get it to work.

More info available here: from Intel and a Debian user

Additional utilities and downloads from Intel

tl;dr you don't need it, don't worry about it.

Last edited by snakeroot (2013-01-29 11:56:59)

Offline

#7 2013-01-29 22:12:15

eruditorum
Member
Registered: 2012-11-12
Posts: 130

Re: Systemctl suspend drain too much battery on sleep

Does anybody know how to minimize battery usage in Linux during S3 sleep (I mean shut down all devices except for RAM)?

Offline

#8 2013-02-06 13:38:20

eruditorum
Member
Registered: 2012-11-12
Posts: 130

Re: Systemctl suspend drain too much battery on sleep

Discharge speed is about 1%/h

Offline

#9 2013-04-08 06:02:53

Neky
Member
Registered: 2010-05-18
Posts: 38

Re: Systemctl suspend drain too much battery on sleep

eruditorum wrote:

Discharge speed is about 1%/h

I've had the same discharge rate about a month ago. Now, after several full-system updates it kinda doubled. Last night it went from 52% to 26% in less than 12 hours. I would gladly confirm this with some monitoring script, if I knew how to setup something like that.

Offline

#10 2013-04-08 09:34:28

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Systemctl suspend drain too much battery on sleep

It is highly unlikely that systemd would influence this. How fast your power is drained depends on the hardware and possibly on the kernel.

That said, if you can do some measurements with exactly the same hardware/software installed and compare suspend via pm-utils with suspend via systemd, and show there is a problem, that would be interesting.

Offline

Board footer

Powered by FluxBB