[SDL] SDL tampers with display power settings on the sly

Solra Bizna sbizna at tejat.net
Mon Feb 25 03:50:09 PST 2008

On Mon, Feb 25, 2008 at 3:29 AM, Erik <esigra at gmail.com> wrote:
>  I get the point about media players, but games?!? Games are interactive
>  like most other programs. It is not like people start a game and then
>  just sit there watching it without doing anything at all for several
>  minutes.
Halo for Mac, for instance, doesn't disable the screensaver. When my
sister is playing it with her gamepad, she has to move the computer's
mouse every 10 minutes or the screensaver comes up mid-game.
Usually it happens in the middle of a firefight.
SDL captures the screen on the Mac, though, which automatically
disables the screensaver, so it's not a problem for fullscreen SDL

> That is the wrong question. It should be "Does that happen properly in
> *every* application in *every* codepath, even if an exception is thrown,
> the process is killed or something similar?" And even if it would be
> guaranteed to restore the setting at exit, it would still be broken
> while the program is running (even in background).
SIGKILL a fullscreen app that's grabbed the mouse. Like the
screensaver, what results is not something SDL or any other client
code can fix. It's a fundamental problem with X11.
If you really want to fix this problem on Linux, beg the Xorg
developers for some sort of "temporarily disable screensaver while
this client is running" command.

More information about the SDL mailing list