Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5360 closed Bug (fixed)

MPC and Monitor Issues

Reported by: Lars Keller Owned by: Underground78
Priority: normal Milestone: 1.7.9
Component: General Version: nightly, specify
Severity: normal Keywords: 1.7.8.109
Cc: Underground78 Evaluation: diagnosed

Description

I've noticed the following;

If I check "After Playback -> Turn off the monitor", it works for audio files but not for video files.

If I uncheck "After Playback -> Turn off the monitor", monitor is being turned off for audio files.

I dunno if it's helpful for you or not but in my settings file, the value for AfterPlayback is 3.

Also, I've observed that while playing audio, MPC allows the monitor to be turned off automatically but I'd love a feature to not do that as I use an HDMI cable for audio & video so if I lose the video, the audio is gone too so if you can add that feature (maybe even in advanced section), it'd be great. If it's already there, sorry for my ignorance.

Change History (15)

comment:1 in reply to:  description Changed 5 years ago by Underground78

If I check "After Playback -> Turn off the monitor", it works for audio files but not for video files.

When you say that it works for audio files, is the monitor turned off immediately after playback?

If I uncheck "After Playback -> Turn off the monitor", monitor is being turned off for audio files.

Do you mean after a while or immediately in this case?

comment:2 Changed 5 years ago by Underground78

Cc: Underground78 added
Evaluation: need info
Status: newevaluated

comment:3 Changed 5 years ago by Lars Keller

Yes, if it's checked, yes, the monitor turns off automatically after playback of audio files NOT for video files.

Yes, even if it's unchecked, the monitor turns off immediately after playback of ONLY audio files.

comment:4 Changed 5 years ago by Underground78

It's weird. When unchecked the monitor should turn off only after the computer has been inactive for the delay you have configured in Windows power settings.

comment:5 Changed 5 years ago by Robert Schlabbach

@riddhi raj, do you possibly have some third party software on your PC that "enhances" video playback and might interfere with the monitor power scheme?

E.g. Samsung used to preinstall a software named "Movie Enhancer" on their laptops which recognizes MPC and switches to "enhancement" as soon as MPC starts playing back a video file, but does not switch back when the video playback is stopped. It will only switch back when MPC is closed.

Try this: Rename the MPC executable (mpc-hc.exe) to some name you make up, e.g. "test.exe" and see if the problem persists. At least Samsungs "Movie Enhancer" will then not recognize MPC and not be triggered.

comment:6 Changed 5 years ago by Lars Keller

Ok, I've found a couple of things;

  • If I rename the mpc executable, everything is good but since I don't have any other display related software installed, I really think it's an issue with mpc itself so I dug further.
  • Now, when I rename mpc, it doesn't read it's settings file (should it ?) so I edited that to see if it might be causing issues.
  • First I searched registry for "AfterPlayback" and remove the complete MPC-HC folder as it had different values than the ini file. (which settings does MPC prioritize, ini or registry ?)
  • Next, I deleted "AfterPlayback" from ini file.
  • Played an audio file and it works as it should (turns off when checked and doesn't when unchecked).
  • Played a video file and it doesn't work at all (doesn't turn the monitor off)
  • Another thing that I found was if I remove "AfterPlayback" from ini file and start/exit MPC, it creates "AfterPlayback=0" BUT it never changes it, no matter what I choose, it works only for that session but once I exit and restart it, I have to choose "AfterPlayback -> xxx". Is it by design that one has to choose After Playback in every session ?

BTW, in registry that value of "AfterPlayback" was 0 whereas in ini file it was 3, after deleting both registry and ini values, it's partly working, any idea on where the issue was happening ?

Also, I presume "AfterPlayback=3" means "Turn off Monitor" ?, If yes and I edit the value in ini file and start MPC, it doesn't show any option in "AfterPlayback" menu as checked, it should show, shouldn't it ?

I'll let you know if I think of something else.

comment:7 Changed 5 years ago by Underground78

MPC-HC tries loading the settings from the ini file first (should be named <name>.ini if the executable is <name>.exe). If no ini file is present, the registry is used instead.

The persistent after playback option is in "Options > Playback". The menu is for one time action so it's normal that this option is not saved.

For some reasons your settings might have been corrupted, what are the remaining issues exactly now that you started on clean basis?

comment:8 Changed 5 years ago by Lars Keller

Now, the only issues is that the monitor doesn't turn off after playing videos.

Another issue that I wrote in the bug description but we haven't discussed till now is that power saving kicks in when playing audio files (as in display turns off when no activity), I assume this is by design (I dunno if it's Windows or MPC) ?

Anyways, since I use a receiver, both display and audio are connected, if one goes, the other goes too. My request is for you to add an "Override Monitor Power-saving" option in "Advanced Settings" with similar options as "On Top";
Default = 0
Always = 1
While Playing = 2
While Playing Audio = 3

and the above can also be a temporary fix for the crashing bug (5359) until you can think of a workaround.

comment:9 Changed 5 years ago by Underground78

Owner: set to Underground78
Status: evaluatedaccepted

I think I can reproduce this issue. I might even have an idea.

comment:10 Changed 5 years ago by Underground78

Evaluation: need infodiagnosed

Confirmed, I know what happens here. The request to switch the monitor off is sent too early and thus is intercepted by the method we use to prevent the monitor from going in stand-by mode during playback.

comment:11 Changed 5 years ago by Underground78

This test build should fix the problem.

comment:12 Changed 5 years ago by Lars Keller

Yep that fixed it.

comment:13 Changed 5 years ago by Underground78 <underground78@…

Resolution: fixed
Status: acceptedclosed

In e92e7f:

Fix: The "turn off monitor" after playback event did not work.

Fixes #5360.

comment:14 Changed 5 years ago by Underground78

Milestone: next release

Will be in the nightly builds as of version 1.7.8.142.

comment:15 Changed 5 years ago by thevbm

Milestone: next release1.7.9

Milestone renamed

Note: See TracTickets for help on using tickets.