Jump to content

Fix for monitor not repecting power settings when media is paused


Recommended Posts

Darius
Posted (edited)

I noticed at some point that Emby Theater would prevent my monitor from going to sleep but only when media is paused or playing. When playing content that behavior is desirable indeed but when paused I would prefer for my monitor to turn off according to my power settings.

What I managed to do in order to fix that is open the main.js file and commented out a few blocks, basically anything that was using `electron.powerSaveBlocker`. After that I got the desired behavior, Emby Theater would keep my monitor on but only when playing content, if paused or in any other menu my monitor would turn off as it should.

Before commenting out the lines and running `powercfg /requests` multiple times in powershell, I figured that the default behavior for emby was to have 2 processes that prevented the display from turning off when playing and one left when pausing.

After commenting out these blocks now I have 1 process preventing the display from going to sleep when playing and 0 when paused or in any other menus. Something the devs might want to look into?

(powercfg requests are in chronological order)

Btw I tried this on arch and debian based distros and the behavior is the same but I haven't tried commenting out some code there yet.

 

2024-08-25_10-23.png

2024-08-25_10-25.png

2024-08-25_10-26.png

2024-08-25_10-26_1.png

theater-63860178292.txt theater-63860178195.txt theater-63860177654.txt theater-63860177365.txt

Edited by Darius
added logs
Darius
Posted

made a small typo forgot to comment out line 238 but you get the idea

Posted

Thanks for sharing. We'll take a look.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...