[PlanetCCRMA] problem starting X

Jeffrey Stephen Stephen.Jeffrey at climatechange.qld.gov.au
Thu Jun 7 17:12:40 PDT 2012


Hi Fernando

Thanks for the patch. I am making progress with it, but it seems that I need to manually apply the patches - I get the same compile errors if I apply the patch using the -patch option to the nvidia install script. 

I have manually applied most of the patches and that fixes some of the compile problems, but I can't apply the last part of the patch
----------------------------------------------------------
@@ -867,6 +883,7 @@
         *(mutex) = __mutex;                        \
     }
 #endif
+#endif
 
 #if defined (KERNEL_2_4)
 #  define NV_IS_SUSER()                 suser()
----------------------------------------------------------
If I delete

*(mutex) = __mutex;
}

The macro syntax will no longer be correct - ie. the closing } won't be there.

Similarly, if I delete

#if defined (KERNEL_2_4)

the following #endif won't have a corresponding #if.

The patch that you sent is shown below.  Could you please check that the patch didn't get corrupted when you sent it?

Cheers
Steve

---------------------------------------------
root--- kernel/nv-linux.h~	2011-07-27 16:55:54.000000000 -0700
+++ kernel/nv-linux.h	2012-02-18 16:24:12.000000000 -0800
@@ -274,6 +274,18 @@
 #define NV_SPIN_UNLOCK(lock)      atomic_spin_unlock(lock)
 #define NV_SPIN_UNLOCK_WAIT(lock) atomic_spin_unlock_wait(lock)
 #else
+#if defined(CONFIG_PREEMPT_RT_FULL)
+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)
 #define NV_SPIN_LOCK_IRQ(lock)    spin_lock_irq(lock)
@@ -284,6 +296,7 @@
 #define NV_SPIN_UNLOCK(lock)      spin_unlock(lock)
 #define NV_SPIN_UNLOCK_WAIT(lock) spin_unlock_wait(lock)
 #endif
+#endif
 
 int nv_acpi_init   (void);
 int nv_acpi_uninit (void);
@@ -857,6 +870,9 @@
 #if defined(CONFIG_PREEMPT_RT)
 #define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
 #else
+#if defined(CONFIG_PREEMPT_RT_FULL)
+#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
+#else
 #if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
 #define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
 #endif
@@ -867,6 +883,7 @@
         *(mutex) = __mutex;                        \
     }
 #endif
+#endif
 
 #if defined (KERNEL_2_4)
 #  define NV_IS_SUSER()                 suser()
---------------------------------------------





-----Original Message-----
From: Fernando Lopez-Lezcano [mailto:nando at ccrma.Stanford.EDU] 
Sent: Thursday, 7 June 2012 2:58 PM
To: Jeffrey Stephen
Cc: Fernando Lopez-Lezcano; planetccrma at ccrma.Stanford.EDU
Subject: Re: [PlanetCCRMA] problem starting X

On 06/06/2012 05:35 PM, Jeffrey Stephen wrote:
> Hi Fernando,
>
> I still can't compile the nVidia driver. I have done the following:
>
> 1. installed the rt and rt-devel packages.
>
> - the machine would then not start X (it failed to build the
>
> nVidia driver at boot time)
>
> 2. I installed akmod - this required me to install kmodtool,
>
> akmods and xorg-x11-drv-nvidia
>
> - the machine will now start X,

Aha, so it works!!
Case closed :-)

> but I can't run CUDA applications

Aha, I don't think you mentioned CUDA before. Or maybe I was not paying attention. I have only dealt with CUDA in a non-rt kernel environment... 
presumably you would need to apply the same patch that is used to be able to build the glue layer that let's you run the nvidia binary blob display driver. I'm attaching the patch I'm currently using to this email.

It's been a while since I installed CUDA so I don't remember much.

I presume you will need to unpack the distribution, find the place where the files to be patched are in the tree, patch them and then try to install. Sorry, I don't have the time to go through the logs you sent, maybe somebody else in the list has the time...

Best luck!
-- Fernando


> I have tried to reinstall CUDA. This seems to require:
>
> - installing an nVidia driver
>
> - installing the CUDA toolkit
>
> Installing the nVidia driver fails (see the log file below).
>
> What is the difference between the nVidia driver that I am trying to
>
> build here, and what is in xorg-x11-drv-nvidia?
>
> Do I need to install xorg-x11-drv-nvidia-devel?
>
> Should I delete xorg-x11-drv-nvidia and then try to build an nVidia
>
> driver that comes with CUDA?I think this is what you meant in your 
> previous email - I tried this but it failed:
>
> rpm --erase xorg-x11-drv-nvidia-280.13-1.fc14.x86_64
>
> error: Failed dependencies:
>
> nvidia-kmod-common >= 1:280.13 is needed by (installed)
> akmod-nvidia-1:280.13-2.1.fc14.ccrma.3.x86_64
>
> nvidia-kmod-common >= 1:280.13 is needed by (installed)
> kmod-nvidia-2.6.33.13-149.rt31.2.fc14.ccrma.x86_64.rt-1:280.13-2.1.fc1
> 4.3.x86_64
>
> xorg-x11-drv-nvidia = 1:280.13-1.fc14 is needed by (installed)
> xorg-x11-drv-nvidia-libs-1:280.13-1.fc14.x86_64


------------------------------
The information in this email together with any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. There is no waiver of any confidentiality/privilege by your inadvertent receipt of this material. 
Any form of review, disclosure, modification, distribution and/or publication of this email message is prohibited, unless as a necessary part of Departmental business.
If you have received this message in error, you are asked to inform the sender as quickly as possible and delete this message and any copies of this message from your computer and/or your computer system network.
------------------------------




More information about the PlanetCCRMA mailing list