Prime-run bad performance compared to nvidia-only

Hello again,

Running on Archlinux on a laptop with RTX 3060 max q.

I’ve found that prime-run performs far worse than NVIDIA only. I noticed it playing Elden ring, which normally would run great in nvidia-only, on prime-run lags considerably.

Is it a bug?

I used glmark2 to compare nvidia-only with prime-run.

I attached nvidia-bug-report while running glmark2.

For example running glmark2 on nvidia-only it get around 8500 fps on the first test.

[druida@arch ~]$ glmark2
=======================================================
glmark2 2021.12

OpenGL Information
GL_VENDOR:     NVIDIA Corporation
GL_RENDERER:   NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
GL_VERSION:    4.6.0 NVIDIA 525.60.11

=======================================================
[build] use-vbo=false: FPS: 8686 FrameTime: 0.115 ms
[build] use-vbo=true: FPS: 15915 FrameTime: 0.063 ms

On the other hand, switching to prime-run the performance is rather worse:

[druida@arch ~]$ prime-run glmark2

glmark2 2021.12

=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 525.60.11

[build] use-vbo=false: FPS: 890 FrameTime: 1.124 ms
[build] use-vbo=true: FPS: 899 FrameTime: 1.112 ms

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

GLmark2 is outdated, completely useless on hybrid graphics notebooks.
Nevertheless, 525.60.11 has a bug regarding render offload:
https://forums.developer.nvidia.com/t/vk-khr-present-id-wait-causes-device-loss-on-nvidia-525-60-11-on-prime-setup/236510?u=generix
So it’s rather a wonder elden ring is starting at all.