unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Chris Marusich <cmmarusich@gmail.com>, help-guix@gnu.org
Subject: Re: Computer suspends even when I tell it not to
Date: Sun, 16 Jun 2019 11:52:35 +0200	[thread overview]
Message-ID: <87muihzwkc.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87ef3waalw.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

Something else:  With EXWM, if I call `loginctl suspend` from Eshell it
works as expected.

Now I bind the following function to a key:

--8<---------------cut here---------------start------------->8---
(defun ambrevar/suspend-to-sleep ()
  (interactive)
  (recentf-save-list)
  (call-process "loginctl" nil nil nil
                "suspend"))
(exwm-input-set-key (kbd "s-Z") #'ambrevar/suspend-to-sleep)
--8<---------------cut here---------------end--------------->8---

When I press "s-Z", it goes to sleep as expected.  When I press a key,
it wakes up then instantly goes back to sleep!
On a second key press, it wakes up properly.

Now with the following function:

--8<---------------cut here---------------start------------->8---
(defun ambrevar/suspend-to-sleep ()
  (interactive)
  (recentf-save-list)
  (call-process "dbus-send" nil nil nil
                "--system" "--print-reply" "--dest=org.freedesktop.login1"
                "/org/freedesktop/login1"
                "org.freedesktop.login1.Manager.Suspend"
                "boolean:true"))
--8<---------------cut here---------------end--------------->8---

it's a bit better: the above issue only happens sometimes (can't tell
what triggers it).

I've reported the issue upstream and it seems that another user cannot
reproduce on another distribution, so it might be Guix-specific.

https://github.com/ch11ng/exwm/issues/590

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2019-06-16  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  3:25 Computer suspends even when I tell it not to Chris Marusich
2019-06-14  7:29 ` Pierre Neidhardt
2019-06-14  9:33   ` hub.lombard
2019-06-16  9:52   ` Pierre Neidhardt [this message]
2019-06-14 18:24 ` Mark H Weaver
2019-06-20  5:44   ` Chris Marusich
2019-06-20  8:53     ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muihzwkc.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=cmmarusich@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).