Debian goes to sleep, how to disable

If none of the more specific forums is the right place to ask

Debian goes to sleep, how to disable

Postby EarlGrey » 2019-01-07 18:45

Hello,

I have been using Debian(stable) for years now, but just noticed a curious thing. Since recent I have been leaving my setup turned on, but it somehow enters a form of sleep. It translates to me moving the mouse and it will freeze and be sluggish for a few minutes, even with all the gnome power options set to never interrupt anything.

Seen in dmesg https://paste.debian.net/hidden/075af845/ line 1029 until 1161 you see it going into deep sleep, disabling all CPUs(I find that hard to believe) and turns everything off. How do I disable this? The device is not inactive (not a heavy load) but still doing some tasks I specified. This interferes with that.
NOTE: If you read the entire dmesg you notice the usb devices get unplugged and plugged, this is me. Also the network links going up and down is a known issue, my router is on the verge of death.

Can anyone shed some light on this? Thanks in advance,

EarlGrey
EarlGrey
 
Posts: 10
Joined: 2019-01-07 18:25

Re: Debian goes to sleep, how to disable

Postby Head_on_a_Stick » 2019-01-07 18:53

Can you
Code: Select all
# apt purge pm-utils

Then use this instead:
Code: Select all
systemctl suspend

https://wiki.debian.org/Suspend
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian goes to sleep, how to disable

Postby EarlGrey » 2019-01-07 20:06

Head_on_a_Stick wrote:Can you
Code: Select all
# apt purge pm-utils

Then use this instead:
Code: Select all
systemctl suspend

https://wiki.debian.org/Suspend


The package "pm-utils" wasn't installed.

The systemctl did suspend my desktop, but that is what I never want to have happen. Should I still use 'sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target' to disable the machine to go into suspend?
EarlGrey
 
Posts: 10
Joined: 2019-01-07 18:25

Re: Debian goes to sleep, how to disable

Postby Head_on_a_Stick » 2019-01-07 20:16

EarlGrey wrote:Should I still use 'sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target' to disable the machine to go into suspend?

No, don't do that.

Can we see
Code: Select all
systemd-inhibit
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian goes to sleep, how to disable

Postby millpond » 2019-01-08 04:38

I *believe* acpi_fakekey should be able to simulate a keyboard interrupt. Haven used it for hat purpose though...

A simple script sending an \255 (or whatever) every minute or ten *might* work.

also

https://askubuntu.com/questions/288114/ ... oard-input
millpond
 
Posts: 653
Joined: 2014-06-25 04:56

Re: Debian goes to sleep, how to disable

Postby llivv » 2019-01-08 05:21

There may be BIOS settings for PowerManagement.

If you see anything set to S5 change it to S3
S5 = Deep Suspend/Sleep
S1 = Suspend/Sleep off

All mobo manufacutures word there BIOS features differently
so a good idea to check the mobos' BIOS docs
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Debian goes to sleep, how to disable

Postby EarlGrey » 2019-01-08 15:55

Head_on_a_Stick wrote:
EarlGrey wrote:Should I still use 'sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target' to disable the machine to go into suspend?

No, don't do that.

Can we see
Code: Select all
systemd-inhibit


I actually did did the systemctl thing, but unmaksed it now. What does it do exactly?

