Simply impossible to use an Nvidia card on a real-time kernel (no musician can use nvidia)


This issue is pretty well known, but I’m still shocked by the fact that it is now years that nvidia provides drivers that are non-compatible with real-time kernels.

It is quite ridiculous since this issue can be fixed with a few lines of tweaks (see patches out there) but it makes it complicated for everyone as these patches become outdated…
See this page for technical details about the patch:
As you can see, it is now over 2 years that RT users (all musicians in fact) cannot use your drivers.

In the other end, “nouveau” drivers (the ones from the open-source community) work just fine.
In my case, I just have a problem with these drivers with HDMI connections (the pink/purple line bug)

Can someone from nvidia explain the Linux community why nvidia refuses to support RT kernels? or when this issue will be fixed?


If RT is so great why hasn’t it been merged into the kernel source code?

Because it depends on people’s needs.
RT is hosted on and developed by the same team…
It is not about great or not great, it is about the need to have an RT or not.


Use Arch Linux… it simplifies using the rt kernel (linux-rt) with the latest NVIDIA driver (nvidia-rt) by someone in the Arch User Repository maintaining the NVIDIA drivers to work with rt.


If there’s an Arch Linux compiled version of the NVIDIA driver that works with linux-rt… i’m pretty sure you can use the bin drivers from to compile on linux-rt.

the terminal commands would be…

yaourt linux-rt
yaourt nvidia-rt

It’s not developed by the same team, it’s not approved by Linus, it’s not “officially” supported and it’s not well tested.

Why would NVIDIA support such a kernel?

Maybe NVIDIA should support 20 more other custom kernels with all sorts of unofficial tweaks? No, NVIDIA is not a charity and they have a limited number of people in their Linux team.

I’m a musician, a Linux user, and the owner of a computer that came with an nVidia GeForce graphics card. I respectfully request you to PLEASE consider the following:
I got INTO computers in 1991 because of my music, and I bought my current computer (with an nVidia GeForce graphics card!) to record with.
The key aspect of recording that creates the requirement for a real time kernel is this:

Multitrack aka “Sound on Sound” recording, invented by Les Paul in the late 1940’s.

An initial recording is laid down, then additional tracks with other voices and instruments are layered on top of it while listening to the original track. If there is latency, the successive tracks are out of synch with the original. This ruins the recording, or requires additional non-intuitive steps to fix. It was originally done with multitrack tape, dedicated digital recorders have been used, but now computers plus recording software are the vehicle of choice.


  1. Tend not to be rich people, until they “make it big”… therefore Macs are out.
    This is probably why there are so many recording and other music programs available for Linux, like Ardour, Rosegarden, Audacity, and LMMS.
  2. Tend to have a lot of expenses, just for instruments, and then for computer recording, we need microphones, digital recording interfaces, and recording monitor speakers, all of which tend to be expensive… so open source OSes and software running on PC hardware are very attractive- we need to cut costs where we can.
  3. Tend to be intuitive, right brained people, so super-geeky Linux distros like Arch are out for many of us. We want to get straight to the recording process… we need something that works like what we are familiar with, which in most cases is Windows.
    So we need something “friendly” like Linux Mint, which I have used since Elyssa (version 5).
    I am considering Ubuntu Studio as well.
  4. We need a certain amount of tranquility for the creative process to work. Windows with it’s extreme vulnerability to malware, and the need for naggy antivirus providers DID NOT enhance my tranquility!
    So Windows is out.

So for me, it’s gotta be Linux, gotta be FRIENDLY Linux, and it’s gotta have a REAL TIME KERNEL.
And since nVidia graphics cards are exceedingly common, it would be REALLY helpful if they’d play nice with all of that!

I’m considering buying a new computer. I found this page and this issue doing a search on RT kernels on Distrowatch. I have a choice of buying a consumer type computer at a place like Best Buy that may well have an nVidia video card, since in most aspects they are powerful enough now for music recording. But this issue is making me think that I may need to put together a box with components including a different brand of video card that will “play nice” with RT kernels.
This business of having to patch drivers is frankly pulling me WAY too far out of my normal intuitive and creative comfort zone!!!
I am active in various music forums, and have participated in Linux forums. I do tend to share information like I am doing here… including about what equipment works or does not work well with the digital recording process. Right now, it looks like nVidia is joining the “not working well” list. I am not threatening a vendetta or anything, I don’t work that way… but in the process of being helpful to other musicians, I will have to warn them away from nVidia under the present conditions.
A computer is a multi-purpose box. Video drivers need to be written keeping in mind ALL the purposes a computer will be used for… including music recording. If this isn’t done, it CRIPPLES the computer’s potential as a multi-purpose device. It’s not just a tool for business purposes.

Thank you for your attention,


try to install OSSv4 instead of alsa. this good for musicians and sound lover

This was shared on the Gentoo forums awhile back and also somewhere else on these forums but here it is.

Works good on my computer, but I do not take any responsibility. Nvidia also does not support this fix. CYA, I am sure you understand.

  1. Download the driver for your video card.

  2. Run:
    cd /usr/src
    /[path to the downloaded driver]/ -x

  3. Open the file /usr/src/NVIDIA-Linux-x86_64-260.19.29/kernel/nv-linux.h and make the following changes:

#if defined(CONFIG_PREEMPT_RT)
typedef atomic_spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) atomic_spin_lock_init(lock)
#define NV_SPIN_LOCK_IRQ(lock) atomic_spin_lock_irq(lock)
#define NV_SPIN_UNLOCK_IRQ(lock) atomic_spin_unlock_irq(lock)
#define NV_SPIN_LOCK_IRQSAVE(lock,flags) atomic_spin_lock_irqsave(lock,flags)
#define NV_SPIN_UNLOCK_IRQRESTORE(lock,flags) \
#define NV_SPIN_LOCK(lock) atomic_spin_lock(lock)
#define NV_SPIN_UNLOCK(lock) atomic_spin_unlock(lock)
#define NV_SPIN_UNLOCK_WAIT(lock) atomic_spin_unlock_wait(lock)
typedef spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) spin_lock_init(lock)

#if defined(CONFIG_PREEMPT_RT)
typedef raw_spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) raw_spin_lock_init(lock)
#define NV_SPIN_LOCK_IRQ(lock) raw_spin_lock_irq(lock)
#define NV_SPIN_UNLOCK_IRQ(lock) raw_spin_unlock_irq(lock)
#define NV_SPIN_LOCK_IRQSAVE(lock,flags) raw_spin_lock_irqsave(lock,flags)
#define NV_SPIN_UNLOCK_IRQRESTORE(lock,flags) \
#define NV_SPIN_LOCK(lock) raw_spin_lock(lock)
#define NV_SPIN_UNLOCK(lock) raw_spin_unlock(lock)
#define NV_SPIN_UNLOCK_WAIT(lock) raw_spin_unlock_wait(lock)
typedef spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) spin_lock_init(lock)

#if defined(CONFIG_PREEMPT_RT)
#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)

#if defined(CONFIG_PREEMPT_RT)
#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)

  1. Run:

Hope that helps. Good luck.