NVIDIA + Bumblebee + kernel 3.9 issue

Using the Overman79/Laptop for the bumblebee config of my NVIDIA Optimus equipped laptop. All well until today’s update to the 3.9 kernel. DKMS runs fine, but building the NVIDIA driver fails.
Here’s some output


laptop:/usr/src # dkms build -m nvidia/313.30-3.2




Kernel preparation unnecessary for this kernel.  Skipping...


Building module:
cleaning build area....
make KERNELRELEASE=3.9.0-6-desktop -C /lib/modules/3.9.0-6-desktop/build SUBDIRS=/var/lib/dkms/nvidia/313.30-3.2/build modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.9.0-6-desktop (x86_64)
Consult /var/lib/dkms/nvidia/313.30-3.2/build/make.log for more information.

and here’s the content of the make.log


laptop:/var/lib/dkms/nvidia/313.30-3.2/build # more make.log
DKMS make.log for nvidia-313.30-3.2 for kernel 3.9.0-6-desktop (x86_64)
za mei  4 16:52:04 CEST 2013
make: Map '/usr/src/linux-3.9.0-6-obj/x86_64/desktop' wordt binnengegaan
  CC [M]  /var/lib/dkms/nvidia/313.30-3.2/build/nv.o
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:15:0,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:10:2: error: #error remap_page_range() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:12:2: error: #error vmap() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:28:2: error: #error kmem_cache_create() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:30:2: error: #error on_each_cpu() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:31:2: error: #error smp_call_function() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:39:2: error: #error INIT_WORK() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:40:2: error: #error acpi_walk_namespace() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:41:2: error: #error acpi_os_wait_events_complete() conftest failed!
/var/lib/dkms/nvidia/313.30-3.2/build/conftest.h:44:2: error: #error pci_dma_mapping_error() conftest failed!
In file included from /usr/src/linux-3.9.0-6/include/linux/kernel.h:10:0,
                 from /usr/src/linux-3.9.0-6/include/linux/sched.h:15,
                 from /usr/src/linux-3.9.0-6/include/linux/utsname.h:5,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:44,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/usr/src/linux-3.9.0-6/include/linux/bitops.h: In function ‘hweight_long’:
/usr/src/linux-3.9.0-6/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression -Wsign-compare]
In file included from /usr/src/linux-3.9.0-6/arch/x86/include/asm/uaccess.h:539:0,
                 from /usr/src/linux-3.9.0-6/include/linux/poll.h:11,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:115,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/usr/src/linux-3.9.0-6/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/linux-3.9.0-6/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions -Wsign-compare]
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:0:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h: At top level:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:151:2: error: #error "struct file_operations compile test likely failed!"
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:0:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:302:2: error: #error "NV_PCI_DMA_MAPPING_ERROR() undefined!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:307:4: warning: "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:309:8: warning: "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:315:2: error: #error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:321:4: warning: "NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:324:8: warning: "NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:830:2: error: #error "NV_KMEM_CACHE_CREATE() undefined (kmem_cache_create() unavailable)!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:889:2: error: #error "NV_VMAP() undefined (vmap() unavailable)!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:961:2: error: #error "NV_SMP_CALL_FUNCTION() undefined (smp_call_function() unavailable)!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:981:2: error: #error "NV_ON_EACH_CPU() undefined (on_each_cpu() unavailable)!"
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h: In function ‘nv_execute_on_all_cpus’:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:999:5: error: implicit declaration of function ‘NV_ON_EACH_CPU’ -Werror=implicit-function-declaration]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h: At top level:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:1258:13: error: conflicting types for ‘pm_message_t’
In file included from /usr/src/linux-3.9.0-6/arch/x86/include/asm/apic.h:5:0,
                 from /usr/src/linux-3.9.0-6/arch/x86/include/asm/smp.h:13,
                 from /usr/src/linux-3.9.0-6/include/linux/smp.h:38,
                 from /usr/src/linux-3.9.0-6/include/linux/sched.h:30,
                 from /usr/src/linux-3.9.0-6/include/linux/utsname.h:5,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:44,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/usr/src/linux-3.9.0-6/include/linux/pm.h:51:3: note: previous declaration of ‘pm_message_t’ was here
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:0:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:1550:6: warning: "NV_INIT_WORK_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:1560:8: warning: "NV_INIT_WORK_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:1570:2: error: #error "NV_INIT_WORK_ARGUMENT_COUNT value unrecognized!"
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:1766:0,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/var/lib/dkms/nvidia/313.30-3.2/build/nv-proto.h:25:29: warning: "NV_INIT_WORK_ARGUMENT_COUNT" is not defined -Wundef]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:372:5: warning: initialization from incompatible pointer type [enabled by default]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:372:5: warning: (near initialization for ‘nv_pci_driver.suspend’) [enabled by default]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c: In function ‘nvidia_init_module’:
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:873:5: error: implicit declaration of function ‘NV_KMEM_CACHE_CREATE’ -Werror=implicit-function-declaration]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:873:58: error: expected expression before ‘nv_stack_t’
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:883:9: error: implicit declaration of function ‘NV_KMEM_CACHE_DESTROY’ -Werror=implicit-function-declaration]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:981:54: error: expected expression before ‘nv_pte_t’
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:990:13: error: expected expression before ‘nvidia_p2p_page_t’
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c: In function ‘nv_kern_open’:
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:1521:30: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type [enabled by default]
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:128:0,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/usr/src/linux-3.9.0-6/include/linux/interrupt.h:130:1: note: expected ‘irq_handler_t’ but argument is of type ‘enum irqreturn_t (*)(int,  void *, struct pt_
regs *)’
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:1525:17: error: implicit declaration of function ‘NV_TASKQUEUE_INIT’ -Werror=implicit-function-declaration]
/var/lib/dkms/nvidia/313.30-3.2/build/nv.c:1537:25: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type [enabled by default]
In file included from /var/lib/dkms/nvidia/313.30-3.2/build/nv-linux.h:128:0,
                 from /var/lib/dkms/nvidia/313.30-3.2/build/nv.c:13:
