I was perpetually struggling with this issue, trying to accelerate Minecraft so I could comfortably play without serious lag, when I discovered an old thread on Arch Forum, which I started in 2016: https://bbs.archlinux.org/viewtopic.php?id=220854
Note: I have uninstalled Bumblebee+Primus and opted for the Standalone Nvidia Proprietary Drivers. They can be found on Nvidia's website and probably in arch via the AUR or something similar.
Either install nvidia-xrun through the AUR or clone it. https://github.com/Witko/nvidia-xrun
If you clone it be sure to disable sddm and follow the directions in README carefully, or else it won't work.
Good Luck Everyone!