You are not logged in.

#1 2012-12-02 17:52:02

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 812

systemd hybrid-sleep not working

Hi!
Today i finally tried out (only for curiosity) hybrid-sleep, and i discovered it is not working.
I'm not using testing repo. So, systemd 196 should be able to hybrid-sleep.
First problem: i need to put my password to hybrid-sleep, while for suspend and hibernate that is not necessary.
Second problem: as far as i understand, hybrid-sleep should be a normal suspend, but in background the netbook should suspend to disk too, in event of lack of energy. Is this correct? Well, on my netbook, it only hibernates, as if i did a "systemctl hibernate".

journalctl
dic 02 18:48:33 arch systemd-sleep[4421]: Hibernating and suspending system...
dic 02 18:49:09 arch systemd-sleep[4421]: System thawed.

But it is not "hibernating and suspending", it is only hibernated.
By the way, i'm not using pm-utils.
Any hint?
Thanks!

Offline

#2 2012-12-16 22:01:18

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 63
Website

Re: systemd hybrid-sleep not working

I can reproduce this behaviour with systemd-196-2. systemctl hybrid-sleep just hibernates and powers off. Further investigation of this issue brought the following issues:

  • systemctl suspend works as expected.

  • systemctl hibernate works also.

  • Disabling hibernation (by disabling the swap and resume partition) leads to suspend to ram with the hybrid-sleep command.

  • Circumventing systemd does the job and correctly hibernates AND suspends:

    echo suspend > /sys/power/disk; echo disk > /sys/power/state

So I guess the kernel part of hybrid-sleep and the hardware work correctly and somehow the systemd-hybrid-sleep.service does not work. The service file has the line:

ExecStart=/usr/lib/systemd/systemd-sleep hybrid-sleep

which seems to be the relevant command.

Offline

#3 2012-12-16 22:10:02

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 812

Re: systemd hybrid-sleep not working

systemctl suspend/hibernate works here too.
Everything seems ok...but hybrid-sleep won't work.
I guess there could be a problem in the /usr/lib/systemd/systemd-sleep command. And then this is an upstream bug. But two users reporting it are too few. We need more feedbacks!
EDIT: another thing: i can suspend/hibernate as normal user, but i need to launch hybrid-sleep by root user. Don't understand why.
EDIT2: without using TOI to hibernate, with the in-kernel hibernate function, it seems to magically work! You made no references to TOI, so i guess you're not using it, are you? Check it.

Last edited by nierro (2012-12-16 22:13:01)

Offline

#4 2012-12-18 08:56:40

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 812

Re: systemd hybrid-sleep not working

For the first "EDIT" problem, i asked on systemd-devel ml, and yesterday appeared a patch to fix that. So that problem should be gone as systemd 197 is released.

Offline

#5 2012-12-18 10:18:24

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 63
Website

Re: systemd hybrid-sleep not working

nierro wrote:

EDIT2: without using TOI to hibernate, with the in-kernel hibernate function, it seems to magically work! You made no references to TOI, so i guess you're not using it, are you? Check it.

I guess you mean TuxOnIce? No I don't use it.

Offline

#6 2012-12-18 10:53:23

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 63
Website

Re: systemd hybrid-sleep not working

I tested it on another piece of hardware (a HP dc7900 workstation) and systemd hybrid-sleep works as expected.

As I don't have the laptop (where systemd hybrid-sleep does not work, only hibernates) with me, the following difference wrt installed packages comes to my mind:
This workstation does not have laptop-mode-tools installed, but the laptop has it. I will remove laptop-mode-tools tomorrow to see if it makes any difference...

EDIT: Testing it the other way round, installing and enabling laptop-mode-tools and acpid on the workstation makes no difference. systemd hybrid-sleep still works. Hm.

Last edited by demaio (2012-12-18 11:06:07)

Offline

#7 2012-12-18 11:27:10

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 812

Re: systemd hybrid-sleep not working

Uhm, yes i meant TuxOnIce.
By the way, it sounds quite strange to me that laptop-mode-tools won't let your system hybrid-sleep, but you should try disabling it.
Let us know!

Offline

#8 2012-12-31 10:03:45

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 63
Website

Re: systemd hybrid-sleep not working

I narrowed down the problem a little bit:

It does not matter which computer I use. It just matters if I have the machine running on battery or on mains adapter. So there are two situations left:

  • When running on battery (ca. 90% charged): systemctl hybrid-sleep hibernates and powers off (no suspend)

  • When running on mains: systemctl hybrid-sleep hibernates and suspends correctly. If I power on with mains still connected, the computer resumes from RAM. If I disconnect the power, it resumes from hibernation. Everything ok.

Now I have no clue where to look further for debugging this issue.

Offline

#9 2012-12-31 10:08:57

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 812

Re: systemd hybrid-sleep not working

I guess you should tell on systemd ml that problem, you'll probably get better help.

Offline

Board footer

Powered by FluxBB