From: Tristan Croll (
Date: Tue Jan 13 2015 - 19:14:31 CST

It seems I'm left with one problem, though - to do with getting it to recover properly after a suspend, as per> Essentially, the driver has to be turned off before suspending using

optirun --no-xorg modprobe -r nvidia

prior to suspension, or it just doesn't wake up properly, and the system has to be rebooted in order to run another CUDA program. If I run an innocuous program through optirun - say,

optirun cat somefile.txt

then everything is fine. If, however, I've run and then closed VMD or NAMD, the above modprobe command gives the error:

modprobe: FATAL: Module nvidia is in use.

.. suggesting some hold on the module is persisting after VMD and NAMD are closed. Any thoughts? Would be a pain to have to reboot every time I close the lid on the laptop.



From: <> on behalf of Tristan Croll <>
Sent: Wednesday, 14 January 2015 10:29 AM
Subject: namd-l: Running CUDA on a laptop

Hi all,

Having just spent a very solid day banging my head against a wall to get a new laptop up and running with CUDA, I thought I'd share my experience here. CentOS 7 was a wash for me - while it may be possible, there will be a lot of manual adjustment of configuration files etc. required to get it going. For me (installing on an MSI GT60 2QD, with the Maxwell generation GTX970), following the instructions at from a clean Fedora 21 install got most of the way there with little fuss. The only addition I had to make was to install the 343.16 NVidia driver downloaded from the NVidia website (this shouldn't be necessary for Kepler or earlier GPUs). Note that if using these, it's vitally important to include the --no-opengl-files switch and to choose NOT to update xorg.conf when prompted, otherwise you'll bork your desktop.

If you've followed the instructions correctly up to and including the "Make the Suspend of the NVidia GPU work" section (note that there's one missing step - you need to add your user to the "bumblebee" group), then you'll find that you can run CUDA builds of NAMD or VMD by prefixing with optirun, e.g.

optirun vmd


optirun namd2 <args>

This gives the program exclusive access to the NVidia GPU driver - as far as the rest of the system is concerned, the NVidia GPU doesn't exist.

The reward is a portable system that runs really quite surprisingly fast simulations, plus all the newest vmd goodies.