I am using mpv player on Ubuntu 22.04 with Wayland. Every minute of playing, the system goes to sleep. There are no traces in log files. With 18/20.04 mpv works well.
I found this in the ArchWiki for mpv:
mpv may not suspend GNOME's Power Saving Settings if using Wayland resulting in screen saver turning off the monitor during video playback. A workaround is to add
gnome-session-inhibit
to the beginning of theExec=
line inmpv.desktop
.
I tried that, but it didn't help. How to fix it?
mpv.desktop
file? Addinggnome-session-inhibit
did work for me. See https://askubuntu.com/questions/1499742/how-do-i-prevent-ubuntu-from-sleeping-while-mpv-is-running/1500407#1500407 – Amanda Jan 17 '24 at 19:20