[SOLVED] dGPU is not used with java on Linux in my case Minecraft or more precisely the CurseForge Launcher

This was also required to get a new game that came out today to run on the dGPU, The First Descendant.

In the steam settings for this game, Launch options:

DRI_PRIME=1 DXVK_FILTER_DEVICE_NAME="AMD Radeon RX 7700S (RADV NAVI33)" %command%