Patch for 325.08 on Linux 3.10

Here is a patch that allows for the installation of Nvidia 325.08 on the newly-released Linux 3.10.
3.10.patch.txt (16.8 KB)

how do you patch .run file ?

I get this
can’t find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|diff -U 3 -H -d -r -N – nv-i2c.c.orig nv-i2c.c
|— nv-i2c.c.orig 2013-07-01 21:45:45.241886356 -0400

+++ nv-i2c.c 2013-07-01 21:38:49.532484245 -0400

here is a -p1 patch from unpacked package root.

In fact I had only to change 2 lines from the 319.23 patch
nvidia-drivers-linux-3.10.patch.txt (17.2 KB)

How do I apply this? Thanks!

  1. cd into the unpacked archive
  2. patch -p1 < file

Thanks, patch worked fine. My htpc is now using kernel 3.10 and vdpau is working like a champ! :)

In my experience, I had to change 6 lines in the nvidia-drivers-linux-3.10.patch.txt because I’m using the latest 325-08 driver. Patch was successful :-)

@Robert_SoCal: Great! I’m also using the latest 325-08 driver!

But: Can we get a little bit more details? Or better a new patch-file?

The result of the last patch (nvidia-drivers-linux-3.10.patch.txt):

can’t find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c
|— NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400

+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400

File to patch: NVIDIA-Linux-x86_64-325.08.run
patching file NVIDIA-Linux-x86_64-325.08.run
Hunk #1 FAILED at 311.
Hunk #2 FAILED at 324.
2 out of 2 hunks FAILED – saving rejects to file NVIDIA-Linux-x86_64-325.08.run.rej
can’t find file to patch at input line 35
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c
|— NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 2013-04-26 00:22:30.000000000 -0400

+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c 2013-05-22 04:52:45.229495748 -0400

File to patch: NVIDIA-Linux-x86_64-325.08.run
patching file NVIDIA-Linux-x86_64-325.08.run
Hunk #1 FAILED at 60.
Hunk #2 FAILED at 134.
Hunk #3 FAILED at 166.
Hunk #4 FAILED at 180.
Hunk #5 FAILED at 193.
Hunk #6 FAILED at 201.
Hunk #7 FAILED at 233.
Hunk #8 FAILED at 282.
Hunk #9 FAILED at 346.
Hunk #10 FAILED at 469.
Hunk #11 FAILED at 513.
Hunk #12 FAILED at 553.
Hunk #13 FAILED at 571.
Hunk #14 FAILED at 587.
Hunk #15 FAILED at 595.
15 out of 15 hunks FAILED – saving rejects to file NVIDIA-Linux-x86_64-325.08.run.rej

Thank you for help!

Created a patch to fix a compilation error on the latest mainline Linux Kernel (global variable num_physpages has been removed).

I noticed that my patch only works on the development kernel at https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ but not on the 3.10 stable release. Use nvidia-drivers-linux-3.10.patch.txt for the 3.10 stable kernel.
325.08_3.10.patch.txt (18.2 KB)

Hello, i apply the patch and Give me this error

In file included from /usr/src/linux-3.10/include/uapi/linux/stddef.h:1:0,
                    from /usr/src/linux-3.10/include/linux/stddef.h:4,
                    from /usr/src/linux-3.10/include/uapi/linux/posix_types.h:4,
                    from /usr/src/linux-3.10/include/uapi/linux/types.h:13,
                    from /usr/src/linux-3.10/include/linux/types.h:5,
                    from /usr/src/linux-3.10/include/uapi/linux/capability.h:16,
                    from /usr/src/linux-3.10/include/linux/capability.h:15,
                    from /usr/src/linux-3.10/include/linux/sched.h:13,
                    from /usr/src/linux-3.10/include/linux/utsname.h:5,
                    from /home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel/nv-linux.h:44,
                    from /home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c:15:
   /usr/src/linux-3.10/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
   /usr/src/linux-3.10/arch/x86/include/asm/uaccess_64.h:62:28: warning: comparison between signed and\
 unsigned integer expressions [-Wsign-compare]
     if (likely(sz == -1 || sz >= n))
                               ^
   /usr/src/linux-3.10/include/linux/compiler.h:152:40: note: in definition of macro ‘likely’
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   /home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c: In function ‘os_get_syste\
m_memory_size’:
   /home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c:244:5: error: implicit dec\
