https://github.com/revolution-robotics/inhibit-suspend
On Desktop systems, prevent suspend due to, e.g., GNOME shell/GDM crash.
https://github.com/revolution-robotics/inhibit-suspend
suspend systemd-inhibit wait-for-signal
Last synced: 10 days ago
JSON representation
On Desktop systems, prevent suspend due to, e.g., GNOME shell/GDM crash.
- Host: GitHub
- URL: https://github.com/revolution-robotics/inhibit-suspend
- Owner: revolution-robotics
- Created: 2023-10-08T23:52:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-14T02:50:50.000Z (8 months ago)
- Last Synced: 2025-11-14T04:28:44.771Z (8 months ago)
- Topics: suspend, systemd-inhibit, wait-for-signal
- Language: Shell
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Inhibit Suspend
- [GDM suspend](#gdm-suspend)
- [Systemd-inhibit](#systemd-inhibit)
- [inhibit-suspend.service](#inhibit-suspendservice)
- [Installation](#installation)
## GDM suspend
Recent versions of Fedora running GNOME desktop unexpectedly suspend.
For systems that also happen to be servers, this is a problem. The
apparent solution is to add a `gdm` profile, as outlined on
StackExchange
[Disable GDM suspend on lock screen](https://unix.stackexchange.com/a/746767).
Such a `gdm` profile works great until `gdm` itself crashes
and the system again suspends.
## Systemd-inhibit
Systemd provides a utility for blocking suspend: `systemd-inhibit`.
Similar to `nohup`, it's intent is to prevent interruption of
a long-running process.
## inhibit-suspend.service
This package provides a systemd service, *inhibit-suspend.service*,
that invokes `wait-for-signal`, which simply sleeps until it receives
a designated signal (SIGUSR1, by default). By invoking
`wait-for-signal` via `systemd-inhibit`, this is enough to prevent a
slightly unstable desktop from suspending the system. *Hurrah!*
## Installation
Provided your **systemd**-based OS has **GNU make** and a C compiler, run:
```bash
git clone https://github.com/revolution-robotics/inhibit-suspend.git
make -C inhibit-suspend
sudo make -C inhibit-suspend install
sudo systemctl enable --now inhibit-suspsend
```