1

When I watch movies in the Videos app, the screen does not dim or lock while the movie is playing. However, in MPV, the screen dims and eventually locks following my default sleep settings.

In general, I want my computer to fade to sleep/lock when I'm not using it.

Apparently I asked this in 2016 about Video: How can I temporarily disable my screen lock settings during video playback? but MPV is a different app entirely.

Amanda
  • 9,333

1 Answers1

2

Per a discussion in github issues and MPV's troubleshooting guide this is a known issue. What worked for me was to find my mpv.desktop file and tweak it to add gnome-session-inhibit before MPV launches.

My mpv.desktop was at /usr/share/applications/mpv.desktop -- FWIW, I had to install locate and run sudo updatedb to update locate's database before I could use locate mpv.desktop to find the file itself to edit it. Line 32 reads:

Exec=mpv --player-operation-mode=pseudo-gui -- %U

I changed it to:

Exec=gnome-session-inhibit mpv --player-operation-mode=pseudo-gui -- %U

And after that I was able to play movies with MPV without my computer going to sleep.

Amanda
  • 9,333