This solution worked for me, but I had to manually install nvidia-dkms-390.
I think bumblebee-nvidia should pull in this package automatically.
My steps were:
1. apt purge nvidia* bumblebee*
2. apt install bumblebee-nvidia nvidia-dkms-390
3. edit the config file exactly as provided by Rocko in post #1
4. create the blacklist file accordingly
5. disable nvidia-fallback
This solution worked for me, but I had to manually install nvidia-dkms-390.
I think bumblebee-nvidia should pull in this package automatically.
My steps were:
1. apt purge nvidia* bumblebee*
2. apt install bumblebee-nvidia nvidia-dkms-390
3. edit the config file exactly as provided by Rocko in post #1
4. create the blacklist file accordingly
5. disable nvidia-fallback
After reboot, optirun works.