Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Real Time preemption patched kernel and NVIDIA drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jwm1248
n00b
n00b


Joined: 05 Feb 2010
Posts: 2

PostPosted: Fri Feb 05, 2010 1:47 pm    Post subject: Real Time preemption patched kernel and NVIDIA drivers Reply with quote

Hello, I'm new to Gentoo...

After considerable difficulty getting a custom kernel to finally boot, I emerge the nvidia-drivers and they fail to build. The bug ( #285266 ) report tells me "Nvidia does not support the Real Time patchset and so nor can we".

Ok, but how then does NVIDIA-Linux-x86_64-190.53-pkg2.run build the driver with success?

I guess nvidia-drivers is not the same driver as provided by NVIDIA-Linux-x86_64-190.53-pkg2.run?

I did previously try using the pro_audio overlay, but not having got to grips with Gentoo yet, plus the kernel was ancient (2.4.16) that emerge rt-sources gave me.

I'm thinking that what I'm trying to do is not going to work any better than in Debian (testing). Sigh. Which is getting a very up-to-date system running well configured real time audio software and kernel.

TIA for any suggestions,
James.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri Feb 05, 2010 2:46 pm    Post subject: Reply with quote

one or two years ago when I still was using nvidia it worked fine with realtime kernels:

you from time to time had to add a patch to make it compile but it simply worked



I wouldn't care what is written in the BUG:

*) would you want to hesitate from doing what's working only by reading some stuff ?

or

*) ignoring it and simply doing what works (if it works it's proof enough)

?

if you have doubts surf over to http://www.nvnews.net/ and browse the forums
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
th0th696
Apprentice
Apprentice


Joined: 08 Dec 2004
Posts: 185

PostPosted: Mon Apr 19, 2010 10:55 pm    Post subject: which kernel Reply with quote

so which rt-sources kernel are people using who have nvidia cards? I'm running into the same issues, albeit rt-sources from the pro-audio overlay gave 2.6.33. I'm thinking about adding this overlay and masking rt-sources down 2.6.31:

http://code.google.com/p/roxxorx-gentoo-overlay/

I was wondering if anyone here was doing anything similar?
Back to top
View user's profile Send private message
Neskweek
n00b
n00b


Joined: 20 Jun 2004
Posts: 35
Location: Nantes - France

PostPosted: Fri Mar 04, 2011 10:05 am    Post subject: Reply with quote

Hi

Don't know if that has already been posted but here is a way to make NVIDIA drivers work on RT kernels v2.6.33.7.2-rt30

1. Download the NVIDIA driver you want to use (260.19.29 for example) and make it executable

2. Run :
Quote:

cd /usr/src
/[path to the downloaded driver]/NVIDIA-Linux-x86_64-260.19.29.run -x

this will only extract the package content in /usr/src

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

Replace :
Quote:

#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) \
atomic_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)

#else
typedef spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) spin_lock_init(lock)

by
Quote:

#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) \
raw_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)

#else
typedef spinlock_t nv_spinlock_t;
#define NV_SPIN_LOCK_INIT(lock) spin_lock_init(lock)

and
Quote:

#if defined(CONFIG_PREEMPT_RT)
#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
#else
#if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
#define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER


by
Quote:

#if defined(CONFIG_PREEMPT_RT)
#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
#else
#if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
#define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER


4. Run:
Quote:

/usr/src/NVIDIA-Linux-x86_64-260.19.29/nvidia-installer


You're done !


That work like a charm for me.
That's inspired (for not saying totaly ripped ) from there :
http://www.spinics.net/lists/linux-rt-users/msg06142.html
Beware the patch posted in that page can't be applyed directly since the line numbers change from version to version of the driver


This is not supported by NVIDIA of course.
I can't say if this make NVIDIA driver unstable. Right now on my box it doesn't seems to.
Back to top
View user's profile Send private message
newbenji
n00b
n00b


Joined: 05 Sep 2003
Posts: 69
Location: Denmark, Odense

PostPosted: Tue Jun 07, 2011 10:26 am    Post subject: Reply with quote

Quote:

You're done !


That work like a charm for me.
That's inspired (for not saying totaly ripped ) from there :
http://www.spinics.net/lists/linux-rt-users/msg06142.html
Beware the patch posted in that page can't be applyed directly since the line numbers change from version to version of the driver


This is not supported by NVIDIA of course.
I can't say if this make NVIDIA driver unstable. Right now on my box it doesn't seems to.


How do you get the opengl module in here.
I get error with loading the glx module.[/quote]
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Dec 29, 2016 3:15 pm    Post subject: Reply with quote

Still a valid and up-to-date topic:

https://gist.github.com/kernelOfTruth/8be4f6295309e248a30ecb1477e9ab07

patch for 4.9 rt-kernel + 370.28 nvidia-drivers :)


only

Code:
export IGNORE_PREEMPT_RT_PRESENCE=1


is needed to let it compile against rt-kernels
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum