This mpv plugin prevents screen blanking in GNOME while playing media.
This is needed because neither mpv supports GNOME's inhibition protocol, nor GNOME supports the standard inhibition protocol (yet).
You can find the latest release here.
Download mpv_inhibit_gnome.so
and put it in your mpv
scripts directory
(by default it's ~/.config/mpv/scripts
).
To build, the libdbus-1
library is needed
(Arch: dbus
, Fedora: dbus-devel
, Ubuntu: libdbus-1-dev
),
as well as the header files for mpv
(Arch: mpv
, Fedora: mpv-libs-devel
, Ubuntu: libmpv-dev
).
To build run:
make
This will generate the plugin in lib/mpv_inhibit_gnome.so
.
To install in the default per-user location ~/.config/mpv/scripts
either copy it there or run:
make install
To install in the default system-wide location /usr/share/mpv/scripts
run:
sudo make sys-install
This plugin has been integrated into the Flatpak release of mpv, so you should already be good to go.
If this plugin was manually installed before the integration,
uninstall it to avoid conflicts by deleting
~/.var/app/io.mpv.Mpv/config/mpv/scripts/mpv_inhibit_gnome.so
.