Just another blog of computer ramblings

Main menu

Post navigation

Getting the nvidia-346 drivers to cooperate with CUDA on Linux Mint

UPDATE: As of March 17th, Nvidia’s repository has been updated to support the 346 driver, alongside the release of the Cuda 7 toolkit.

——————————————————————————–

I recently discovered that FFmpeg added support for the NVENC encoder and thought it would be interesting to play around with. Turns out, that ended up taking a lot more work than I anticipated and it wasn’t FFmpeg’s fault. The beginning of my trouble is that NVENC support was only added to the Linux driver in version 346.16. However, the Ubuntu/Mint repository’s newest offering is 331.113. Fortunately, the xorg-edgers ppa has newer drivers available (refer to the launchpad page), so that turns out to not be much of an issue.

Now for the CUDA installation. The download page has two options: a standalone installer and a package repository.

For whatever reason, I tried the standalone installer first (currently toolkit version 6.5.14). I’m not going to go into too much detail, because it didn’t work (if you just want to know what did work, then skip the next bit). It installed fine though. I went into the samples and found 1_Utilities/deviceQuery, a suitable program to test my installation. It compiled fine. Then, this happened:

Well, that doesn’t really make sense. The installer is bundled with driver version 340.29, which I declined to install. But, a newer driver is supposed to be fine. What gives? I also tried toolkit version 6.5.19 to no avail. Next, I thought that since I have a sample compiled, I just need the runtime, so I removed the toolkit. That didn’t help either.

Hooray! An even more ambiguous error. Fine, time to try the repository instead. Repositories always make things easy, right?

After adding the repository:

$ sudo apt-get update && sudo apt-get install cuda

…And it wants to replace the nvidia-346 drivers with the nvidia-340 drivers. Poking around the repository, they only have packages up to 340.29. Normally, I wouldn’t be too bothered by that, but I need the 346 drivers for NVENC support. So, there must be a dependency issue somewhere in the dozens of packages that need to be installed. The culprit turns out to be cuda-drivers, whose dependencies are:

7 thoughts on “Getting the nvidia-346 drivers to cooperate with CUDA on Linux Mint”

Even though now “irrelevant,” thanks for writing this. It’s good to see this list of all the moving parts necessary to get CUDA working on Linux. I had trouble as well getting CUDA set up… before CUDA 7, but thankfully after CUDA 7 much of what you describe above happens behind the scenes.

So helpful. Maybe irrelevant for the very issue you had but a great source of inspiration to solve the problem I faced with installing cuda-7-5.
For some reason the dependencies required nvidia-settings >= 352.68 but I never found a newer version than the 346 my Mint 17.2 is using.
Based on your explanation I could edit the control file and go further.