Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-23-12, 09:38 AM   #1
Platinumviper
Registered User
 
Join Date: Mar 2012
Posts: 1
Default Bug in installation skript of nvidia-driver-295.33

Hi,

the script kernel/conftest.sh is looking for generated files in the $SOURCE tree instead of the $OUTPUT tree. This affects all 3.3 kernels, compiled with the O= parameter or $KBUILD_OUTPUT variable.

Code:
--- kernel/conftest.sh.orig	2012-03-17 22:56:28.000000000 +0100
+++ kernel/conftest.sh	2012-03-23 14:18:41.000000000 +0100
@@ -126,9 +126,9 @@
     CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
 
     if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
-        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated"
+        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
     elif [ "$ARCH" = "ARMv7" ]; then
-        CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$SOURCES/arch/arm/include/generated"
+        CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated"
     fi
     if [ -n "$BUILD_PARAMS" ]; then
         CFLAGS="$CFLAGS -D$BUILD_PARAMS"
Regards
Platinumviper
Platinumviper is offline   Reply With Quote
Old 03-23-12, 12:10 PM   #2
danix
NVIDIA Corporation
 
danix's Avatar
 
Join Date: Feb 2010
Location: Santa Clara, CA
Posts: 237
Default Re: Bug in installation skript of nvidia-driver-295.33

Thanks, the generated header files will be picked up from $OUTPUT instead of $SOURCES in the next release.
danix is offline   Reply With Quote
Old 03-24-12, 05:11 PM   #3
jdmcdaniel3
Its James again in Austin
 
jdmcdaniel3's Avatar
 
Join Date: Dec 2010
Location: Austin, Texas
Posts: 16
Smile Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by danix View Post
Thanks, the generated header files will be picked up from $OUTPUT instead of $SOURCES in the next release.
Seems like you had said that when 295.20 was the current release, so perhaps we do not know in which version this will be fixed. To add to what Platinumviper said. I have come up with this procedure, for complete details of how to apply the patch.

If we can assume you have compiled or in some way installed kernel 3.3 and only need to load it from grub, here is what you would do first. You need to have the application called patch installed. You can use the terminal command "patch --help" to see if it is installed. These patches were kindly supplied by Larry Finger, one the kernel developers. Thanks for your help Larry.

This example is for nVIDIA driver 295.33:

1. Open the Link: http://www.lwfinger.com/nvidia_patch...33_for_3.3_err (or http://www.lwfinger.com/nvidia_patch...20_for_3.3_err for 295.20)

2. Select all of the text and do a Edit/Copy. Open up kwrite of other Text editor and do an Edit/Paste

3. Save the Text file as the file ~/Downloads/NVIDIA-Linux-x86_64-295.33.patch

4. Download the NVIDIA-Linux-x86_64-295.33.run driver file to your ~/Downloads Folder from their Web Site.

5. Open a terminal session and run the commands:

Code:
cd ~/Downloads
sh ./NVIDIA-Linux-x86_64-295.33.run --extract-only --target "$HOME/Downloads/NVIDIA-295.33"
cd "$HOME/Downloads/NVIDIA-295.33/Kernel"
patch -b ./conftest.sh ~/Downloads/NVIDIA-Linux-x86-295.33.patch
Now your nVIDIA driver script has been patched. To intstall this with the patched script,

6. Restart your Linux version, loading kernel 3.3 into run level 3 as normal and log in as root.

7. Change to the nVIDIA Installer folder like this:

Code:
cd /home/username/Downloads/NVIDIA-295.33
8. Run The installer in the default folder.

Code:
./nvidia-installer
The Installation should operate normally with the kernel 3.3 source files present and installed. Let me know if you have any questions on this procedure. If you have any corrections or additions to this procedure, please take time to let us know what they are.

Thank You,
jdmcdaniel3 is offline   Reply With Quote
Old 03-25-12, 11:38 AM   #4
poltsy
Registered User
 
Join Date: Jan 2010
Posts: 26
Default Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Or perhaps you might just want to use the wonderful --apply-patch option in the installer.
poltsy is offline   Reply With Quote
Old 03-25-12, 12:17 PM   #5
jdmcdaniel3
Its James again in Austin
 
jdmcdaniel3's Avatar
 
Join Date: Dec 2010
Location: Austin, Texas
Posts: 16
Smile Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by poltsy View Post
Or perhaps you might just want to use the wonderful --apply-patch option in the installer.
Thanks for the info. I shall give that a try.

Thank You,
jdmcdaniel3 is offline   Reply With Quote
Old 03-29-12, 08:43 PM   #6
jdmcdaniel3
Its James again in Austin
 
jdmcdaniel3's Avatar
 
Join Date: Dec 2010
Location: Austin, Texas
Posts: 16
Angry Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by poltsy View Post
Or perhaps you might just want to use the wonderful --apply-patch option in the installer.
Seems like the option --apply-patch does not work. Here is what I get:

Code:
./nvidia-installer: unrecognized option: "--apply-patch"
Perhaps there is more to know to use this command or the command you suggest does not exist?

