FS#27411 - [acpid] sleep button suspends twice in a row

Attached to Project: Community Packages
Opened by Clemens Buchacher (drizzd) - Friday, 02 December 2011, 19:04 GMT
Last edited by Sébastien Luttringer (seblu) - Tuesday, 13 March 2012, 20:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I recently installed acpid, and now whenever I suspend using the sleep button, as soon as the machine resumes, it immediately goes back to sleep again, once. Seems to me that the sleep button event is handled twice now, by both acpid and something else. Easily fixed by uninstalling acpid. But should acpid maybe conflict with pm-utils or something?

Additional info:
* package version(s)
$ pacman -Q pm-utils acpid
pm-utils 1.4.1-3
acpid 2.0.12-1
* config and/or log files etc.


Steps to reproduce:

Install and start acpid, press sleep button, resume machine, wait for 1 second until the machine suspends again.
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Tuesday, 13 March 2012, 20:51 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Friday, 02 December 2011, 19:48 GMT
Looks nearly the same as https://bugs.archlinux.org/task/27201
Comment by Clemens Buchacher (drizzd) - Sunday, 04 December 2011, 22:16 GMT
Except that in my case I do not have to close the lid. But the underlying cause may be the same. Can we merge the bugs?
Comment by Jelle van der Waa (jelly) - Sunday, 18 December 2011, 17:14 GMT
Since that bug is fixed, is your problem fixed?
Comment by Clemens Buchacher (drizzd) - Tuesday, 20 December 2011, 22:33 GMT
This issue persists with acpid version 2.0.13-1.
Comment by Jelle van der Waa (jelly) - Monday, 23 January 2012, 18:59 GMT
Report it upstream
Comment by Dikiy (dikiy) - Wednesday, 07 March 2012, 08:26 GMT
Try to delete all file-locks belong to acpid. I had this, and delete file-locks could help.
Comment by Clemens Buchacher (drizzd) - Wednesday, 07 March 2012, 19:49 GMT
What kind of file-lock would that be? But that's likely not it since I am not using this package any more since I reported the bug originally and I have been installing it temporarily just for testing purposes.

As far as I am concerned, we can close this as "don't care" or something. Unless someone can be convinced to remove acpid entirely, since it does not seem to do anything besides break stuff that would be working without it.
Comment by Dikiy (dikiy) - Wednesday, 07 March 2012, 21:32 GMT
>What kind of file-lock would that be? But that's likely not it since I am not using this package any more since I reported the bug originally and I have been installing it temporarily just for testing purposes.

/var/lock/acpid.

It's needed, for example for suspend: when the power button pressed, the file is created, and the machine goes to S3. On return the file must be deleted.

If there were no file created, the acpid would execute the script on the wake up too, because the power button sends the event on the wake up too.

>As far as I am concerned, we can close this as "don't care" or something. Unless someone can be convinced to remove acpid entirely, since it does not seem to do anything besides break stuff that would be working without it.

I find acpid very useful.
Comment by Sébastien Luttringer (seblu) - Tuesday, 13 March 2012, 11:56 GMT
I have on my computer both acpid and pm-tools. I don't have your issue.

If I understand correctly suspend is runned twice. First by acpid (its default config do that in handler.sh) and a second time by something else.
What is this something else? gnome-power-manager?

You probably have setup 2 softwares which do the same thing on your host with their default config. We cannot conflict by example gnome-power-manager and acpid, because we can use the both, if they are well configured.

Comment by Clemens Buchacher (drizzd) - Tuesday, 13 March 2012, 20:09 GMT
I do have Gnome 3 running. But I do not have a gnome-power-manager process. Maybe that's Gnome 2. I verified that if I shut down Gnome, closing the lid does not trigger suspend. In fact, even if gdm is running, suspend is not triggered by closing the lid or pressing the suspend button.

I see how this is not easy to solve within Arch Linux. But if acpid is supposed to be installed manually anyways, maybe the default should be changed to not trigger suspend.
Comment by Sébastien Luttringer (seblu) - Tuesday, 13 March 2012, 20:50 GMT
it's easy to solve, _configure_ one power manager at a time.

I don't know if its to acpid to change its default behaviour or to gnome-power-manager to do it.

anyway, acpid is not started automatically and you must check if configuration fit to your needs before starting daemon or add it to rc.conf.

Loading...