You are not logged in.

#1 2012-10-01 02:52:58

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Rtcwake is unable to wake my laptop while the lid is closed. As such, pm-suspend-hybrid suspends to memory and stays in ram-suspend indefinitely until I lift the lid, at which point the laptop resumes from ram-suspend and then suspends-to-disk. Is this expected behaviour of rtcwake? It seems that after a reboot rtcwake will occasionally function with the laptop lid closed, but this is rare. Hybrid-suspend used to work fine and has since been working only sporadically. Disabling acpid make no difference. I'm running ArchLinux (Liquorix kernel) on a Macbook Air 5,2 (2012 model). The default kernel behaves the same way.

~  » uname -a
Linux archbook 3.5.4-1-lqx #1 ZEN SMP PREEMPT Fri Sep 28 13:23:02 EST 2012 x86_64 GNU/Linux

Offline

#2 2012-10-01 02:56:11

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,900

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

do a search for logind.conf.

Offline

#3 2012-10-01 05:01:19

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Thanks Scimmia. I've tried "HandleLidSwitch=off", "HandleLidSwitch=ignore" and "LidSwitchIgnoreInhibited=no", none of which make any difference. Is this what you were suggesting? I think my issue might be different from this as the second suspend when I open the lid is not unexpected, I'd just like it to happen beforehand with the lid closed.

Ignoring acpid for a moment, even when I run a simple "sudo rtcwake -u -m mem -s 10" the laptop does not resume until the lid is opened.

Offline

#4 2012-10-01 05:14:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,749

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Are you running systemd?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#5 2012-10-01 05:23:56

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Sysvinit as far as I know. Systemd is installed though as per http://www.archlinux.org/news/systemd-t … aces-udev/.

Offline

#6 2012-10-01 05:34:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,749

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

You may want to look at this section of the systemd wiki.  I found that the defaults don't behave as one might expect.  Set your preferences (the ones you described in post 3) in that file, reboot, and see if it makes a difference


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#7 2012-10-01 05:36:19

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,900

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

ok, so you're setting up rtcwake without having it suspend the system, then issuing the suspend call yourself through pm-utils? Or do you have acpid watching the lid switch and calling pm-utils? I'm just trying to figure out the setup here.

Yes, I was talking about setting the "Handle" options to ignore in logind.conf. It's caused so many problems since the update to 190 that it was my first assumption.

Offline

#8 2012-10-01 05:52:17

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

ewaller wrote:

You may want to look at this section of the systemd wiki.  I found that the defaults don't behave as one might expect.  Set your preferences (the ones you described in post 3) in that file, reboot, and see if it makes a difference

Yes I have been editing /etc/systemd/logind.conf but unfortunately it has made no difference to whether rtcwake is able to wake up with the lid closed. Seeing as I am not using the systemd login manager (as far as I know - or was it an involuntary change when updating?) will editing logind.conf make any difference? I cannot seem to get the power button or lid switch to be handled by via logind.conf (not that I want to). I'm not sure how to go about temporarily disabling systemd to see if it is causing the problem as I'm not sure it's even running. All that seems to be running is udev.

~  » ps aux | grep systemd | grep -v grep
root      1214  0.0  0.0  25972  1520 ?        Ss   14:40   0:00 /usr/lib/systemd/systemd-udevd --daemon

As I mentioned I am still using sysvinit. I'm not sure what relation this issue has to systemd, save for it appearing around the time systemd-tools replaced udev.

Last edited by OhneHerren (2012-10-01 05:54:12)

Offline

#9 2012-10-01 05:58:44

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Scimmia wrote:

ok, so you're setting up rtcwake without having it suspend the system, then issuing the suspend call yourself through pm-utils? Or do you have acpid watching the lid switch and calling pm-utils? I'm just trying to figure out the setup here.

Yes, I was talking about setting the "Handle" options to ignore in logind.conf. It's caused so many problems since the update to 190 that it was my first assumption.

