```bash systemd-inhibit ``` ``` WHO UID USER PID COMM WHAT WHY MODE ModemManager 0 root 2176 ModemManager sleep ModemManager needs to reset devices delay NetworkManager 0 root 2310 NetworkManager sleep NetworkManager needs to turn off networks delay UPower 0 root 3703 upowerd sleep Pause device polling delay GNOME Shell 1000 benjamin_loison 4450 gnome-shell sleep GNOME needs to lock the screen delay GNOME Shell 1000 benjamin_loison 4450 gnome-shell sleep GNOME needs to save screen time data delay benjamin_loison 1000 benjamin_loison 4579 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block benjamin_loison 1000 benjamin_loison 4411 gnome-session-b shutdown user session inhibited block benjamin_loison 1000 benjamin_loison 4579 gsd-media-keys sleep GNOME handling keypresses delay benjamin_loison 1000 benjamin_loison 4582 gsd-power sleep GNOME needs to lock the screen delay
9 inhibitors listed. ```
on Debian 13 GNOME. Why do I have the 2 `block` entries?
Sep 3, 1:19pm
The two block entries in your systemd-inhibit output are related to GNOME's session and power management. Here's why they exist and what they do:
1. gsd-media-keys (PID 4579)
What it does:
This process (gsd-media-keys) is part of GNOME Settings Daemon (GSD) and handles media keys (e.g., power, suspend, hibernate buttons on your keyboard or laptop).
Why it blocks:
The handle-power-key:handle-suspend-key:handle-hibernate-key inhibitor prevents systemd from suspending, hibernating, or powering off the system while GNOME is actively listening for these keypresses.
This ensures that GNOME can intercept and handle these keys itself (e.g., to show a shutdown dialog or lock the screen) instead of letting systemd take immediate action.
Mode:block means it completely prevents the action (suspend/hibernate/shutdown) until the inhibitor is removed.
2. gnome-session-b (PID 4411)
What it does:
This is the GNOME session binary, which manages your user session (e.g., starting/stopping apps, handling logout/shutdown).
Why it blocks:
The shutdown inhibitor prevents systemd from shutting down or rebooting while your GNOME session is active.
This is a safety mechanism to avoid abrupt termination of your session (e.g., if you have unsaved work or background processes running).
Mode:block means it stops the shutdown/reboot until the session is properly closed or the inhibitor is released.
Why Are These Inhibitors Active?
GNOME's Design:
GNOME uses these inhibitors to maintain control over power management and ensure a smooth user experience. For example:
If you press the power button, GNOME wants to show a confirmation dialog instead of immediately shutting down.
If you try to suspend the system, GNOME may want to lock the screen first or save session data.
User Session Protection:
The gnome-session-b inhibitor ensures that systemd doesn’t forcefully terminate your session (e.g., during a shutdown) without GNOME’s approval.
Are These Normal?
✅ Yes, these are expected behavior on a GNOME desktop environment. They are part of GNOME’s integration with systemd to manage power and session states gracefully.
Can You Remove Them?
Not recommended:
These inhibitors are critical for GNOME’s functionality. Removing them could lead to:
Unresponsive power/suspend buttons.
Abrupt session termination (losing unsaved work).
Inconsistent behavior when closing the laptop lid or pressing power buttons.
If you want to debug:
You can temporarily disable GNOME’s inhibitors by stopping the relevant services (e.g., gsd-media-keys or gnome-session), but this is not advised for daily use.
Key Takeaway
The block entries are intentional and necessary for GNOME to manage power and session events properly. They ensure that GNOME, not systemd, handles critical actions like shutdowns or suspends.
Sep 3, 1:19pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.