The following appears when running optirun glxgears with primus and nvidia-331-updates configured in bumblebee.conf:

This is on 14.04 Trusty Tahr, upgraded from 13.10. The application seems to run on the nvidia gpu, but doesn't display correctly as it did in the previous distro version. I suspect this is a bug in primus in the 14.04 repos, unless one of my packages is poorly configured.
The window does refresh and display part of the glxgears image, but only when I shrink the window, and once per frame that the window is being resized. The GL viewport is scaled incorrectly in this process as well.
Continuing some testing, the PRIMUS_UPLOAD=1 flag seems to make the window refresh properly and everything works as intended. This is not a permanent solution though.