I have acpid watching the lid switch and calling pm-suspend-hybrid, which (used to) suspend-to-ram, wait 15 minutes, then resume briefly to suspend-to-disk. Now it is unable to resume with the lid closed and so doesn't suspend-to-disk until the lid is opened and the laptop resumes.

As I mentioned earlier a simple rtcwake command is unable to resume the laptop while the lid is closed (bypassing pm-utils), so the problem mightn't be with pm-utils itself.

Offline

#10 2012-10-01 17:53:08

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,900

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Not knowing anything about pm-suspend-hybrid, I went to the wiki to try to figure things out and came across this:

Note: suspend-hybrid is a placeholder right now -- it is not completely implemented

Could this be the problem? Doing some reading from the web, it sound like hybrid is supposed to write the data to disk like it would in hibernate, but then just suspends? If so, there have been some kernel side changes for this, being fully supported in 3.6. Maybe something changed in a late 3.5 build which broke your setup?

Last edited by Scimmia (2012-10-01 17:58:27)

Offline

#11 2012-10-02 02:06:15

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

The "suspend to both" feature that is supported natively in kernel 3.6 suspends to both ram and disk, and then goes into ram-suspend indefinitely. If the battery runs out and the power is lost then the system can be resumed from the disk image. pm-suspend-hybrid, on the other hand, suspends to ram, waits for a time, and then resumes briefly to suspend to disk. This function is definitely implemented as I have been using it successfully for some time. The code for this function can be seen here (last block). I think that this issue might be unrelated to pm-utils, seeing as it occurs with standard rtcwake usage without pm-utils installed. Perhaps though a new kernel had something to do with it; I might try an older one and test.

Offline

#12 2012-10-02 03:26:26

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

I tested a kernel (3.3.2-1) from before this issue started occurring, as far as I know. Same problem.

~  » date && sudo rtcwake -u -m mem -s 10 && date
Tue  2 Oct 12:27:23 EST 2012
rtcwake: wakeup from mem using /dev/rtc0 at Tue Oct  2 02:27:35 2012
Tue  2 Oct 12:28:54 EST 2012

As you can see the second date command didn't run in ~ten seconds as you would expect (and as it does with the lid open). I had to lift the lid for it to resume and run. In the process of trying various kernels the rtcwake worked once with the lid closed, but it wouldn't happen again, even with the same kernel. As I said it seems to work occasionally.

Last edited by OhneHerren (2012-10-02 03:32:54)

Offline

#13 2012-10-02 03:57:41

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

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

Have you tried the lts kernel?

Offline

#14 2012-10-02 05:02:11

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

The LTS kernel doesn't boot at all for me. I know this problem was not present with many kernel versions newer than 3.3.2-1 (all of which now display this behaviour).

Offline

#15 2012-10-21 04:45:06

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

I tried wakeup-git from the AUR but the problem persists. Where might I report a bug like this? Also, how might I disable the acpi lid switch entirely to help determine if this is a software or hardware problem (it seems like software seeing as it is not an issue 100% of the time)? I tried this, but that just stops the lid switch from waking the laptop up. I tried blacklisting the button module (in GRUB) but it loads regardless. By disable I mean that /proc/acpi/button/lid/LID0/state does not change when the physical lid state changes. If anyone has a better debugging course of action please let me know.

Edit: As far as I can tell, on the rare occasion the laptop can resume from suspend with the lid closed, I've booted it with the AC plugged in. Removing the cable breaks it again (and plugging it back in doesn't fix it).

Last edited by OhneHerren (2012-10-21 04:53:17)

Offline

#16 2012-10-21 06:14:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,749

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

OhneHerren wrote:

Where might I report a bug like this?

https://aur.archlinux.org/packages.php?ID=54058

Last edited by ewaller (2012-10-21 06:14:28)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#17 2012-10-21 06:47:19

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: pm-suspend-hybrid/rtcwake broken when laptop lid closed.

ewaller wrote:
OhneHerren wrote:

Where might I report a bug like this?

https://aur.archlinux.org/packages.php?ID=54058

Thank you I have commented there. I mean though where might I file a bug for rtcwake?

Offline

Board footer

Powered by FluxBB