No idea, but what I can tell you is that this is driver-related, DXVK itself doesn't even know that Prime is a thing and does pretty the exact same thing no matter which mode you pick.
Does VKD3D show the same behaviour?
Maybe background apps such as your browser use the GPU in performance mode?
Maybe background apps such as your browser use the GPU in performance mode?
Nah, same thing happens with everything closed.
No idea, but what I can tell you is that this is driver-related, DXVK itself doesn't even know that Prime is a thing and does pretty the exact same thing no matter which mode you pick.
Does VKD3D show the same behaviour?
I just tried, and it doesn't happen using VKD3D. Both modes give the same fps. So it only happens in dx11 mode
In "Performance Mode" (info about it in NVIDIA README) all X11 apps use NVIDIA GPU to render everything they need. That leads to more aggressive dGPU usage and games will run slower because some app (for example browser) uses GPU resources that game needs). Integrated GPU only controls internal display and displays everything on it that was rendered on NVIDIA GPU.
In "PRIME Render Offload" mode (info about it in NVIDIA README) only apps that you specified (by adding __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command% to Steam game/app launch options or by running this app with this environment variables in terminal or by pressing "Launch using discrete graphics card" in GNOME 3.36+ or if app developer added PrefersNonDefaultGPU=true in .desktop file (xdg-specs merge request, Desktop Entry Specification), you run this app from DE Applications Menu and DE supports this option (Today they're no DEs that support this) will run on NVIDIA GPU. This leads to lower dGPU usage because not every app uses NVIDIA GPU.
See also "Chapter 17. Using the NVIDIA Driver with Optimus Laptops" in NVIDIA README.
And if you have Intel Coffee Lake+ CPU (8/9 series) and NVIDIA Turing+ GPU (16/20 series) you can enable dynamic power management for your GPU so it will turn off if it's not used.
Check NVIDIA README for more information.
Well that doesn't explain why mhw gains almost 15 fps with offload mode while all other games (that I tested yet atleast) have the same fps in both offload and performance modes. They just stutter a bit more in performance mode. That could be because of GNOME running in background, but I also tried with Budgie and the result was the same.
The power management thing is interesting tho, I had no idea.
Does the PowerMizer mode have any effect?
Does the PowerMizer mode have any effect?
Nope, even with "maximum performance preferred" set it doesn't change anything.
I'm wondering if it only happens to me or if any optimus laptop user can reproduce it. I'll try to find if there's another game that gives such difference between the two modes.
Edit: Ok I tried with many games, none of them gave me a performance difference in either modes. So far only mhw in dx11 is affected. The other games still feel smoother when offloaded tho, at the same fps than the performance mode.
Concerning the smoothness in some games, seems it has something to do with vsync. When I set dxgi.syncInterval = 2 in dxvk.conf, games are way smoother, but the framerate drops by ~10 fps
This an interesting finding that we are tracking as NVIDIA bug 2898587. We'd like to hear about any other games that exhibit this performance bump with render offload.
Glad to hear it's being tracked down. Sadly I didn't find any other game with that performance bump so far. I don't even know if the monster hunter performance bump only happens on my end or not. It would be nice if someone else could give it a try.
I realized while in Ondeand mode My nvidia gpu generates less heat than performance mode.
I just switched from the Nvidia performance mode to the Prime offload mode through nvidia-settings and some games feel smoother. Monster Hunter World even gave me a considerable fps boost with prime offload (not using VKD3D).
Here with prime offload :

Here with nvidia "performance" mode :

Most games don't get this boost with prime offload, but just feel smoother overall. When I use the nvidia performance mode, some games feel sluggish, even at 60+ fps. How can this be explained ? Is there any tweak to make the nvidia performance mode more smooth ?
System information
Log files
MonsterHunterWorld_d3d11_offload.log
MonsterHunterWorld_d3d11_performance.log