laration of function ‘get_num_physpages’ [-Werror=implicit-function-declaration]
        return (((NvU64)NV_NUM_PHYSPAGES * PAGE_SIZE) / RM_PAGE_SIZE);
        ^
   cc1: some warnings being treated as errors
   make[3]: *** [/home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.o] Error 1
   make[2]: *** [_module_/home/cr1ogen/Descargas/NVIDIA-Linux-x86_64-325.08/kernel] Error 2
   make[1]: *** [sub-make] Error 2
   make[1]: se sale del directorio `/usr/src/linux-3.10'
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make: *** [module] Error 1
-> Error.

Thanks!!

OK, here’s what I did in patching the 325.08 driver:

  1. Extract the Nvidia driver by typing “NVIDIA-Linux-x86_64-325.08.run --extract-only”

  2. Then copy patch program “nvidia-drivers-linux-3.10.patch.txt” into the unpacked directory.

  3. Open the patch program and change the following lines:

diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c
— NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400

into:

diff -ur -X - NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c
— NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400

  1. Then perform the same action on these lines:

diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c
— NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c 2013-05-22 04:52:45.229495748 -0400

Change to:

diff -ur -X - NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-procfs.c NVIDIA-Linux-x86_64-325.08/kernel/nv-procfs.c
— NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-procfs.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-325.08/kernel/nv-procfs.c 2013-05-22 04:52:45.229495748 -0400

  1. Then SAVE your changes and then patch the file by typing “patch -p1 < nvidia-drivers-linux-3.10.patch.txt”

  2. At this point, ALL of the Hunk files should have patched successfully.

  3. Now you can compile the Nvidia 325.08 driver by running “nvidia-installer”

This patch works for me Thanks!!!

i got os-interface error too.

I’ on kernel 3.10.0+

Use the patch nvidia-drivers-linux-3.10.patch.txt

with the instrution from Robert_SoCal
Sorry for my English

@Robert_SoCal: Thanks a lot! But it was my mistake (I’d drunken three or four glasses of redwine!): I’d forgotten, to change to unpacked archiv. The patch works very fine!

LOL - yeah that red wine will do a number on ya just about every time :-) Very glad to offer assistance on getting the patch file to finally work.

Hello all,

I followed the steps in message #12 and the patch could be applied. But now I receive another error while running the nvidia-installer:

In file included from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess.h:539:0,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/poll.h:11,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-linux.h:97,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c:15:
   /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
   /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c: In function ‘os_get_system_memory_size’:
   /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.c:244:5: error: implicit declaration of function ‘get_num_physpages’ [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors
   make[3]: *** [/home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/os-interface.o] Error 1
   make[2]: *** [_module_/home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel] Error 2
   make[1]: *** [sub-make] Error 2
   make[1]: Leaving directory `/usr/src/linux-3.10.0-16.g3dcd746'
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make: *** [module] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Kernel: Linux linux-gwd0.site 3.10.0-16.g3dcd746-desktop #1 SMP PREEMPT Mon Jul 1 13:38:11 UTC 2013 (3dcd746) x86_64 x86_64 x86_64 GNU/Linux

Any Idea? ;)

Regards
Alex

Use mlau’s patch from this thread: https://devtalk.nvidia.com/default/topic/549532/linux/linux-3-10-incompatibility-in-function-lsquo-nv_i2c_del_adapter-rsquo-error-void-value-not-igno/. As of this morning, it was working for me with 3.10.0-1-08587-g496322b-dirty.

Hi gun26,

unfortunatetely, the patch didn’t help. It seems that I’m back to the first errors the thread has started with.

In file included from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/kernel.h:10:0,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/sched.h:15,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/utsname.h:5,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-linux.h:44,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c:15:
   /usr/src/linux-3.10.0-16.g3dcd746/include/linux/bitops.h: In function ‘hweight_long’:
   /usr/src/linux-3.10.0-16.g3dcd746/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression [-Wsign-compare]
   In file included from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/cpumask.h:4:0,
                    from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/msr.h:10,
                    from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/processor.h:20,
                    from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/thread_info.h:22,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/thread_info.h:54,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/preempt.h:9,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/spinlock.h:50,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/seqlock.h:29,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/time.h:5,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/uapi/linux/timex.h:56,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/timex.h:56,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/sched.h:17,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/utsname.h:5,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-linux.h:44,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c:15:
   /usr/src/linux-3.10.0-16.g3dcd746/include/linux/cpumask.h: In function ‘cpumask_parse’:
   /usr/src/linux-3.10.0-16.g3dcd746/include/linux/cpumask.h:603:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]
   In file included from /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess.h:539:0,
                    from /usr/src/linux-3.10.0-16.g3dcd746/include/linux/poll.h:11,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-linux.h:97,
                    from /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c:15:
   /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
   /usr/src/linux-3.10.0-16.g3dcd746/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c: In function ‘nv_i2c_del_adapter’:
   /home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c:252:14: error: void value not ignored as it ought to be
   make[3]: *** [/home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.o] Error 1
   make[2]: *** [_module_/home/anolting/Downloads/nvidia/NVIDIA-Linux-x86_64-325.08/kernel] Error 2
   make[1]: *** [sub-make] Error 2
   make[1]: Leaving directory `/usr/src/linux-3.10.0-16.g3dcd746'
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make: *** [module] Error 1
-> Error.