/usr/src/linux-3.9.0-6/include/linux/interrupt.h:130:1: note: expected ‘irq_handler_t’ but argument is of type ‘enum irqreturn_t (*)(int,  void *, struct pt_
regs *)’
cc1: some warnings being treated as errors
make[3]: *** [/var/lib/dkms/nvidia/313.30-3.2/build/nv.o] Fout 1
make[2]: *** [_module_/var/lib/dkms/nvidia/313.30-3.2/build] Fout 2
make[1]: *** [sub-make] Fout 2
make: *** [all] Fout 2
make: Map '/usr/src/linux-3.9.0-6-obj/x86_64/desktop' wordt verlaten

So this is curious as I have kernel 3.9 and nVIDIA driver 313.30 loaded using dkms, but not using Bumblebee and it is working just fine. So, it must be a kernel configuration issue of some sort when it gets compiled? I would say that using the standard kernel and source as supplied by openSUSE would never compile the nVIDIA driver for me using dkms. But it works like a champ with dkms when I compile my own kernel using SAKC or if I manually compile a kernel in the normal manner. So, it is not that the two, kernel 3.9 and nVIDIA driver 313.30 will not work together.

Thank You,

Good to know James. Eliminates a couple of options.
The good thing is that the Intel driver is fine too. Just using the NVIDIA for GoogleEarth etc.

You could compile your own kernel using SAKC and pick an older config or any other kernel config I guess. If the kernel name is exact, it will replace the older one, else it will just exist along side of the other one. It is for sure would work with dkms that way, but perhaps you need to post a bug report instead and get the registry one fixed? If replaced, it would make it hard to know what worked for sure. You can also drop down to kernel 3.8.11 for instance to avoid any confusion perhaps?

Thank You,

Knurpht,

did you get it working? Unfortunately I happened to upgrade kernel as well, and some nvidia packages from overman/bumblebee repos, and my optimus nvidia is now working now. I spent the whole day today to why it is not working, and just figured out that dkms is not working. I check for logs and found exact error that you are getting. :frowning:

nVIDIA just release their driver version 319.17 and I have links for it in my blog here: Installing the nVIDIA Video Driver the Hard Way

Thank You,

I dont think it would work on optimus laptops if we install it ‘the hard way’. There are drivers with version 319 in bumblebee repository, I will try to install them and see if they work.

The problem I am facing right now is that the dkms builds the module but the module is not there. :frowning: /lib/modules/3.8.8-1-desktop/updates/ does not have nvidia.ko and modprobe nvidia says: FATAL: Module nvidia not found.


dkms build -m nvidia -v 313.30-15.1

Creating symlink /var/lib/dkms/nvidia/313.30-15.1/source ->
                 /usr/src/nvidia-313.30-15.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.8.8-1-desktop -C /lib/modules/3.8.8-1-desktop/build SUBDIRS=/var/lib/dkms/nvidia/313.30-15.1/build modules.........
cleaning build area....

DKMS: build completed.



Now since i removed kernel 3.9 and still did not work, I will update the kernel and try once more. If it does not, I will wait for Overman to update his repo with dkms-nvidia for current version of nvidia, and hope it works magically then.

