SchizoDuckie/DuckieTV

nwjs 0.69 chromium 106: the use of standalone unattended results in ADS going to sleep

garfield69 opened this issue · 1 comments

from Reddit https://www.reddit.com/r/duckietv/comments/11ehjpm/comment/jbjc8n2/?utm_source=reddit&utm_medium=web2x&context=3

stageshooter:
I'm wondering if this is why I'm having a similar issue. I'm running Duckietv on an old media server running Windows 10. I'm rarely on the server unless I'm fixing something, and it's set to never sleep. Recently it stopped auto downloading my episodes when it's left alone, but as soon as I remote into the server I see it downloading the magnet and it downloads the content properly. I assumed this is more of a PC issue than a Duckietv issue - but I'll play with the sources and check

and Reddit https://www.reddit.com/r/duckietv/comments/nl6zpl/comment/jc3q0oi/?utm_source=reddit&utm_medium=web2x&context=3

Lance_lake:
Confirmed that it is an issue. Newest nightly does not run the search while locked. As soon as I signed in it ran and started downloading.

So it appears 20230312 and 20230305 may suffer from chromium putting Dtv to sleep if the Dtv window is not focused, while 20230207 appears to continue to keep working.

Probably related to #1354 and #1321

I had intended to upgrade to NWJS 0.73.0 with Chromium 110 but discovered that with Chromium 108 a performance enhancement was rolled out that put unattended tabs to sleep to free up memory and or battery, and I cannot find a CLI chromium start-up option to disabled this. You can use the browser settings to disable, but that is impractical for the standalone.
And both the flags set by 1354 and 1321 have been removed, probably when 108 was published.

Since the only significant change between 20230207 and 20230312 is #1140 I have to assume that this somehow triggers the tab sleep mode for unattended windows, and buggered if I know how to resolve this at this stage.

I've upgraded to NWJS 0.75.1 which has chromium 112
this rolls out by default the high-efficiency-mode setting, which saves memory and battery by putting idles tabs to sleep, and replaces previous flags that dealt with freezing tabs. (which was experimental in 108).
I've loaded the NWJS package.json with the new chromium-args, "--flag-switches-begin --disable-features=HighEfficiencyModeAvailable --flag-switches-end" to disable that option and hopefully Dtv ADS will keep going forthose that run Dtv 24/7