Nvidia's native Linux drivers support Optimus now, there's nothing special you need to do other than install their latest proprietary driver from a repository and use the provided software that's included (Prime) to swap between integrated or dedicated graphics. You don't even need to bother with bumblebee anymore.
That's news for me. Last time (2018) it did not work for my chipset properly like hdmi-out without function and driver crashes. Good if it is finally solved and user-friendly.