Debian falls asleep on me

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

Debian falls asleep on me

Postby millusions » 2019-04-01 06:23

Hey Guys!

Got Debian 9.8 'stretch' setup. i chose KDE.

it's pretty good. on day 2 after some general setup i dove right into ffmpeg to encode some stuff as that's what the box is built for.
left it overnight, hammering all cores but after 188MB the thing goes to sleep.

wtf?

i tested sleep, and it works well, pretty happy with that, but shouldnt it go to sleep when idle?

is there a way to fix it? without some app that keeps it awake, because i do want it to sleep when it finishes encoding.

thanks in advance!
User avatar
millusions
 
Posts: 45
Joined: 2014-10-05 14:02

Re: Debian falls asleep on me

Postby reinob » 2019-04-01 06:48

Did you change anything in /etc/systemd/logind.conf?

Make sure IdleAction=ignore. AFAIK systemd is (or was) broken in this respect, where it would send the computer to sleep (if IdleAction=suspend) regardless of what you were doing. Guess you can always find a suitable definition of "Activity".. :)

If the above is OK, you should check your KDE settings. On that I have zero experience (I compiled and used KDE 1.x for some time.. a long time ago! :)
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: Debian falls asleep on me

Postby Hallvor » 2019-04-01 08:05

Check your power management settings.
Lenovo Thinkpad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Buster (KDE)
User avatar
Hallvor
 
Posts: 947
Joined: 2009-04-16 18:35
Location: Norway

Re: Debian falls asleep on me

Postby Head_on_a_Stick » 2019-04-01 16:54

reinob wrote:AFAIK systemd is (or was) broken in this respect, where it would send the computer to sleep (if IdleAction=suspend) regardless of what you were doing.

To clarify: only the GNOME desktop interacts correctly with systemd and triggers the IdleAction as expected.

See https://github.com/systemd/systemd/issues/1295

@OP: please post the output of
Code: Select all
systemd-inhibit

If you haven't edited /etc/systemd/logind.conf then this dirty hack might fix things for you:
Code: Select all
# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

EDIT: and put some clothes on, for goodness sake :mrgreen:
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10613
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian falls asleep on me

Postby millusions » 2019-04-02 08:01

hi guys.


Hallvor, i will contact the admins because you deserve a grand prize for your post. it was so helpful i fell of my chair - im in debt for ever!

Head_on_a_stick: i havent touched those files at all.
system-inhibit shows:
Who: ModemManager (UID 0/root, PID 507/ModemManager)
What: sleep
Why: ModemManager needs to reset devices
Mode: delay

Who: PowerDevil (UID 1000/marty, PID 1160/org_kde_powerde)
What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
Why: KDE handles power events
Mode: block

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

/etc/systemd/logind.conf looks like this:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

you know. i miss the 3.0 Woody days, but i guess i had a ton of time back then. fond memories.
but i think i'm going to distro jump. the two days of bliss are up. now my TPlink T9E (broadcom-sta-dkms) is not seeing 5GHz networks. it worked fine for a couple of days.
i really don't want to sweat over something like a wifi card, maybe if it was some dodgy 20$ job.
im not sure Gnome is the answer, although i might give it a try, because the command runs in a terminal, i think the direction Gnome took over the years is pretty rubbish. it was ok years ago but now it's a mess imho.

maybe sid is the answer, i dont know

there's a command in Macs.. example: caffeinate -i ffmpeg -i blah blah | which will keep the mac awake until command is finished. there's nothing like that in Linux?
User avatar
millusions
 
Posts: 45
Joined: 2014-10-05 14:02

Re: Debian falls asleep on me

Postby reinob » 2019-04-02 12:12

millusions wrote:there's a command in Macs.. example: caffeinate -i ffmpeg -i blah blah | which will keep the mac awake until command is finished. there's nothing like that in Linux?


Yup, you can:

$ systemd-inhibit ffmpeg ..

or

$ systemd-inhibit /bin/bash

and systemd should not activate any power saving until the command ends..
reinob
 
Posts: 742
Joined: 2014-06-30 11:42

Re: Debian falls asleep on me

Postby millusions » 2019-04-03 06:32

thank you reinob!

you're a legend! exactly what i needed
User avatar
millusions
 
Posts: 45
Joined: 2014-10-05 14:02


Return to General Questions

Who is online

Users browsing this forum: bengtfrost and 15 guests

fashionable