When nvidia_modeset is loaded by an nvidia driver built with the USE="kms" flag, running rmmod nvidia fails due to nvidia_modeset depending on nvidia. modprobe -r nvidia also doesn't work. This issue causes bumblebee to fail to shutdown the dGPU and causes lockups after sleep if the nvidia driver isn't unloaded before sleeping. This is the same problem as in Bug 506168 but with nvidia_modeset rather than nvidia-uvm. A similar fix will work, adding a remove nvidia modprobe -r --ignore-remove nvidia_modeset nvidia line into /etc/modeprobe.d/ and bumping bumblebee to a version using modprobe -r rather than rmmod.
What happens if you get combinations of nvidia-uvm|nvidia-modeset + nvidia ?
Changing the line in /etc/modprobe.d/nvidia-uvm.conf to remove nvidia modprobe -r --ignore-remove nvidia-uvm nvidia-modeset nvidia works with all combinations of nvidia_modeset and nvidia_uvm. I'm not sure why the - vs. _ doesn't matter as lsmod lists the modules with _ but having - in modprobe.d works. This solution still needs a new enough bumblebee to use modeprobe -r rather than rmmod.
Should be set in 358.16-r1.