JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.43k stars 504 forks source link

Playnite Fullscreen preventing Sleep / Hibernate #2932

Open ionutrobert opened 2 years ago

ionutrobert commented 2 years ago

Bug Description

Running the powercfg - requests in cmd shows the audio driver preventing sleep while Playnite fullscreen is on.

Changing the audio setting to Waveout API while mute when in background option is on: If the Playnite fullscreen is not the active window (focused), the pc would sleep. CMD window running "powercfg -requests" does not show anything that is preventing the PC from sleeping. (Sleep still does not work while Playnite Fullscreen window is focused)

To Reproduce

Set Stand By timer in windows power settings to 1 min and launch Playnite in Fullscreen mode.

Administrator cmd: "powercfg -requests" will show whatever process/driver is preventing the PC from sleeping/hibernate.

Diagnostics ID

e5173c13-4dde-407d-b24a-01baa79b1534

Screenshots

Fullscreen: https://gyazo.com/5d78d919c6567a5240bb8108dabd75d7 On another PC I tried, cmd showed System: [DRIVER] Legacy Kernel Caller preventing sleep with Playnite Fullscreen. (I think that suggests audio/media playing)

Desktop: https://gyazo.com/d8f7a54204c69a021a1fb9cb383f9971

IowaMan commented 2 years ago

I was also getting this issue even when not in fullscreen mode. Windows Events Power-Troubleshooter says: Wake Source: Timer - Playnite.DesktopApp.exe This triggers nearly EXACTLY every four minutes (just 4 seconds short, so every 236 seconds.) Might want to check any timers that last near that long.

JosefNemec commented 2 years ago

Desktop mode doesn't have any 4 minute timers. The only timer it has is 4 hour one for update check. It must be some extension you have installed.

MrSco commented 2 years ago

I’m having issues sleeping my system while full screen is running. The screen sleeps but not windows/system itself. Desktop mode sleeps screen and system just fine however. Any updates or workarounds for this?

Thanks!

maxwellhibbert commented 2 years ago

I also have this issue, only in fullscreen.

JasSuri commented 1 year ago

I have this issue when playnite is in fullscreen.

lyndonguitar commented 1 year ago

I also have this issue. This is preventing sleep / hibernate because when playnite is open apparently "An audio stream is currently in use.". This is more apparent with Steam Deck because I am constantly using the power button to sleep, only for it to wake right back up (after around a minute) because of this.

I have tested thoroughly and I can validate that it's Playnite that's causing this "audio stream is currently in use."It's weird because it was fine for many months of using Steam Deck and suddenly this problem appeared. Although I can confirm Playnite has been recently updated. Haven't tested each version yet to see if the problem will go away with previous versions

EDIT: After more testing, the problem also persists with games run via playnite, even if playnite was closed after the fact.(Run game via Playnite -> Game is running -> Close playnite and leave game running -> Try to Sleep -> it still wakes back up)

However, running a game via its own launcher/shortcut/exe or via playnite desktop seems to have eliminated the problem. So if it runs while in Playnite fullscreen, it causes it to wake back up

EDIT2: It's looking promising, but "splash screen" extension seems to be what's causing the "playnite fullscreen stopping sleep" problem. I'd have to test this out further.

MrSco commented 1 year ago

I also am having this sleep issue, PlayNite's audio in fullscreen mode is keeping computer awake. PlayNite need's a true music disable not just lower volume to 0 because windows still thinks there is audio playing... running powercfg -requests confirms it

L0nZz commented 1 year ago

Here's a temporary fix until it's eventually patched.

Scan: powercfg /requests

Override: powercfg /requestsoverride DRIVER "Device name" SYSTEM powercfg /requestsoverride PROCESS software.exe SYSTEM

Undo: powercfg /requestsoverride DRIVER "Device name" powercfg /requestsoverride PROCESS software.exe

Example:

C:\Windows\System32>powercfg /requests DISPLAY: None.

SYSTEM: [DRIVER] USB Audio 2.0 (USB\VID_1235&PID_8211&MI_00\8&175349a7&0&0000) An audio stream is currently in use. [PROCESS] \Device\HarddiskVolume5\Playnite\Playnite.FullscreenApp.exe

AWAYMODE: None.

EXECUTION: None.

PERFBOOST: None.

ACTIVELOCKSCREEN: None.

C:\Windows\System32>powercfg /requestsoverride DRIVER "USB Audio 2.0" SYSTEM

C:\Windows\System32>powercfg /requestsoverride PROCESS Playnite.FullscreenApp.exe SYSTEM

Solution: powercfg /requestsoverride DRIVER "USB Audio 2.0" SYSTEM powercfg /requestsoverride PROCESS Playnite.FullscreenApp.exe SYSTEM

Undo: powercfg /requestsoverride DRIVER "USB Audio 2.0" powercfg /requestsoverride PROCESS Playnite.FullscreenApp.exe

zomgugoff commented 7 months ago

The workaround listed does not appear to be helping with screen-waking issue from a display-off state. (Not in sleep/hibernate)