This had been put off several times already, given the various tight deadlines I was facing and the fact that apart from some minor inconvenient issues (i.e. heat issues + shortened battery life + a few OpenGL rendering glitches) there weren't any really pressing issues for which it was essential that I got my NVidia card working (especially considering the price of failure: a non-functioning Linux setup, potentially with a forced return to Windows 8).
There are many different variants of this procedure out there. In the end, I ended up picking and choosing bits and pieces from several sources as necessary. These were:
The exact set of steps I did were as follows.
A) Add package sources
1) sudo add-apt-repository ppa:xorg-edgers/ppa # for nvidia-319 drivers
2) sudo add-apt-repository ppa:bumblebee/stable # for bumblebee
3) sudo apt-get update
B) Install all the necessary packages in one go (and let the package-manager figure out how to handle all this)
4) sudo apt-get install bumblebee bumblebee-nvidia nvidia-319 nvidia-settings-319 virtualgl
(Notably, I've skipped the linux-headers-generic stuff, since I've probably had these installed anyway by something or other. laptop-mode-tools I ended up installing later for good measure, but it isn't necessary)
C) Edit bumblebee.conf so that it finds things correctly
5) gksu gedit /etc/bumblebee/bumblebee.conf
6) Find and ensure that the following lines in this file are as follows:
# You need to explicit the driver used by Bumblebee server....
# colon-separated path to the nvidia libraries...
(Note: the highlighted bits are the things you have to add or replace relative to the existing configuration, which refers to "nvidia-current")
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
D) Restart computer
Hopefully after restarting everything booted up alright. Those were some tense moments there as I waited for it to boot up successfully...
E) Test that everything works fine
7) glxgears => 60fps
8) optirun glxgears => 1192fps
9) optirun blender => Card used is NVidia 740M running on nvidia-319.17, and none of the graphical glitches seen when using the Intel
F) Add shortcut in Menu for Nvidia Settings
This particular installation procedure doesn't seem to allow for the Nvidia Settings application to be added to the Mint Menu. Instead, by default, you must invoke it from the command-line (nvidia-settings).
If you run this without prefixing it with "optirun" though, it will throw a warning about the NVidia card not being configured correctly to work with XServer. IGNORE THIS WARNING!
To get things working correctly, you don't want to run the suggested command, or else it could very well end up corrupting your display configuration. Instead, use the following gem from the Bumblebee FAQ:
optirun -b none nvidia-settings -c :8To make things easier to use, create a custom launcher in your menu for accessing the Nvidia Settings (with the command above as the command for that launcher). This simplifies the process of quickly checking your config settings and/or the temperature of the GPU.