[SOLVED] Linux 3.10/3.11 incompatibility: In function ‘nv_i2c_del_adapter’ error

Currently all NVIDIA drivers are incompatible with Linux kernel 3.10.

/usr/src/nvidia-313.30/nv-i2c.c: In function ‘nv_i2c_del_adapter’:
/usr/src/nvidia-313.30/nv-i2c.c:327:14: error: void value not ignored as it ought to be
make[2]: *** [/usr/src/nvidia-313.30/nv-i2c.o] Error 1
make[1]: *** [_module_/usr/src/nvidia-313.30] Error 2
make[1]: Leaving directory `/usr/src/kernels/linux-3.10'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [module] Error 1

Please, update them.

I’m talking about:

313.30
319.32
325.08 beta

LTS releases:
304.88
173.14.37

96.43.23 & 71.86.15 (not really necessary - the supported hardware is pretty ancient)

[b]Update: drivers 325.15 are fully compatible with kernel 3.10.

There’s a little incompatibility with kernel 3.11, which can be fixed by applying this patch.[/b]

I Agree

Really, and something wrong about procfs

My GCC didn’t go as far as to whine about procfs ;-)

The patch below installs cleanly up to 319.32.
slipstream:/usr/src/NVIDIA-Linux-x86_64-325.08 # patch -p1 < pastie-7942599.diff
patching file kernel/nv-i2c.c
Hunk #1 succeeded at 243 with fuzz 2 (offset -68 lines).
Hunk #2 succeeded at 247 (offset -75 lines).
patching file kernel/nv-procfs.c
Hunk #4 succeeded at 161 with fuzz 1.
Hunk #9 FAILED at 424.
Hunk #10 succeeded at 546 (offset -1 lines).
Hunk #11 succeeded at 575 (offset -1 lines).
Hunk #12 succeeded at 600 (offset -1 lines).
Hunk #13 succeeded at 617 (offset -1 lines).
Hunk #14 succeeded at 629 (offset -1 lines).
Hunk #15 succeeded at 637 (offset -1 lines).
1 out of 15 hunks FAILED – saving rejects to file kernel/nv-procfs.c.rej
nv-procfs.c.rej.gz (1.27 KB)

I played a bit around with the patches.
The nv_i2c file is easy to correct. But the proc* file is tricky. I can just say, that with 3.10 stable kernel release compiling even with patch is not possible with 325 and 319 driver series.

The patch works with 319.32.
tindog:~ # uname -r
3.10.0-smp+
tindog:~ # cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 319.32 Wed Jun 19 15:51:20 PDT 2013
GCC version: gcc version 4.7.3 (SUSE Linux)

Here’s the patch I use with 325.08 and linux-3.10-git:

http://pastie.org/8123499

I think this patch could compile, but I am not sure what deletion of NV_CREATE_PROC_FILE will cause?!
Is the driver still stable and working?

I just built Nvidia 325.08 against linux kernel 3.10.0-1-06005-gd2b4a64-dirty using mlau’s patch. It seems to work fine.

dgrat,

Aside from /proc/driver/nvidia/warnings/* NVIDIA drivers don’t put any crucial information into /proc so I guess it’s not really that important.

The following patch provides a simple fix:
[url]http://pastebin.com/N0a5KMZa[/url]
It disables the proc fs, but it seems not to be needed anyway (nvidia-settings works fine). I tested it with the nvidia version 295.20.

I have it working with 304.88 (current Debian-testing), after hacking siddly’s patch a little (removed more references to NV_CREATE_PROC_FILE). Seems to work ok (no compile errors, graphics look ok, no bad log entries).

Patch is at [url]http://pastebin.com/3nstAMLE[/url].

sean64’s patch of 7/10 might have worked (it’s at least very simple, as he says), but patch reports it as incomplete (“stops in the middle of a line”). Don’t know why.

I made a couple of modifications to the above patches in order to really clean up the /proc/driver/nvidia directory, which remained on the way after rmmoding the nvidia module, thus causing oopses at the next modprobe when the module tried to create again its proc directory.

The patch, for v319.32, is available at [url]http://pastebin.com/JDpkR3kt[/url].

Hey, NVIDIA, when will you fix this incompatibility?

3.10 was released two months ago and people cannot use your drivers normally.

@birdie Totally agree…hope they read some of these posts?
From my installer log with Fedora 3.10.3-300 kernel
([u]the make & prepare comment before the blah blah blah did nothing to fix it[/u])

→ Performing rivafb check.
→ Performing nvidiafb check.
→ Performing Xen check.
→ Cleaning kernel module build directory.
executing: ‘cd ./kernel; make clean’…
→ Building kernel module:
executing: ‘cd ./kernel; make module SYSSRC=/home/ad-non/rpmbuild/BUILD/kernel-3.10.fc19/linux-3.10.3-300.fc19.x86_64 SYSOUT=/home/ad-non/rpmbuild/BUILD/kernel-3.10.fc19/linux-3.10.3-300.fc19.x86_64’…
NVIDIA: calling KBUILD…
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo >&2;
echo >&2 " ERROR: Kernel configuration is invalid.“;
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.”;
echo >&2 " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo >&2 ;
/bin/false)
blah blah blah
~/rpmbuild/BUILD/kernel-3.10.fc19/linux-3.10.3-300.fc19.x86_64/arch/x86/include/asm/uaccess_64.h:62:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (likely(sz == -1 || sz >= n))
^
/tmp/selfgz902/NVIDIA-Linux-x86_64-319.32/kernel/nv-i2c.c: In function ‘nv_i2c_del_adapter’:
/tmp/selfgz902/NVIDIA-Linux-x86_64-319.32/kernel/nv-i2c.c:327:14: error: void value not ignored as it ought to be
osstatus = i2c_del_adapter(pI2cAdapter);
^
make[3]: *** [/tmp/selfgz902/NVIDIA-Linux-x86_64-319.32/kernel/nv-i2c.o] Error 1
make[2]: *** [module/tmp/selfgz902/NVIDIA-Linux-x86_64-319.32/kernel] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
→ Error.
ERROR: Unable to build the NVIDIA kernel module.

External Media

325.15 yippee

325.15 still needs nv-linux.h part for 3.11-rcX kernels.

@Milos_SD, -rc kernels are not supported.

I know. I just pointed out to users, how to get it working. :)
Here is that part of the patch that is needed.