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-0.0.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

eglkeepalive-0.0.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for eglkeepalive-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9647f99a45f295c6d05657474361cd4ba51e3e56c225d7a1705f215f8cd3d641
MD5 a3f24a8e37bab363603cdbf0d660cb77
BLAKE2b-256 7ce527d1b8e12f0f3005cb8626857bdff703271de77ae9bae20f336335e97ba5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for eglkeepalive-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f2a4551b4e0492e47d3426251b67fb2334cb272cb37197c7612de50cf85c40a
MD5 e72f329848e8e73b2f90d23b674c93e7
BLAKE2b-256 cd38df8ffacec6eb4466b9a08564f1ab42661c4e5ce334af0fe6f1d04bdb3701

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