mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Set CUDA_DISABLE_PERF_BOOST to workaround p2 power level issue. Required nvidia driver >= 580.105.08
This commit is contained in:
@@ -3102,6 +3102,10 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
set_display_server_environment_variables();
|
set_display_server_environment_variables();
|
||||||
|
|
||||||
|
// Linux nvidia driver 580.105.08 added the environment variable CUDA_DISABLE_PERF_BOOST to disable the p2 power level issue,
|
||||||
|
// where running cuda (which includes nvenc) causes the gpu to be forcefully set to p2 power level which on many nvidia gpus
|
||||||
|
// decreases gpu performance in games. On my GTX 1080 it decreased game performance by 10% for absolutely no reason.
|
||||||
|
setenv("CUDA_DISABLE_PERF_BOOST", "1", true);
|
||||||
// Stop nvidia driver from buffering frames
|
// Stop nvidia driver from buffering frames
|
||||||
setenv("__GL_MaxFramesAllowed", "1", true);
|
setenv("__GL_MaxFramesAllowed", "1", true);
|
||||||
// If this is set to 1 then cuGraphicsGLRegisterImage will fail for egl context with error: invalid OpenGL or DirectX context,
|
// If this is set to 1 then cuGraphicsGLRegisterImage will fail for egl context with error: invalid OpenGL or DirectX context,
|
||||||
|
|||||||
Reference in New Issue
Block a user