command line utility to list session power inhibitors for Linux desktop users
Project description
command line utility to list session power inhibitors for Linux desktop users.
Inspired by https://askubuntu.com/a/1239194/152287
#Install Tips The pip install adds an executable to your path (see usage)
Prerequisite packages
The python package PyGObject is a prerequisite. Installation is automatic, but certain system packages must be installed, according to the requirements of PyGObject
For Ubuntu 20.10:
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
for other distributions, see https://pygobject.readthedocs.io/en/latest/getting_started.html
#Usage
inhibitors list
Example
With the Gnome Shell plugin Caffeine activate, and a Google Meet running in Firefox:
$ inhibitors list
Listing inhibitors reported by dbus:
Inhibitor: firefox audio-playing
Inhibitor: user Inhibit by Caffeine
#Comparison with systemd
we can do
$ systemd-inhibit --list
which on my desktop gives:
WHO UID USER PID COMM WHAT WHY MODE
ModemManager 0 root 2222 ModemManager sleep ModemManager needs to reset devices delay
NetworkManager 0 root 1912 NetworkManager sleep NetworkManager needs to turn off networks delay
UPower 0 root 2654 upowerd sleep Pause device polling delay
Unattended Upgrades Shutdown 0 root 2449 unattended-upgr shutdown Stop ongoing upgrades or perform upgrades before shutdown delay
GNOME Shell 1000 tim 5039 gnome-shell sleep GNOME needs to lock the screen delay
Telepathy 1000 tim 5156 mission-control shutdown:sleep Disconnecting IM accounts before suspend/shutdown... delay
gnome-tweak-tool-lid-inhibitor 1000 tim 5325 python3 handle-lid-switch user preference block
tim 1000 tim 5255 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block
tim 1000 tim 5020 gnome-session-b shutdown:sleep user session inhibited block
tim 1000 tim 5255 gsd-media-keys sleep GNOME handling keypresses delay
tim 1000 tim 5257 gsd-power sleep GNOME needs to lock the screen delay
The Caffeine plugin inhibit is the third line from the bottom. However, it is not obious. I am sure in this case, because when I deactivate caffeine, the third line disappears. The Google Meet inhibitor is not even listed at all. However, it is definitely an inhibitor.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for list_session_inhibitors-0.9.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350036359e4d335903bbbd80cf743229ae17281d27f35f0eacb4308d8d0de4bf |
|
MD5 | c5ad3cca7dd6310d0caf7b1c15396c13 |
|
BLAKE2b-256 | a3cde90c4409da5f1c2001055941d3f40674bc112cc701e63162a4e0b518bee0 |
Hashes for list_session_inhibitors-0.9.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37bc400f7782114a9a3b8cbf0e6a0b40dfcc2df45c403ba88cd33d1358371ac0 |
|
MD5 | 4ad63cc7d9cc4e4fee6bb5c2ca440ffb |
|
BLAKE2b-256 | 4b0f47b296ad5d2aaab1f05c11679c29a4d372495e78b0b4d7ac52a60c408a73 |