unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Computer suspends even when I tell it not to
@ 2019-06-14  3:25 Chris Marusich
  2019-06-14  7:29 ` Pierre Neidhardt
  2019-06-14 18:24 ` Mark H Weaver
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Marusich @ 2019-06-14  3:25 UTC (permalink / raw)
  To: help-guix

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

Hi,

I've noticed that my Guix System computer suspends if I leave it alone
for a couple hours.  It's plugged in.  This is annoying, since sometimes
I want to SSH into this computer, and I can't do that if it's suspended.

I don't understand why it suspends.  I've run guix pull recently, so
it's up to date.  I use GNOME.  In the GNOME settings' "Power" section,
I've explicitly set "Automatic suspend" to "Off".  However, it still
suspends automatically after a while.

Does anyone else experience this?  What else can I try?

-- 
Chris

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  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
  2019-06-14 18:24 ` Mark H Weaver
  1 sibling, 2 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2019-06-14  7:29 UTC (permalink / raw)
  To: Chris Marusich, help-guix

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

Maybe unrelated, but I've noticed that when I log out it goes to sleep
too (only sometimes?).

When it wakes up, it shows the GDM clock, which I can slide to log in
again.

I use GDM and EXWM.

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  2019-06-14  7:29 ` Pierre Neidhardt
@ 2019-06-14  9:33   ` hub.lombard
  2019-06-16  9:52   ` Pierre Neidhardt
  1 sibling, 0 replies; 7+ messages in thread
From: hub.lombard @ 2019-06-14  9:33 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Something like my own case perhaps: for example, while guix 'package -u' runs in TTY2, if I want Alt-F7 to go in gaphical session, it suspends early at each time, I have to press physically the button of the laptop to wake up again, sometimes several times. The good new is that doesn't interrupt the update ;)

(Environment gnome)

Hubert

----- Mail original -----
De: "Pierre Neidhardt" <mail@ambrevar.xyz>
À: "Chris Marusich" <cmmarusich@gmail.com>, help-guix@gnu.org
Envoyé: Vendredi 14 Juin 2019 09:29:15
Objet: Re: Computer suspends even when I tell it not to

Maybe unrelated, but I've noticed that when I log out it goes to sleep
too (only sometimes?).

When it wakes up, it shows the GDM clock, which I can slide to log in
again.

I use GDM and EXWM.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  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 18:24 ` Mark H Weaver
  2019-06-20  5:44   ` Chris Marusich
  1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2019-06-14 18:24 UTC (permalink / raw)
  To: Chris Marusich; +Cc: help-guix

Hi Chris,

Chris Marusich <cmmarusich@gmail.com> writes:

> I've noticed that my Guix System computer suspends if I leave it alone
> for a couple hours.  It's plugged in.  This is annoying, since sometimes
> I want to SSH into this computer, and I can't do that if it's suspended.
>
> I don't understand why it suspends.  I've run guix pull recently, so
> it's up to date.  I use GNOME.  In the GNOME settings' "Power" section,
> I've explicitly set "Automatic suspend" to "Off".  However, it still
> suspends automatically after a while.

FWIW, I've never seen this on my Thinkpad X200 running Guix.  I also use
GNOME, although I use it under Wayland, by running

  XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session

from within a text console.  I don't use GDM, because our GDM package
does not yet support Wayland.

Note that GDM is enabled in my OS config and gets launched on every
boot, but I then shut it down manually using "herd stop xorg-server".
After doing so, I need to type "Alt+SysRq+r" to recover the use of my
keyboard.

> Does anyone else experience this?  What else can I try?

It might be worth trying to do what I describe above, to rule out the
possibility that GDM is responsible.

What kind of machine is it?  If it's a laptop, I wonder if your laptop's
embedded controller is entering suspend mode automatically.

      Regards,
        Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  2019-06-14  7:29 ` Pierre Neidhardt
  2019-06-14  9:33   ` hub.lombard
@ 2019-06-16  9:52   ` Pierre Neidhardt
  1 sibling, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2019-06-16  9:52 UTC (permalink / raw)
  To: Chris Marusich, help-guix

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  2019-06-14 18:24 ` Mark H Weaver
@ 2019-06-20  5:44   ` Chris Marusich
  2019-06-20  8:53     ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Marusich @ 2019-06-20  5:44 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: help-guix

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

Hi Mark, Pierre, and others,

Thank you for taking the time to offer suggestions.

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Maybe unrelated, but I've noticed that when I log out it goes to sleep
> too (only sometimes?).
>
> When it wakes up, it shows the GDM clock, which I can slide to log in
> again.
>
> I use GDM and EXWM.

This is pretty much the same as the behavior I see.  At first I thought
the machine was going to sleep a long time after I logged out, but the
other day I definitely observed it immediately go to sleep when I logged
out, which seems wrong.

I also recall a little notification showing up briefly at the top of the
screen, at the GDM login screen, saying something along the lines of
"The computer will suspend soon if you take no further action".

Mark H Weaver <mhw@netris.org> writes:

> FWIW, I've never seen this on my Thinkpad X200 running Guix.  I also use
> GNOME, although I use it under Wayland, by running
>
>   XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session
>
> from within a text console.  I don't use GDM, because our GDM package
> does not yet support Wayland.
>
> Note that GDM is enabled in my OS config and gets launched on every
> boot, but I then shut it down manually using "herd stop xorg-server".
> After doing so, I need to type "Alt+SysRq+r" to recover the use of my
> keyboard.
>
>> Does anyone else experience this?  What else can I try?
>
> It might be worth trying to do what I describe above, to rule out the
> possibility that GDM is responsible.

I tried this, but I couldn't lock the screen.  Anecdotally, I feel like
the issue has happened when I lock the screen, and also when I log out,
but after a little poking around in this wayland session I wasn't able
to reproduce the issue, so I tried something else.

Instead of running the session, I simply stopped xorg-server and
recovered the use of my keyboard like you suggested.  The issue did NOT
occur, even though I left my computer unattended overnight.  I guess
that means it's a GNOME or GDM issue, but it's still unclear.

> What kind of machine is it?  If it's a laptop, I wonder if your laptop's
> embedded controller is entering suspend mode automatically.

I do NOT experience this issue on my x200 laptop.  I DO experience this
issue on a desktop.  They're using roughly the same software - both are
using GNOME, not using wayland, and I've run "guix pull" fairly recently
on both of them.  So it might be something hardware specific, but if so
it's strange that Pierre also sees the same issue.

I'll dig into the logs of my desktop and see if there is anything
helpful from around the time of the suspend.  I guess I'll poke around
at how we're running GDM, too.  Still not many clues to go on.

-- 
Chris

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Computer suspends even when I tell it not to
  2019-06-20  5:44   ` Chris Marusich
@ 2019-06-20  8:53     ` Pierre Neidhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2019-06-20  8:53 UTC (permalink / raw)
  To: Chris Marusich, Mark H Weaver; +Cc: help-guix

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

Good hunch, Chris!
Indeed I can only reproduce the issue on my desktop, but not on my laptop!
Hmm...

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-20  8:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-06-14 18:24 ` Mark H Weaver
2019-06-20  5:44   ` Chris Marusich
2019-06-20  8:53     ` Pierre Neidhardt

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).