When I tried to emerge nvidia-drivers for a freshly compiled linux-2.6.33-rt4 I got this error: In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv.c:14: /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv-linux.h:202: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nv_spinlock_t' /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r1/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv-linux.h:1282: error: expected specifier-qualifier-list before 'nv_spinlock_t' ...followed by reams of more of the same. When I opened nv-linux.h and checked the offending line, I found: #if defined(CONFIG_PREEMPT_RT) typedef atomic_spinlock_t nv_spinlock_t; So I got suspicious and grepped the rt-patch for atomic_spinlock_t - and it's gone. I unmasked nvidia-drivers-195.36.03 and tried that too, but the same problem there. Until upstream comes out with a new version, or someone patches the old one - nvidia-drivers do not work on linux-2.6.33-rt kernels. Reproducible: Always Steps to Reproduce: 1. Install a 2.6.33-rt-series kernel. 2. Emerge nvidia-drivers 3. Watch the fireworks Actual Results: Return lots of lines of compiler errors. Expected Results: Compiled the drivers. It seems the rt-kernels have changed how the work with spinlocks, so atomic_spinlock_t is obsoleted. I'm not quite sure what has replaced it though, so I don't quite want to start testing stuff just yet. Haven't found a good resource on rt spinlocks in this version, and the one on LWN (mentioning atomic_spinlock_t) is obviously obsoleted.
Created attachment 223131 [details, diff] Defines nv_spinlock_t as raw_spinlock_t Snooping around, I found that the atomic_spinlock_t (and associated functions) have changed names to raw_spinlock_t (etc). So I created a patch (enclosed) to fix the name change. Next, there obviously are some other compilation errors: /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r2/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv.c: In function 'nv_alloc_file_private': /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r2/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv.c:2012: error: implicit declaration of function 'semaphore_init' /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r2/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv.c: In function 'nv_kern_open': /var/tmp/portage/x11-drivers/nvidia-drivers-190.53-r2/work/NVIDIA-Linux-x86_64-190.53-pkg2/usr/src/nv/nv.c:2188: warning: initialization from incompatible pointer type It would seem that I have to patch nv-linux.h some more to get nvidia-drivers to work on the 2.6.33-rt kernels.
Created attachment 223153 [details, diff] New patch version This patch resolves the last compilation problem. It applies against both 190 and 195 versions of the driver. Alas, it does not work. X hangs on startup without meaningful errors in the log.
I haven't compared the two patches, but the patch referenced on the Nvidia forum here: http://www.nvnews.net/vbulletin/showthread.php?t=148509 compiles *and* runs fine for me. Give it a go.
We don't support the rt kernel. gentoo-sources and vanilla-sources are the only supported kernels.
So, if you're not supporting this bug - I suppose you will resolve it as WONTFIX. That's a pity since the patch in the forum is working for me too (with a 195 series kernel). The only problem is that the linked patch isn't making the header file take kernel version into account. If there is interest I could fix it up to that end - and otherwise I could just go on using the patch in my own /usr/local/portage. Or is there an overlay for which it is appropriate?
It would be very nice, if a solutions was found, for that to be in the pro-audio overlay.
You guys are more than welcome to maintain patches in an overlay. Nothing is stopping you.