eubnara / troubleshooting

이것저것 공부하다가 맞닥뜨리는 문제점, 해결방식 등 정리
2 stars 0 forks source link

nvidia on demand on linux #60

Open eubnara opened 2 years ago

eubnara commented 2 years ago

윈도우에서처럼 자동으로 부하에 따라 그래픽카드를 선택해 주지 않는다. 기본적으로 iGPU (integrated GPU 를 사용하고) dGPU (discrete GPU) 로 사용하기 위해선 command 앞에 환경변수를 넣어야 한다.

There is no automatic switch in linux (automatic switch only works in windows) and use of Nvidia GPU can only be done by manually add the prefix before the command.

For Vulkan :

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=non_NVIDIA_only

For GLX + OpenGL

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia

참고