Skip to main content

Keep a GPU from sleeping by nudging an EGL context

Project description

EGLKeepalive

Mini script using ModernGL to keep a GPU from entering D3cold, by nudging an EGL context every second. Useful if you have a Nvidia Optimus laptop and the delay of GPU activation is annoying.

Installing

Available on PyPI as EGLKeepalive

Recommended install using pipx:

$ pipx install EGLKeepalive

Example effect

$ cat /sys/class/drm/card*/device/power_state
D3cold
D0
$ # lazy Nvidia GPU is fast asleep; power saving or something...

$ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
$ # not this one

$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NV136
$ # this one, so use DRI_PRIME=1

$ DRI_PRIME=1 egl-keepalive &
$ # wakey wakey

$ cat /sys/class/drm/card*/device/power_state
D0
D0
$ # it's OpenGL time

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eglkeepalive-1.0.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eglkeepalive-1.0.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file eglkeepalive-1.0.0.tar.gz.

File metadata

  • Download URL: eglkeepalive-1.0.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for eglkeepalive-1.0.0.tar.gz
Algorithm Hash digest
SHA256 11ee579bd38bb4adfc99c06714977015fad4652e1fc8d4a09c0b79628f7a0313
MD5 44e2ad80de92a5951a2b69292d7f38a6
BLAKE2b-256 7f508d06204bb8af8b3a59babb2f7c11f40a4b8ba3affb9642fb6592bd48ca59

See more details on using hashes here.

File details

Details for the file eglkeepalive-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: eglkeepalive-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for eglkeepalive-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c9761564c1fa249b5e054b16bb6c4280e4ee4cb22f949dc0644a444f2c0fca1
MD5 59ffc3ce9fcc294c0b7920844020ea93
BLAKE2b-256 71e006e53ed2f6b7d22b56f2b0d4a6152c2dcf0e13ec2559c91e20fac62b2c4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page