Hacker News new | past | comments | ask | show | jobs | submit login

PowerSetActiveScheme sets the system power plan, it's not something a game should be doing without telling the user first.



I've had games do this and found it annoying since I like my PC to run in balanced mode. Not so much to save power but to let the machine idle when I'm not using it. Found I could work around it by deleting the power plans other than balanced.

I've never played OP's game, so evidently a few games are out there doing this.



Translation: "We didn't provide the necessary API support, so now we're going to whine about ad-hoc brute force solutions that developers would never have had to resort to if we'd done our jobs."

Why isn't there a function I can call that enforces full CPU power, but only while my application is running? I never wanted to change global system-level settings, but if that's the only affordance provided by the Win32 API, then so be it.


Because you're generally not supposed to overwrite the users performance settings temporarily either?


It would be nice if it were that simple. Unfortunately, power settings under Windows are incredibly (and unnecessarily) complex, and I doubt that one in twenty users even knows the options are available. Worse, the Windows power settings tend to revert magically to "energy saving" mode under various unspecified conditions. This phenomenon almost cost me an expensive session at an EMC test lab once, when data acquisition on the device under test repeatedly timed out due to CPU starvation.

It's entirely reasonable for performance-critical applications (not just games!) to be able to request maximum available performance from the hardware without resorting to stupid tricks like the measures described in this story, launching threads that do nothing but run endless loops, and so forth.

I do agree with those who point out that this should be a user-controlled option. On the application side, this could be as simple as a checkbox labeled "Enable maximum performance while running" or something similar. Ideally, the OS would then switch back to the system-level performance setting when the application terminates, rather than leaving it up to the application to do the right thing and restore it explicitly.


Sometimes those are the user’s performance settings, but more often the user has no idea what these performance settings you speak of are and they just don’t want to see your game stutter. It would be nice to be able to distinguish these cases, and this user would love if games could temporarily disable aggressive power saving automatically when I’m running a game and put it back the rest of the time.


Alternative translation: "Our documentation is weak and our engineering teams aren't held accountable for it, so we're blaming third-party developers instead of doing our jobs".


Perhaps if the user has a slow old CPU we could also order them a new one on Amazon for use only while the game is running too...


Or perhaps when i set "Disable power saving" for USB devices Windows would actually do this. It's bad to be in a Teams meeting and from time to time your USB Bluetooth adapter to be disconnected.


That's a good point--I'll look into whether Microsoft has any guidelines on this, and add a disclaimer to the article when I get a chance.


Interestingly, Garage Band on my G5 kicks power management to highest performance without asking, though it turns it back down when it quits. Guess Apple didn't have a problem with it.


It probably also won't reset the setting if the game crashes.


Yeah, this feels like really bad UX.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: