NVIDIA repository improvements

I’ve just pushed a big update to the Nvidia repository. The list of changes is quite big, so if you are a user of the repository please take your time to read through it.

CUDA

CUDA has been replaced with version 7 for all supported RHEL/CentOS/Fedora releases, with the main difference being no more support for 32 bit systems. From now on, there will be no compatibility packages for the i686 architecture. So, after upgrading, make sure to remove all the i686 pacakges (that is, yum/dnf remove cuda\*.i686).

Apart from this, CUDA 7 packages introduce new stuff, improves on the packaging and can now run correctly on all Fedora systems, including Fedora 22, which was not supported by CUDA 6.5. As announced previously, the only “regression” is when enabling C+11 on GCC 5.1 (i.e. Fedora 22).

The new packages take into consideration the Nvidia provided ones, and replace them accordingly; so if you have their packages installed it should upgrade them where appropriate leaving no traces of the former. Local changes include the pkg-config files for development packages (not included in their self installer and in my 6.5 packages) and the segregation of static libraries in their own subpackage, thus reducing installed size greatly. The next step is to proceed like for the open components of the Nvidia driver: replacing all the pre-built binaries with source compiled stuff. At the moment, this includes cuda-gdb, for which sources do exist.

NVIDIA driver

The Nvidia driver has seen a repackaging of the main components, where the biggest change is the library layout.

All the unique libraries are now in standard locations, leaving only the duplicate ones under /usr/lib{,64}/nvidia. Also, X configuration files that the user should avoid touching, have been moved under /usr/share/X11/xorg.conf.d. Library dependencies have been reduced, so you can now compile a program against the NVML library (libnvidia-ml.so.1) or CUDA without needing to install the full driver or using the Nvidia provided stubs.

This makes for a simpler package with a simpler filter for conflicting libraries and is also propedeutic work to enable hardware accelerated encoding with Steam In-Home streaming and Nvidia drivers. Hardware decoding in Steam has been put in place, so now it’s time for the (only) supported hardware encoding.

NVIDIA beta driver (355.xx)

The biggest change comes with the 355.06 driver in Fedora 23, which introduces partial support for the GL Vendor-Neutral Dispatch library (libglvnd), a new kernel module building system (in preparation for their modeset driver after the 355.x series) and dropped support for Nvidia instanciated modules.

The new beta driver requires the GL Vendor Neutral Dispatch library in place for proper operation, and being this a separate open source project (only a prototype in Mesa, at the moment) it has been built from source. So there is now a required libglvnd package that only contains the libraries required by the driver for running. The more they are integrated with the driver, the more I will enable in the package. This is a transitional package only, as sooner or later Mesa and the X server will introduce the same mechanism, making the transitional package obsolete and just using distribution provided packages.

This with could eventually lead to system running different OpenGL implementations at the same time, solving the Optimus and multiple cards from multiple vendors combination issues.

The Nvidia control panel can be optionally linked to NVML, so I’ve tried to enable it in the beta drivers. I don’t see any changes so far, but probably this is due to the fact that I don’t have new enough cards to be compatible with NVML.

The beta driver has been pushed to the Fedora 23 branch only, as explained in the Nvidia repository page.

As always, feedback is welcome.

CUDA 7.0 enabled programs for Fedora 22

nv-cuda-2014header-updatedI’ve udpated the CUDA version in the Fedora 22 Nvidia repository, it now contains CUDA 7.0.28 along with the cuFFT 7.0.35 patch. Note that from this version, CUDA is x86_64 bit compatible only, so there are no more i386 packages. There is still the cudart library available for 32 bit, but I don’t think it’s worth packaging.

The packages hosted here should correctly upgrade and obsolete the ones in Nvidia’s own repository, so it should be possible to go straight from one version to the other, if you need.

The static libraries (according to packaging guidelines) have been placed in a cuda-static package, thus reducing by an order of magnitude the size of the packages containing libraries. The toolkit can of course be installed and used to create CUDA binaries on systems where there is no Nvidia adapter installed.

The Nvidia compiler (nvcc) throws an error if the GCC version detected is higher than 4.9 (Fedora 22 default is 5.1.1), but the removing the check makes the compiler run fine until you enable C++11 support. If you need to enable C++11 support you need to use a separate GCC, older than 5.x, for compilation. See this comment here for details.

As part of the update, the repository that contains CUDA enabled programs (Blender, CCMiner and NVENC enabled FFMpeg) has been updated for Fedora 22. This is completely optional, so you can have Nvidia packages on your system and still use RPMFusion’s FFMpeg and Fedora’s Blender. I’ve tried to submit Blender updates to the appropriate package maintainer but did not receive any answer.

I will rebase all distributions to CUDA 7.0 as soon as the next long lived driver release will be branched by Nvidia.

As always, feedback is welcome. If you have any issue or would request an enabled CUDA package to add to the repository, just write in the comments or write me an email.

CUDA enabled programs

There is a new repository available with CUDA enabled programs in package format. This contains programs that have been linked to CUDA libraries or have CUDA support enabled. At the moment this is available only on Fedora 21, if there is sufficient feedback I will enable it also for other distributions.

The repository is available here.

At the moment of writing, the repository contains the following:

  • Nvidia Encoder (NVENC) enabled FFMpeg
  • CUDA and FFMpeg enabled Blender
  • ccminer (multi cryptocoin miner)

Please keep in mind that these packages update already available packages that are in Fedora and RPMFusion, so you might step into other dependency issues if you have tons of other programs using these libraries on your system.

Also, CUDA 6.5 works only on fairly recent GPUs, so your old models might not be compatible. Follow this Nvidia link to check if your GPU is CUDA capable. Basically, anything with Compute Capability >= 2.0 is ok. Also the Wikipedia article on CUDA has all the Compute Capability information available.

The Blender build looks for libcuda and the Nvidia Unified Video Memory module on the system to enable CUDA support. By installing the Nvidia driver from my repository with CUDA support, you should have a working Blender installation that is able to use your GPU for rendering.

Screenshot from 2015-04-27 20:03:57

As you can see from the picture, I only have the basic Nvidia driver plus CUDA support installed, there is no need to install the full CUDA stack. The runtime is required only for additional specific libraries (like ccminer that uses some specific CUDA math libraries).

This build of Blender looks for libcuda.so.1; so if you are using the official Blender build from blender.org, you also need to have the full nvidia-driver-devel package installed as it contains also the libcuda.so symlink.

To recap, this is what is required to have a fully working Blender with CUDA and FFMpeg support enabled on Fedora 21:

# yum-config-manager --add-repo=https://negativo17.org/repos/fedora-cuda-programs.repo
# yum-config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
# yum install kernel-devel akmod-nvidia nvidia-driver nvidia-driver-cuda blender

Then reboot, and make sure the nvidia-uvm.ko module is loaded.

Big update to the Nvidia driver repository (346.xx, 340.xx compat, CUDA)

My personal Nvidia repository has seen quite a few updates on versions, CUDA enablements, legacy drivers and Delta RPMS.

Long Lived branch

Version 346.35 is now the new Long Lived branch release, this, plus the fact that is the newest made it to all supported distributions (CentOS/RHEL 6/7, Fedora 20/21/rawhide).

Here is the table that lists the current versions:

Operating systemCentOS / RHELFedorarawhide
Driver branchLong LivedShort Lived
Long Lived
Short Lived
Long Lived
Beta
Video Codec SDKYesYesYes
Architectures:

x86_64
aarch64
YesYesYes
Basic nvidia driver:

nvidia-driver
nvidia-driver-libs
nvidia-libXNVCtrl
nvidia-kmod-common
YesYesYes
CUDA libraries and tools:

libnvidia-ml
nvidia-driver-cuda
nvidia-driver-cuda-libs
nvidia-persistenced
YesYesYes
OpenGL Framebuffer Capture:

