Felix Natter <fnat...@gmx.net> writes: > Dear Debian users, > > I am looking for an automatic suspend-to-ram (I know "sudo systemctl > suspend" ;-)) solution for workstations: I would like the system to > suspend if and only if: > > - there is no gui interaction from any user (especially with VNC > sessions) AND
I think every desktop environment has this. Even X has this. 'This' being a timer since last mouse or keyboard event and the ability to trigger a command on the timer. I looked recently but didn't really find a way to do the Windows like thing, turn off screen->suspend->hibernate with configurable intervals. Desktop environments do have that and KDE does it fine on my Linux laptop but with just X11 and a WM it's a different story. > - there is no significant load during the last hour (in order to account > for backup jobs) This is the hard part, define load. Especially now that the logged in user might have a browser running with a few dozen or a few hundred tabs, all full of Javascript code, some of which probably wants to run sometimes or all the time. I think Windows (and maybe Macs?) have gone the other way, they have process settable bits to indicate system is in use. Handy for video players, for example, but backup jobs too. I don't know if Linux has anything like that. Well, you can disable the X screensaver which probably works for movies but that doesn't matter a whole lot to a batch backup job. > I think Windows can do it, but Windows does not allow multiple users > logged in at the same time, so it is an easier task. At least today's Windows (10 and 11) do allow multiple users logged in and I think XP over two decades ago had "switch user" in there, allowing multiple simultaneous logins.