The systemd-inhibit:
Code: Select all
     Who: GNOME Shell (UID 1000/EarlGrey, PID 2752/gnome-shell)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: Debian-gdm (UID 117/Debian-gdm, PID 2176/gnome-settings-)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: ModemManager (UID 0/root, PID 1694/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

     Who: EarlGrey (UID 1000/EarlGrey, PID 2847/gnome-settings-)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: Debian-gdm (UID 117/Debian-gdm, PID 2176/gnome-settings-)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1691/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: Telepathy (UID 1000/EarlGrey, PID 2800/mission-control)
    What: shutdown:sleep
     Why: Disconnecting IM accounts before suspend/shutdown...
    Mode: delay

     Who: EarlGrey (UID 1000/EarlGrey, PID 2847/gnome-settings-)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

8 inhibitors listed.


millpond wrote:I *believe* acpi_fakekey should be able to simulate a keyboard interrupt. Haven used it for hat purpose though...

A simple script sending an \255 (or whatever) every minute or ten *might* work.

also

https://askubuntu.com/questions/288114/ ... oard-input


That is a solution, but I want to know/learn how to properly deal with this.

llivv wrote:There may be BIOS settings for PowerManagement.

If you see anything set to S5 change it to S3
S5 = Deep Suspend/Sleep
S1 = Suspend/Sleep off

All mobo manufacutures word there BIOS features differently
so a good idea to check the mobos' BIOS docs


I will check for the mobo settings, thanks.
EarlGrey
 
Posts: 10
Joined: 2019-01-07 18:25

Re: Debian goes to sleep, how to disable

Postby Head_on_a_Stick » 2019-01-08 19:02

EarlGrey wrote:I actually did did the systemctl thing, but unmaksed it now. What does it do exactly?

I just think that hamstringing your machine's ability to suspend sounds like an awful hack, there must be a better way.

I can't see anything apart from GNOME controlling the suspend mechanism so it must be the firmware ("BIOS").
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian goes to sleep, how to disable

Postby EarlGrey » 2019-01-10 15:41

Head_on_a_Stick wrote:
EarlGrey wrote:I actually did did the systemctl thing, but unmaksed it now. What does it do exactly?

I just think that hamstringing your machine's ability to suspend sounds like an awful hack, there must be a better way.

I can't see anything apart from GNOME controlling the suspend mechanism so it must be the firmware ("BIOS").


I haven't checked bios yet, but doing that systemctl thing and undoing it, seems to have fixed the issue. I will check the BIOS anyway.

edit: All the power settings et cetera in the BIOS are already disabled, so it must be software related.
EarlGrey
 
Posts: 10
Joined: 2019-01-07 18:25

Re: Debian goes to sleep, how to disable

Postby bw123 » 2019-01-10 16:27

EarlGrey wrote:
Head_on_a_Stick wrote:
EarlGrey wrote:I actually did did the systemctl thing, but unmaksed it now. What does it do exactly?

I just think that hamstringing your machine's ability to suspend sounds like an awful hack, there must be a better way.

I can't see anything apart from GNOME controlling the suspend mechanism so it must be the firmware ("BIOS").


I haven't checked bios yet, but doing that systemctl thing and undoing it, seems to have fixed the issue. I will check the BIOS anyway.

edit: All the power settings et cetera in the BIOS are already disabled, so it must be software related.


Yeah everything on a computer is software related, but that doesn;t mean a hardware solution doesn't exist.

This, from your dmesg is a new one on me, did you look it up?
"Broke affinity for irq"

p.s. maybe some hardware details will help others figure out what's going on.

what's this?
[ 3.112376] spl: loading out-of-tree module taints kernel.
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: Debian goes to sleep, how to disable

Postby llivv » 2019-01-22 18:03

EarlGrey wrote:Seen in dmesg https://paste.debian.net/hidden/075af845/ line 1029 until 1161 you see it going into deep sleep, disabling all CPUs(I find that hard to believe) and turns everything off. How do I disable this? The device is not inactive (not a heavy load) but still doing some tasks I specified. This interferes with that.EarlGrey
could it be related to the xserver?
check the Xorg.0.log
After a reboot the log will be named something else ie: Xorg.1.log or Xorg.0.log.old etc.
At the off chance it is related to DRMSETMASTER that should show up somewhere near the end of the log.
The symptoms you describe look vaguely familiar...
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Debian goes to sleep, how to disable

Postby Head_on_a_Stick » 2019-01-22 19:09

bw123 wrote:what's this?
[ 3.112376] spl: loading out-of-tree module taints kernel.

The OP appears to be using zfs (dirty boy!), which necessitates a non-GPL module.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian goes to sleep, how to disable

Postby millpond » 2019-01-22 23:56

On Mate here I have an applet at the top bar which enables or disables sleep, and works well:
Power Manager Inhibit Applet
millpond
 
Posts: 653
Joined: 2014-06-25 04:56


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable