Comment on Why don't laptops have proper low power states where useful stuff like downloads can run during sleep/with the lid closed?

<- View Parent
d3Xt3r@lemmy.nz ⁨1⁩ ⁨year⁩ ago

I haven’t developed a desktop app in ages so I’m probably not the best person to ask this, but my understanding is that if you develop a modern UWP app, then it automatically be S0 aware, and you can make use of WinRT APIs to execute background tasks. The user can also choose whether or not to allow this activity. I’m not sure if the WinRT APIs can be called from a regular Win32 app. For Win32 apps, as far as I’m aware, they should get suspended by the DAM automatically (and services may get throttled), but Windows may choose to unsuspend/unthrottle these apps if it thinks some critical activities are happening. I never looked into what it deems as a “critical activity”. Personally though I always disable S0 so that my laptop suspends as you’d expect it to

Bottomline is, if you’re making a UWP app it should all just automatically work, and if you’re making a Win32 app you need to look more into the DAM. There’s some info on that here: learn.microsoft.com/…/desktop-activity-moderator

source
Sort:hotnewtop