libnvidia-fbc
YesYesYes
Nvidia tools:

nvidia-modprobe
nvidia-settings
nvidia-xconfig

YesYesYes
Binary kernel
modules (kABI):

kmod-nvidia
YesNoNo
DKMS kernel
modules:

dkms-nvidia
YesYesYes
aKMOD kernel
modules:

akmod-nvidia
NoYesYes
32 bit compatibility on x86_64:

libnvidia-ml
nvidia-libXNVCtrl
nvidia-driver-libs
nvidia-driver-cuda-libs
YesYesYes
VDPAU librariesYesYesYes
EGLStream-based Wayland external platformYesYesYes
GBM EGL external platform libraryYesYesYes

CUDA stack

A complete packaged CUDA stack has been added for all supported distributions. This now includes all CUDA libraries and tools at version 6.5.19 (includes NVML / GPU deployment kit). You can easily install CUDA 6.5 on CentOS/RHEL 6/7 and Fedora 20/21/rawhide!

All the packages provide/require/obsolete the relevant driver packages in the RPMFusion repository and all the CUDA packages in the Nvidia repository; so you can enable this repository along with the official Nvidia CUDA one and RPMFusion at the same time. Packages will get upgraded accordingly.

Nvidia is slowly fading out 32 bit support from CUDA, and you can see it reflected in the various packages. The Unified Video Memory kernel module (nvidia-uvm.ko has been removed in version 346.16, CUDA graphical programs are 64 bit only, many libraries and compilers are available in 64 bit only, etc.

Feedback from users has been integrated, where possible.

List of components by distribution:

Operating systemCentOS / RHELFedorarawhide
CUDA cuDNNYesYesYes
GCC compatibility
(if needed)
-cuda-gcccuda-gcc
Basic CUDA libraries/tools:

cuda
cuda-libs
cuda-cuda
cuda-cli-tools
cuda-cublas
cuda-cudart
cuda-cufft
cuda-cupti
cuda-curand
cuda-cusolver
cuda-cusparse
cuda-extra-libs
cuda-libs
cuda-npp
cuda-nvjpeg
cuda-nvrtc
cuda-nvtx
cuda-nvvp
cuda-samples
cuda-sanitizer
YesYesYes
CUDA development:

cuda-cccl-devel
cuda-cudart-devel
cuda-cudnn-devel
cuda-cupti-devel
cuda-cuxxfilt-devel
cuda-devel
cuda-nvml-devel
cuda-nvprof-devel
cuda-nvrtc-devel
cuda-nvtx-devel
cuda-profiler-devel
cuda-sanitizer-devel
YesYesYes
GUI programs:

cuda-nsight
cuda-nvvp
cuda-nsight-compute
cuda-nsight-systems
YesYesYes

Legacy drivers 340.xx

A compatibility repository for drivers on 340.x, the new legacy release for cards up to 9xxx chipsets has been introduced. It’s in the same place, just follow the instructions by appending -340 to the repository file. This repository does not include the CUDA packages, just the enablement on the drivers.

The repository itself it’s not guaranteed to stay online forever; the GTX 9xxx series are from 2008 and I don’t guarantee I will maintain it for long.

Delta RPMS

Delta RPMS have been introduced, to reduce the time and data required for upgrades. Driver packages can reach 90 mb and CUDA packages can span even 650 mb. This would save you a lot of time into upgrading them. For now, delta RPMS have been generated for the new 346.35 drivers, and this reduced nearly 80% the download size on Fedora 21.

We’ll see some real gain when updating the CUDA packages.

Ending words

Along this, there is the usual assortment of packages refinement (syntax, RPMLint, optimizations, etc.). For additional details, please see the Nvidia driver page.

As time permits, new CUDA enabled packages will be added to the repository, namely Blender, ccMiner, NVENC enabled ffmpeg, etc.

As usual, any feedback is much appreciated!