Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian goes to sleep, how to disable

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
EarlGrey
Posts: 10
Joined: 2019-01-07 18:25

Debian goes to sleep, how to disable

#1 Post by EarlGrey »

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

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Debian goes to sleep, how to disable

#2 Post by Head_on_a_Stick »

Can you

Code: Select all

# apt purge pm-utils
Then use this instead:

Code: Select all

systemctl suspend
https://wiki.debian.org/Suspend
deadbang

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

Re: Debian goes to sleep, how to disable

#3 Post by EarlGrey »

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?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Debian goes to sleep, how to disable

#4 Post by Head_on_a_Stick »

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
deadbang

millpond
Posts: 698
Joined: 2014-06-25 04:56

Re: Debian goes to sleep, how to disable

#5 Post by millpond »

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

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Debian goes to sleep, how to disable

#6 Post by llivv »

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.

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

Re: Debian goes to sleep, how to disable

#7 Post by EarlGrey »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Debian goes to sleep, how to disable

#8 Post by Head_on_a_Stick »

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

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

Re: Debian goes to sleep, how to disable

#9 Post by EarlGrey »

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.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Debian goes to sleep, how to disable

#10 Post by bw123 »

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.
resigned by AI ChatGPT

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Debian goes to sleep, how to disable

#11 Post by llivv »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Debian goes to sleep, how to disable

#12 Post by Head_on_a_Stick »

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

millpond
Posts: 698
Joined: 2014-06-25 04:56

Re: Debian goes to sleep, how to disable

#13 Post by millpond »

On Mate here I have an applet at the top bar which enables or disables sleep, and works well:
Power Manager Inhibit Applet

yrefanid
Posts: 1
Joined: 2022-12-15 07:42

Re: Debian goes to sleep, how to disable

#14 Post by yrefanid »

I have the same problem. One solution I've found is to keep me (as an admin) always logged in (and with locked screen), in which case it does not go to sleep.

Post Reply