same issue here.
I already tried nvidia 319.12-207.1 from bumblebee repo and it’s not working even with those.
maybe bbswitch is the culprit?

James, we cannot use the NVIDIA driver as is on NVIDIA Optimus. If we do, the Intel doesn’t work too, since the libGL’s owned by x11-xorg-server are replaced by symlinks to NVIDIA’s.

Don’t think so, but I don’t know yet what is.

It compiles on kernel 3.7.10 and I can load the module, but it does not work. When i start bumblebee daemon and try to run optirun, it says could not load module “mouse”. weird.

Now, I dont have 3.8.8.1 and I cannot go back to how it was… I seriously regret updating my kernel. :frowning: I am waiting for it to compile on 3.9.0
Hopefully somebody will have a solution real soon. I don’t even know how to report a bug for this one, since i am not sure if kernel is the culprit or something else.

Overman79 updated the repo with 319.17 version of nvidia, but it is still failing to compile. FWIW, here is the build log:
Nvidia build issue with kernel 3.9.0 - Pastebin.com

I have created a bug report, Please help adding necessary information there.

https://bugzilla.novell.com/show_bug.cgi?id=818681

Cheers. Commented to confirm the bug exists for Tumbleweed’s kernel too.

I confirm the issue with the 3.9.0 kernel. For let bubmblebee work with 3.7.10 kernel, you need to edit the bumblebee.conf file. Set the XorgModulePath as follows:

XorgModulePath=/usr/lib64/nvidia/xorg/,/usr/lib64/xorg/modules/,/usr/lib64/xorg/modules/input/

Best regards

I actually got it working with kernel 3.9 and Nvidia 319.17, Overmans repo downloads the installer from Nvidia but that installer wont work for 3.9 as is, so I downloaded it from Nvidia and did the following:

./NVI......run --add-this-kernel

Now I got a new file NVID…-custom.run, boot into runlevel 3 and run:

./NVI.....-custom.run --no-opengl-files

I then reinstalled xorg-x11-server and Overmans x11-video-nvidia…

It actually works, but primusrun dropped in perfomance, on the other hand this is work in progress.

I also tried out what’s described here:
Chapter

But we don’t seem to have randr 1.4, xrandr -v gives this:

xrandr program version 1.4.0
Server reports RandR version 1.3

Does Tumbleweed give the same?

While I’m still at it, tonights hockey starts within half an hour, the installer will ask you if you want to install it with DKMS, I answer no to that, DKMS will load the module upon boot and thus prevent bbswitch to power off the card.

I would not dare to install NVIDIA’s driver directly. At least its running X with intel driver, I cannot risk to loose it.

I Installed kernel 3.8.11 using James’s SAKC. The drivers compile fine with dkms on that kernel, but I cannot load it :frowning:

It says:


FATAL: Error inserting nvidia (/lib/modules/3.8.11-1-desktop/updates/nvidia.ko): No such device

It was working perfectly fine on 3.8 Kernel before. I would love to get it back as it was before. I have been trying since last friday without any luck. :’-(

So you should do a search for the file nvidia.ko and see where it went. I don’t need Bublebee, but do use dkms and SAKC and the folder "/lib/modules/Version-desktop/updates/nvidia.ko is where I find both the nVIDIA and VirtuaBox drivers, compiled using DKMS. I normally install the nVIDIA driver manually for each new version and then place it into DKMS with my bash script SANDI. From then on, any kernel update installed with SAKC gets its nVIDIA driver and VirtualBox driver recompiled automatically using DKMS setup by SANDI.

Thank You,

Basically this works/worked the same for us bumblebeasts. But, like said, there’s a huge difference in how to deal with the Optimus cards. Blindly following the path you take, no matter whether we compile the kernel ourselves, use SANDI, renders a system where both the Intel and the NVIDIA don’t work.
The culplrit is here: the NVIDIA installer replaces libGL* by symlinks to NVIDIA’s versions. Hence the Intel is supposed to use NVIDIA’s libGL* which does not work, i.e. no X. And yes, I’ve tried compiling the driver with the --no-opengl-files option, which should avoid this.
And that’s not all: read yesterday that NVIDIA has made major changes to the driver where it concerns the Optimus technology. If I understood well it’s going to be possible to run the entire desktop on the NVIDIA GPU, and also auto-switching to the NVIDIA when an application (Steam games f.e.) asks for it.

Hank, TW gives the same. Will try your “path” and report results here. It may help Overman79 to fix the NVIDIA installer.
Edit: Come to think of it, shouldn’t adding the “–add-this-kernel” be enough?