I have ripped the web up trying to figure this out. Bumblebee hasn't helped. I want to run Minecraft on the Nvidia GPU in my laptop. As far as I can tell, Ubuntu default runs it with Intel because Minecraft runs inside of Java, which, obviously, is not generally GPU intensive. I'm using Bionic Beaver, and the optirun command is broken. It throws an error that the nvidia-fallback.service is disabled, but trying to enable it reveals that the file doesn't exist. As far as I can tell, this is a Bionic Beaver problem. The primusrun command seems to work, but now I can't make it run Minecraft specifically. I feel like the problem could be fixed with an Nvidia application profile for Java runtime, but I don't understand the documentation on Nvidia's website. If someone can just post a rule key that forces an application to use Nvidia (and actually works; I found one, but it's "not recognized"), that would be great.
specs: Lenovo y520 laptop i5 CPU Intel 620 HD/Nvidia geforce 1050 ti 8 gb ram Ubuntu 18.04
if I missed any specs, please tell me, I'm new to posting questions.