Poor Linux Performance Hybrid GPU NVIDIA GeForce GTX 1650 Mobile / Max-Q (MSI Prestige 15 A10SC Laptop)

Hello everyone!

I use OBS to record videos and I’ve noticed lagging and high “average to to render frame” (around 20 ms per frame but on some scenes it goes up to 60 ms).

After some tests using Nvidia Optimus I notice that my glmark2 score it higher (better performance) with the integrated graphics (Intel) than with the discrete GPU (NVIDIA GeForce GTX 1650 Mobile / Max-Q)
https://wiki.debian.org/NVIDIA%20Optimus

Results below:

My NVIDIA Driver is 470.86

This is my setup:

OS: Debian GNU/Linux bookworm/sid x86_64
Host: Prestige 15 A10SC REV:1.0
Kernel: 5.15.0-2-amd64
Packages: 3176 (dpkg), 15 (snap)
Shell: bash 5.1.12
Resolution: 1920x1080
DE: Plasma 5.23.4
WM: KWin
Theme: Breeze Light [Plasma], Breeze [GTK2/3]
Icons: [Plasma], breeze-dark [GTK2/3]
Terminal: konsole
CPU: Intel i7-10710U (12) @ 4.700GHz
GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q
GPU: Intel Comet Lake UHD Graphics
Memory: 7311MiB / 31940MiB

Please find nvidia-bug-report.log attached.

Why is the performance so poor? Any idea on how to improve it?

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

glmark2 is quite outdated and useless with render offload, rather use some unigine demo or gputest from phoronix test suite.
Are you running the things to capture full-screen or windowed? Does disabling compositing in kwin beforehand have any influence on it?