Temporarily disable system sleep

I’m using Fedora 30 KDE. How can I temporarily (say, for an hour) disable the laptop from going to sleep, via the terminal? I’ve tried systemd-inhibit sleep 3600 but the computer still goes to sleep.

Hi @tsorn! Welcome to Ask Fedora! Please have a look at the introductory posts in the #start-here category if you haven’t had a chance to do so.

As far as I know graphical DE (KDE in your case) can overrule systemd’s powersaving/sleep options.

So one option would be disabling option in KDE settings temporarely or finding cli/terminal KDE-specific command (I myself don’t use KDE).

From using KDE quite a long time ago I also remember a widget (maybe called Caffeine or something similar) which let me do exactly what you’re asking for – but that’s using GUI, not from cli.

Hopefully someone actually using KDE can provide more specific instructions for you.


Can you take a look here /etc/UPower/UPower.conf try to tweak and play with the parameter. Dont forget to reload after change the value