Thank You,
jdmcdaniel3 is offline   Reply With Quote
Old 03-30-12, 02:37 AM   #7
leigh123linux
Registered User
 
leigh123linux's Avatar
 
Join Date: Feb 2008
Posts: 163
Default Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by jdmcdaniel3 View Post
Seems like the option --apply-patch does not work. Here is what I get:

Code:
./nvidia-installer: unrecognized option: "--apply-patch"
Perhaps there is more to know to use this command or the command you suggest does not exist?

Thank You,

It exists here

Code:
./NVIDIA-Linux-x86_64-295.33.run --apply-patch 
ERROR: --apply-patch: no patch file specified.

To use it

Code:
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err
__________________
leigh123linux
leigh123linux is offline   Reply With Quote
Old 03-30-12, 03:43 PM   #8
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Re: Bug in installation skript of nvidia-driver-295.33

There is another problem with later 3.3 kernels where asm/system.h does not exist but it's included in nv-linux.h
siddly is offline   Reply With Quote

Old 03-30-12, 05:32 PM   #9
jdmcdaniel3
Its James again in Austin
 
jdmcdaniel3's Avatar
 
Join Date: Dec 2010
Location: Austin, Texas
Posts: 16
Default Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by leigh123linux View Post
It exists here

Code:
./NVIDIA-Linux-x86_64-295.33.run --apply-patch 
ERROR: --apply-patch: no patch file specified.

To use it

Code:
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err
So, if you do a list of commands, the --apply-patch it is not there. I did not get the installer to accept the patch file when I try the command:

Code:
sh ./NVIDIA-Linux-x86_64-295.33.run --apply-patch NVIDIA-295.33.patch
I got the following error message:

Code:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: NVIDIA-Linux-x86-295.33/kernel/conftest.sh
|===================================================================
|--- NVIDIA-Linux-x86-295.33.orig/kernel/conftest.sh
|+++ NVIDIA-Linux-x86-295.33/kernel/conftest.sh
Now if you use this text file with the patch command it works fine, but you have to extract all of the files from the nVIDIA archive into separate files. How can you use this valid patch file to patch an internal file of the nVIDIA driver and still have an installable all in one single file, just like the original? First off, I appreciate your help, but need exact instructions from someone that actually made it work.

Thank You,
jdmcdaniel3 is offline   Reply With Quote
Old 03-30-12, 11:34 PM   #10
leigh123linux
Registered User
 
leigh123linux's Avatar
 
Join Date: Feb 2008
Posts: 163
Default Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by jdmcdaniel3 View Post
So, if you do a list of commands, the --apply-patch it is not there. I did not get the installer to accept the patch file when I try the command:

Code:
sh ./NVIDIA-Linux-x86_64-295.33.run --apply-patch NVIDIA-295.33.patch
I got the following error message:

Code:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: NVIDIA-Linux-x86-295.33/kernel/conftest.sh
|===================================================================
|--- NVIDIA-Linux-x86-295.33.orig/kernel/conftest.sh
|+++ NVIDIA-Linux-x86-295.33/kernel/conftest.sh
Now if you use this text file with the patch command it works fine, but you have to extract all of the files from the nVIDIA archive into separate files. How can you use this valid patch file to patch an internal file of the nVIDIA driver and still have an installable all in one single file, just like the original? First off, I appreciate your help, but need exact instructions from someone that actually made it work.

Thank You,
The patch needed a small edit

http://leigh123linux.fedorapeople.or..._3.3_err.patch


Code:
curl http://leigh123linux.fedorapeople.org/pub/patches/nvidia_295_33_for_3.3_err.patch -o nvidia_295_33_for_3.3_err.patch
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err.patch
__________________
leigh123linux
leigh123linux is offline   Reply With Quote
Old 03-31-12, 07:59 PM   #11
jdmcdaniel3
Its James again in Austin
 
jdmcdaniel3's Avatar
 
Join Date: Dec 2010
Location: Austin, Texas
Posts: 16
Default Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3

Quote:
Originally Posted by leigh123linux View Post
The patch needed a small edit

http://leigh123linux.fedorapeople.or..._3.3_err.patch


Code:
curl http://leigh123linux.fedorapeople.org/pub/patches/nvidia_295_33_for_3.3_err.patch -o nvidia_295_33_for_3.3_err.patch
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err.patch
Thanks for your help. I will give it a try. I just got a copy of kernel 3.4-rc1, and none of the fixes seem to work with it, so back to square one again.

Thank You,
jdmcdaniel3 is offline   Reply With Quote
Old 04-01-12, 01:41 AM   #12
rockob
Registered User
 
Join Date: Nov 2008
Posts: 95
Default Re: Bug in installation skript of nvidia-driver-295.33

And when fixing nvidia for the 3.3 kernel, it might be worth adding a fix for the 3.4 kernel. They have removed asm/system.h so nvidia needs to use asm/switch_to.h instead in both nv-linux.h and conftest.sh.
rockob is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:01 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.