Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPV interfering with macOS lock screen &/ screen saver #16062

Open
6 tasks done
ldexterldesign opened this issue Mar 16, 2025 · 2 comments
Open
6 tasks done

MPV interfering with macOS lock screen &/ screen saver #16062

ldexterldesign opened this issue Mar 16, 2025 · 2 comments
Labels

Comments

@ldexterldesign
Copy link

ldexterldesign commented Mar 16, 2025

mpv Information

mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Sep 28 2024 21:48:54
libplacebo version: v7.349.0
FFmpeg version: 6.1.2
FFmpeg library versions:
   libavcodec      60.31.102
   libavdevice     60.3.100
   libavfilter     9.12.100
   libavformat     60.16.100
   libavutil       58.29.100
   libswresample   4.12.100
   libswscale      7.5.100

Other Information

- macOS version: 15.3.2 (24D81)
- Source of mpv: ?
- Latest known working version: don't think I suffered this issue last month and since the last mpv release was months ago (i.e. 2024-09-23) I sense a macOS update is responsible for this issue..?
- Issue started after the following happened: perhaps latest macOS update (i.e. 15.3.2 (24D81)-ish)

Reproduction Steps

Hi all,

Hope you're OK!

Thanks for software - appreciate you!

As title

As a (macOS) user, when MPV is running, I still want macOS screen saver &/ lock screen to function because otherwise it's a security issue for me

This issue seems to have emerged around the same time as seeing the new "game mode" issue so maybe related..?

Steps to reproduce issue

  1. Open MPV
  2. Play an audio file
  3. Observe macOS screen saver &/ lock screen no longer functions/triggers

If you're reading and:

  • agree then please vote up (e.g. +1, like), or;
  • disagree then please vote down (e.g. -1, dislike) - I'd love to know why?

Welcome feedback/input

Hope this helps & to hear back

Cheers

Expected Behavior

macOS screen saver &/ lock screen still functions/triggers

Actual Behavior

macOS screen saver &/ lock screen no longer functions/triggers

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@Akemi
Copy link
Member

Akemi commented Mar 16, 2025

first of all, i just tested it and everything works as expected. eg for music only playback (without instantiated vo) my screensaver + lock screen activate as configured in the system settings.

the log you posted is not a log with your issue happening, eg you don't open and play any file. also try a current build from master.

do you use the bundle or the binary directly?
do you use --force-window or does mpv open a window? if yes you have to use --stop-screensaver=no.

to log every second which processes prevent sleep you can use this command:
while true; do echo "-----------------------------------------"; pmset -g assertions | grep -i sleep; sleep 1; done
it will log something like:

   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   pid 18081(mpv): [0x0001a496000580e4] 00:02:54 PreventUserIdleDisplaySleep named: "io.mpv.video_playing_back"  
   pid 104(powerd): [0x000190140001a275] 01:30:24 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"  
   pid 104(powerd): [0x0001a3a5001082d2] 00:04:08 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"  
   pid 180(coreaudiod): [0x0001a4960001809f] 00:02:55 PreventUserIdleSystemSleep named: "com.apple.audio.BuiltInSpeakerDevice.context.preventuseridlesleep"  

PreventUserIdleDisplaySleep 1 indicates how many processes prevent display sleep.
pid 18081(mpv): [0x0001a496000580e4] 00:02:54 PreventUserIdleDisplaySleep named: "io.mpv.video_playing_back" indicates that mpv is preventing it.

[edit]
game mode can't be related because it only activates in fullscreen and you didn't mention fullscreen in you reproduction steps. also only for bundle usage.

@Akemi Akemi changed the title Fix MPV interfering with macOS lock screen &/ screen saver - may be "game mode" related..? #BUG #HELP #QUESTION MPV interfering with macOS lock screen &/ screen saver Mar 16, 2025
@ldexterldesign
Copy link
Author

ldexterldesign commented Mar 16, 2025

Thanks for quick reply

I tested again and, respectfully, still have the issue

If I play a file (e.g. audio) with MPV then macOS fails to activate screen saver and thus screen lock - whether MPV is active window or not doesn't seem to matter either

Erm, I'm using Homebrew so rather not (have to) mess around with specific builds at this point but may resort to that if problem persists later - simply some acknowledgement this issue exists is good enough for me to wait for fix

I'm using UI so no flags

while true; do echo "-----------------------------------------"; pmset -g assertions | grep -i sleep; sleep 1; done
-----------------------------------------
   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   PreventUserIdleSystemSleep     1
   pid 511(coreaudiod): [0x00011b6100019ec9] 00:06:51 PreventUserIdleSystemSleep named: "com.apple.audio.BuiltInSpeakerDevice.context.preventuseridlesleep"  
   pid 440(powerd): [0x00011a6100019e96] 00:11:07 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"  
   pid 17238(mpv): [0x00011b6100059ecd] 00:06:51 PreventUserIdleDisplaySleep named: "io.mpv.video_playing_back"  
-----------------------------------------

Ya, seems to suggest got a MPV issue here 👍 - fix tips welcome!

Hope to hear back

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants