Fedora nvidia optimus low fps

i use fedora gnome. I have an optimus laptop. i am using the graphics card as a hybrid. I’m trying to play starcraft 2 by running it through lutris. but fps is not stable. it is constantly falling and the game is constantly twitching. instant freezes occur. The fps values are too low. I installed the drivers without any problems. seems to work flawlessly .please help me how do i solve this problem?

$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo|egrep “OpenGL vendor|OpenGL renderer”
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 940MX/PCIe/SSE2

Does this also occur when using the nvidia gpu as PrimaryGPU? Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

yes it is happening. both have the same problem

nvidia-bug-report.log.gz (112.8 KB)

Unfortunately, nvidia-smi isn’t installed so no clocking info was included in the logs. Please check if the gpu is properly clocking up while running the game using nvidia-settings.