help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Computer suspends even when I tell it not to


From: Pierre Neidhardt
Subject: Re: Computer suspends even when I tell it not to
Date: Sun, 16 Jun 2019 11:52:35 +0200

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]