One of my PCs has openSUSE Tumbleweed installed. The machine has a Nvidia 9300 graphic chip on the motherboard and so I was using the legacy driver NVIDIA-Linux-x86_64-340.93.
After upgrading the kernel to 4.3.x, the Nvidia driver failed to compile. The error is something like this:
error: void value not ignored as it ought to be
return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
After some digging, seems that the Linux kernel has changed and seq_* family now return void instead of an integer.
Here is a quick fix. First extract the Nvidia driver by running
./NVIDIA-Linux-x86_64-340.93.run -x
Then modify the file NVIDIA-Linux-x86_64-340.93/kernel/nv-procfs.c:
359c359,360
< return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
---
> seq_printf(s, "Binary: \"%s\"\n", registry_keys);
> return 0;
555c556,557
< return seq_puts(s, s->private);
---
> seq_puts(s, s->private);
> return 0;
Then run the installer to compile and install the driver:
sudo NVIDIA-Linux-x86_64-340.93/nvidia-installer
No comments:
Post a Comment