[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame GUI keeps monitor from sleeping?



> If I disable the Pygame GUI in the script the monitor powers off after 15 minutes as usual.
>
> Is this expected behavior?

This thread https://forums.libsdl.org/viewtopic.php?p=11385 would make it appear like it would be a very reasonable conclusion that this was expected behavior. There's even an environment variable mentioned `SDL_VIDEO_ALLOW_SCREENSAVER`, which you can set to disable this behavior. You'd do that by exporting it or the command line before the executable, ie. `SDL_VIDEO_ALLOW_SCREENSAVER=1 ./script.py`. You might even add the variable in `os.environ` in your script before initializing pygame.display.

cheers!

mar77i


Sent with ProtonMail Secure Email.