Bumblebee-Project / bbswitch

Disable discrete graphics (currently nvidia only)
GNU General Public License v2.0
489 stars 78 forks source link

bumblebee-git will not work on linux-mainline kernel #80

Closed ryanvade closed 8 years ago

ryanvade commented 10 years ago

Hello everyone, I have installed both linux-mainline and bumblebee-git on Arch Linux for my GT 630m. When I use optirun I get the Daemon not running and no socket error, at least when using the 3.13. kernel. However, when I use the 3.12.5 kernel I don't have these issues.

I can just use the stable kernel yes, but the 3.13 kernel has HUGE wireless improvements that help my laptop. (with an Intel 7260 AC NIC).

Is this issue #75 Any suggestions?

Lekensteyn commented 10 years ago

See journalctl -ab for more details and ensure you have the kernel headers installed. AL is still at 3.12.5, which implies that you have built 3.13 yourself, correct? Have you installed bbswitch-dkms and nvidia...-dkms?

ryanvade commented 10 years ago

I installed linux-mainline from ABS. It includes the headers. I did install bbswitch-dkms. The nvidia kernel module for both kernels have been built.

Actually, I think I put this issue in the wrong section by accident.

ryanvade commented 10 years ago
optirun -vvv glxspheres
[ 2505.543271] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 2505.543805] [INFO]Configured driver: nvidia
[ 2505.543921] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[ 2505.543960] [DEBUG]Socket closed.
[ 2505.543997] [ERROR]Could not connect to bumblebee daemon - is it running?

sudo systemctl status bumblebeed
bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2013-12-20 14:30:23 CST; 18s ago
  Process: 27863 ExecStart=/usr/sbin/bumblebeed (code=exited, status=1/FAILURE)
 Main PID: 27863 (code=exited, status=1/FAILURE)

Dec 20 14:30:23 ryan-linux-laptop systemd[1]: bumblebeed.service: main process exited, code=exited, status=1/FAILURE
Dec 20 14:30:23 ryan-linux-laptop systemd[1]: Unit bumblebeed.service entered failed state.

uname -a
Linux ryan-linux-laptop 3.13.0-1-mainline #1 SMP PREEMPT Thu Dec 19 17:54:37 CST 2013 x86_64 GNU/Linux

The journal did not help.

sudo dkms status
bbswitch, 0.8, 3.12.3-1-ARCH, x86_64: installed
bbswitch, 0.8, 3.12.4-1-ARCH, x86_64: installed
bbswitch, 0.8, 3.12.5-1-ARCH, x86_64: installed
bbswitch, 0.8, 3.13.0-1-mainline, x86_64: installed
vboxhost, 4.3.6, 3.12.5-1-ARCH, x86_64: installed
vboxhost, 4.3.6, 3.13.0-1-mainline, x86_64: installed
Lekensteyn commented 10 years ago

There is no nvidia module, so you must be using nouveau, correct? What does your config say?

What if you run:

sudo bumblebeed --debug
ryanvade commented 10 years ago

Hmm. I thought I built the Nvidia module for 3.13...Seems I have not. My bad.

ryanvade@ryan-linux-laptop:~$ sudo bumblebeed --debug [sudo] password for ryanvade: [ 781.421763] [DEBUG]bbswitch has been detected. [ 781.422205] [INFO]Switching method 'bbswitch' is available and will be used. [ 781.422481] [DEBUG]Active configuration: [ 781.422677] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 781.422713] [DEBUG] X display: :8 [ 781.422846] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia [ 781.422878] [DEBUG] Socket path: /var/run/bumblebee.socket [ 781.422907] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia [ 781.422937] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d [ 781.423095] [DEBUG] ModulePath: /usr/lib/nvidia/xorg/,/usr/lib/xorg/modules [ 781.423126] [DEBUG] GID name: bumblebee [ 781.423155] [DEBUG] Power method: auto [ 781.423186] [DEBUG] Stop X on exit: 1 [ 781.423443] [DEBUG] Driver: nvidia [ 781.423487] [DEBUG] Driver module: nvidia [ 781.423527] [DEBUG] Card shutdown state: 1 [ 781.423818] [DEBUG]Process /sbin/modprobe started, PID 22186. [ 781.423936] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 781.427079] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 781.427171] [ERROR]Module 'nvidia' is not found.

ryanvade commented 10 years ago

Okay, I installed nvidia-dkms and can confirm the module is built: modinfo nvidia filename: /lib/modules/3.13.0-1-mainline/kernel/drivers/video/nvidia.ko alias: char-major-195- version: 331.20 supported: external license: NVIDIA alias: pci:v000010DEd00000E00sv_sd_bc04sc80i00 alias: pci:v000010DEd00000AA3sv_sd_bc0Bsc40i00* alias: pci:v000010DEd_sv_sdbc03sc02i00 alias: pci:v000010DEd_sv_sdbc03sc00i00 depends: drm,i2c-core vermagic: 3.13.0-1-mainline SMP preempt mod_unload modversions parm: NVreg_Mobile:int parm: NVreg_ResmanDebugLevel:int parm: NVreg_RmLogonRC:int parm: NVreg_ModifyDeviceFiles:int parm: NVreg_DeviceFileUID:int parm: NVreg_DeviceFileGID:int parm: NVreg_DeviceFileMode:int parm: NVreg_RemapLimit:int parm: NVreg_UpdateMemoryTypes:int parm: NVreg_InitializeSystemMemoryAllocations:int parm: NVreg_RMEdgeIntrCheck:int parm: NVreg_UsePageAttributeTable:int parm: NVreg_MapRegistersEarly:int parm: NVreg_RegisterForACPIEvents:int parm: NVreg_CheckPCIConfigSpace:int parm: NVreg_EnablePCIeGen3:int parm: NVreg_EnableMSI:int parm: NVreg_MemoryPoolSize:int parm: NVreg_RegistryDwords:charp parm: NVreg_RmMsg:charp parm: NVreg_AssignGpus:charp

bumblebeed -v [ 392.662999] [INFO]Configured driver: nvidia [ 392.665582] [INFO]Switching method 'bbswitch' is available and will be used. [ 392.668530] [INFO]bumblebeed 3.2-12-g8244297 started [ 392.668893] [INFO]Switching dedicated card OFF [bbswitch] [ 392.681214] [INFO]Initialization completed - now handling client requests

but...

optirun -vvv glxspheres [ 426.071848] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf [ 426.072456] [INFO]Configured driver: nvidia [ 426.072590] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect. [ 426.072629] [DEBUG]Socket closed. [ 426.072672] [ERROR]Could not connect to bumblebee daemon - is it running?

ryanvade commented 10 years ago

sudo systemctl status bumblebeed [sudo] password for ryanvade: bumblebeed.service - Bumblebee C Daemon Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled) Active: active (running) since Mon 2013-12-23 12:16:05 CST; 10min ago Main PID: 475 (bumblebeed) CGroup: /system.slice/bumblebeed.service └─475 /usr/sbin/bumblebeed

Dec 23 12:16:05 ryan-linux-laptop systemd[1]: Starting Bumblebee C Daemon... Dec 23 12:16:05 ryan-linux-laptop systemd[1]: Started Bumblebee C Daemon. Dec 23 12:16:08 ryan-linux-laptop bumblebeed[475]: [ 15.934129] [INFO]/usr/sbin/bumblebeed 3.2-12-g8244297 started Dec 23 12:17:43 ryan-linux-laptop bumblebeed[475]: modprobe: ERROR: could not insert 'nvidia': Unknown symbol in module, or unknown parameter (see dmesg) Dec 23 12:17:43 ryan-linux-laptop bumblebeed[475]: [ 111.147065] [ERROR]Module nvidia could not be loaded (timeout?) Dec 23 12:17:43 ryan-linux-laptop bumblebeed[475]: [ 111.147101] [ERROR]Could not load GPU driver Dec 23 12:22:55 ryan-linux-laptop systemd[1]: Started Bumblebee C Daemon.

ryanvade commented 10 years ago

Seems to be https://devtalk.nvidia.com/default/topic/644906/331-20-on-3-13-rc1-kernel/

Lekensteyn commented 10 years ago

Did the patch from Larry work?

ryanvade commented 10 years ago

No. It seems the patch worked for a little while but now it is broken again.

gdevenyi commented 10 years ago

Running bbswitch 0.7 patched to be identical to 0.8 (this was easiest for me), and also patching nvidia-331 according to @ryanvade, I get the following

uname -a
Linux delta 3.13.0-031300rc6-generic #201312291935 SMP Mon Dec 30 00:37:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[    7.172588] bbswitch: version 0.7
[    7.172596] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[    7.172602] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[    7.172612] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[    7.172729] bbswitch: detected an Optimus _DSM function
[    7.172740] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[    7.176715] [drm] Module unloaded
[    7.179237] bbswitch: disabling discrete graphics
--cut--
[   57.886090] bbswitch: enabling discrete graphics
[   58.373468] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[   58.373475] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  331.20  Wed Oct 30 17:43:35 PDT 2013
[   59.291225] nvidia 0000:01:00.0: irq 49 for MSI/MSI-X
[   59.302808] NVRM: failed to copy vbios to system memory.
[   59.305489] NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
[   59.305502] NVRM: rm_init_adapter failed for device bearing minor number 0
[   59.305535] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
[   59.309697] [drm] Module unloaded
[   59.311306] bbswitch: disabling discrete graphics
[   59.311319] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
[   59.324617] pci_raw_set_power_state: 109 callbacks suppressed
[   59.324624] pci 0000:01:00.0: Refused to change power state, currently in D0

Looks to me like bbswitch isn't successfully enabling the card

amonakov commented 10 years ago

@gdevenyi, which kernel versions previously worked fine for you?

gdevenyi commented 10 years ago

@amonakov Was working fine in 3.12.x (currently 3.12.6), obviously, it didn't need the 3.13 bbswitch compat patch or the nvidia-331 patch in order to do so

ArchangeGabriel commented 10 years ago

I’m facing this issue too now that kernel 3.13 and patched nvidia-331 have landed in Ubuntu 14.04.

Initial loading of bbswitch at boot time:

bbswitch: version 0.8
bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.VGA_
bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.RP00.VGA_
ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
bbswitch: detected an Optimus _DSM function
pci 0000:01:00.0: enabling device (0000 -> 0003)
bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
bbswitch: disabling discrete graphics
ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)

I get the following messages in dmesg after attempting to run optirun glxinfo:

bbswitch: enabling discrete graphics
vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
[drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
NVRM: loading NVIDIA UNIX x86_64 Kernel Module  331.20  Wed Oct 30 17:43:35 PDT 2013
nvidia 0000:01:00.0: irq 55 for MSI/MSI-X
NVRM: failed to copy vbios to system memory.
NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
NVRM: rm_init_adapter failed for device bearing minor number 0
NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5

And then when restarting bumblebeed to switch card off again:

[drm] Module unloaded
bbswitch: disabling discrete graphics
ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
pci 0000:01:00.0: Refused to change power state, currently in D0
ryanvade commented 10 years ago

The issue is some changes in the Nvidia driver. The patches available on the Nvidia developer site do not appear to work all the time. :(

I just upgraded to 3.13-rc7. Will let you know what happens.

jmmL commented 10 years ago

I'm having similar issues. https://devtalk.nvidia.com/default/topic/670893/linux/nvidia-331-20-will-not-load-with-kernel-3-13-on-efi-without-csm/ suggests that "editing the nv-acpi.c file and changing all references of DEVICE_ACPI_HANDLE() to ACPI_HANDLE() fixes the problem", but this does not work for me. After editing nv-acpi.c do I need to compile it somehow?

karolherbst commented 10 years ago

I used this patch and it works for me with pure EFI without CSM and no bootloader enabled

Index: NVIDIA-Linux-x86_64-304.88/kernel/nv-acpi.c
===================================================================
--- NVIDIA-Linux-x86_64-304.88.orig/kernel/nv-acpi.c
+++ NVIDIA-Linux-x86_64-304.88/kernel/nv-acpi.c
@@ -299,7 +299,10 @@ static int nv_acpi_remove(struct acpi_de

     if (pNvAcpiObject->notify_handler_installed)
     {
+        #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+        /* beginning with 3.13, acpi_remove_notify_handler() waits for events to finish */
         NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
+        #endif

         // remove event notifier
         status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);

I have a nvidia 770M + intel 4000 HD

maybe I can provide you some information you need to fix this problem

ArchangeGabriel commented 10 years ago

Ok, so now everything is working for me with latest NVIDIA + Ubuntu patches.

So, patch for 3.13:

+++ nvidia-graphics-drivers-331-331.38/debian/dkms_nvidia/patches/buildfix_kernel_3.13.patch
@@ -0,0 +1,45 @@
+From 4243c0cee4ed36b04dfecdeb7763399ef1cf4bf3 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 7 Jan 2014 15:30:30 +0100
+Subject: [PATCH 1/1] nv-acpi.c: add support for Linux 3.13
+
+There's no need to call acpi_os_wait_events_complete() (or its
+NVIDIA equivalent) as, in 3.13, acpi_remove_notify_handler() waits
+for events to finish.
+
+Furthermore use ACPI_HANDLE() if DEVICE_ACPI_HANDLE() is not
+available as per commit 3a83f992490f8235661b768e53bd5f14915420ac
+---
+ nv-acpi.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/nv-acpi.c b/nv-acpi.c
+index b0138cd..1ee05bd 100644
+--- a/nv-acpi.c
++++ b/nv-acpi.c
+@@ -48,6 +48,12 @@ static const struct acpi_device_id nv_video_device_ids[] = {
+ };
+ #endif
+ 
++#ifndef DEVICE_ACPI_HANDLE
++#ifdef ACPI_HANDLE
++#define DEVICE_ACPI_HANDLE ACPI_HANDLE
++#endif
++#endif
++
+ static struct acpi_driver *nv_acpi_driver;
+ static acpi_handle nvif_handle = NULL;
+ static acpi_handle nvif_parent_gpu_handle  = NULL;
+@@ -303,7 +309,9 @@ static int nv_acpi_remove(struct acpi_device *device, int type)
+ 
+     if (pNvAcpiObject->notify_handler_installed)
+     {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+         NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
++#endif
+ 
+         // remove event notifier
+         status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
memstick commented 10 years ago

I tested the patch, gabriel, but didn't have any effect -still the same problem.. "unable to copy vbios"

TheSiege commented 10 years ago

this patch fixed my problem on Y480

ArchangeGabriel commented 10 years ago

@memstick: How did you test it ? You need to patch the source before compiling and installing the driver and linked modules.

memstick commented 10 years ago

@ArchangeGabriel: Thanks for quick reply.

EDIT: I recompiled and installed a pure 3.13.0 kernel. Downloaded the latest nvidia-installer (331.38). Unpacked files and applied this patch:

http://cvs.rpmfusion.org/viewvc/rpms/nvidia-kmod/devel/nvidia_3.13_kernel.patch?revision=1.3&root=nonfree&view=markup

referenced from

https://devtalk.nvidia.com/default/topic/644906/linux/331-20-on-3-13-rc1-kernel/3/

before I ran the installer like normal. Of course, the patches have some effect, because dkms doesn't manage to compile the module without them.

dmesg

[ 3356.972981] bbswitch: enabling discrete graphics
[ 3357.446243] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[ 3357.446249] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  331.38  Wed Jan  8 19:32:30 PST 2014
[ 3357.539704] vgaarb: this pci device is not a vga device
[ 3357.540347] nvidia 0000:01:00.0: irq 48 for MSI/MSI-X
[ 3357.546424] NVRM: failed to copy vbios to system memory.
[ 3357.548266] NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
[ 3357.548273] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 3357.548308] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
memstick commented 10 years ago

I tested my setup with kernel version 3.2 now. It works fine. Both bbswitch and nvidia module are installed with DKMS.

I have verified that my patches are in place by inserting compiler warnings. Something is different from your setup than mine.. Maybe some kernel configuration?

lgo33 commented 10 years ago

sorry, for the silly question. But how do I apply the patch? I found /var/lib/dkms/nvidia-331/331.38/build/patches/buildfix_kernel_3.13.patch but it seems to only contain half the changes, when compared to your post. If I replace the file and run sudo apt-get install --reinstall nvidia-331 it gets reverted to the original. I guess this is trivial, but I can't find the answer.

memstick commented 10 years ago

@Fette3lke: You can download the latest driver package from nvidia and extract the files from the installer archive, apply the patches, and then run the ./nvidia-installer that is in the extracted files directory. That's how I do it at least.

jozamm commented 10 years ago

Hi,

I downloaded the _NVIDIA-Linux-x8664-331.38 drivers, extracted them and applied the patch _nvidia-graphics-drivers-331331.38-0ubuntu3.diff.gz.

Is that the correct patch to apply?

After apply the patch using the patch -p1 < filename command I killed the X server and started compiling using the terminal. The compilation exited with this error Unable to build the Unified Memory kernel module. Installer file log is at this link https://www.dropbox.com/s/80za9k64su0qfnh/nvidia-installer.log

The installer also complained that I am using gcc version 4.8 instead of 4.6 but it is not a problem i think

What could be going wrong?

Thanks

memstick commented 10 years ago

@jozamm The uvm module fails to compile if you do not patch kernel/uvm/nvidia_uvm_linux.h

See http://cvs.rpmfusion.org/viewvc/rpms/nvidia-kmod/devel/nvidia_3.13_kernel.patch?revision=1.3&root=nonfree&view=markup

Can you try that?

jozamm commented 10 years ago

@memstick I followed the your instructions to patch the nvidia_uvm_linux.h

I got the error message ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

The procedure I followed is this

  1. Download and extract NVIDIA-Linux-x8664-331.38_ drivers
  2. Apply patch
  3. Recompile

Now I found several patches on the net. Do I need to apply the patch you told me about only or is there another patch I need to apply?

Thanks

lgo33 commented 10 years ago

First of all, thanks for trying help. Unfortunately, for me the patch didn't work. I unpacked, patched and installed the drivers, but after that unity (I am on Ubuntu 13.10) didn't start up anymore and some fallback XWindow manager started. The last line of dmesg read: init: Failed to spawn nvidia-persistenced main process: unable to execute: No such file or directory

Anyway, I re-installed nvidia-331 (I also installed nvidia-331-uvm) with apt-get and got at least unity working again. But still bumblebee won't work. This is what I get in dmesg when I try to run 'optirun glxspheres64':

[ 90.635658] nvidia: module license 'NVIDIA' taints kernel. [ 90.644968] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1 [ 90.644976] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 331.38 Wed Jan 8 19:32:30 PST 2014 [ 90.744606] nvidia 0000:01:00.0: irq 49 for MSI/MSI-X [ 90.758800] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5

which I guess, is the old problem.

memstick commented 10 years ago

@jozamm Do you have the correct kernel sources installed in /lib/modules/"kernel_version" ? Don't apply more patches if you can't get it to work; try to figure out if you have the correct kernel sources installed. Check the "kernel_version" with 'uname -a'

@Fette3lke Maybe you have the old nvidia-kernel interface installed (it get's installed automatically when you run the nvidia installer). Did you try to do 'apt-get install --reinstall nvidia-graphics-drivers-331 xserver-xorg-video-nvidia'?

lgo33 commented 10 years ago

@memstick I did not do that. Should I do that before I try to install the patched nvidia-driver or afterwards? In generell, should I uninstall bumblebee before I install any nvidia drivers and reinstall it afterwards, or is this unnecessary? (Edit: I can't find the two mentioned packages, do I have to add a certain repository?)

jozamm commented 10 years ago

@memstick my kernel is _Linux 3.13.1-031301-generic #201401291035 SMP Wed Jan 29 15:37:43 UTC 2014 x86_64 x86_64 x8664 GNU/Linux. I will try later on using the patch you suggested previously only and report back.

memstick commented 10 years ago

@Fette3lke Sorry I misspoke in my last post to you. I meant there is probably a new x interface in your system (which got installed with the nvidia installer). You should re-install the x drivers. They interface with the display driver itself (at least according to my own knowledge and understanding).

I'm running debian and have a package in the repo called xserver-xorg-video-nvidia. It installs the necessary files. http://packages.ubuntu.com/lucid/xserver-xorg-video-nv

@jozamm Great! For the sake of things I will post exactly what I did here.

1) Download latest nvidia installer script. 2) Extract it with the -x option 3) Enter the subfolder containing the installer files 4) Make the necessary changes according to the patch I posted above (the patch from archange doesn't contain the uvm fixes) 5) Run the installer file called "nvidia-installer". I used this command

./nvidia-installer --x-prefix=/usr/lib/nvidia --x-module-path=/usr/lib/nvidia --x-library-path=/usr/lib/nvidia/lib --opengl-libdir=/usr/lib/nvidia/og

This puts the X interface in different directories so as not to overwrite the intel X interface. On my laptop this prevents gnome to enter the boring 2D GUI. You can install it however you like, I just do it to see which files get installed and where so I can setup bumblebee correctly. 6) When the installer is done, you need to configure bumblebee IF you used my installation directories above. You can download my config from http://krisrst.no . Else, you have to find out where stuff is yourself. I really don't know since there is so poor documentation. Anyway, the trick is not to let the installer overwrite any other X drivers (that you need when you boot ubuntu with the intel card). 7) Do a reboot just for luck. Make sure bumblebeed is running and try optirun.

memstick commented 10 years ago

I finally solved my nvidia module problems.

@ArchangeGabriel I'm apparently running in EFI mode without CSM. I guess that means I'm running new EFI hardware interfaces without any backwards compatibility to old BIOS standards. Therefore I have to apply more patches than those you posted.

The general solution to these problems can be read about in this blog: http://blog.langfinger.org/?p=314 Link to the nvidia bug report thread I made: https://devtalk.nvidia.com/default/topic/684651/linux/ux32vd-quot-failed-to-copy-vbios-to-system-memory-quot-yet-again/?offset=2#4114295

Can mark this issue as closed now, as I think the people I tried to help above struggle more with installation-related problems.

jozamm commented 10 years ago

@memstick I tried the procedure you gave me and applied the patch in your previous post and it broke my system most probably my Xserver and I had to re-install everything. I managed to get X running again but at a low resolution. The installer said that it was successful but it said that nvidia: module license 'NVIDIA' taints kernel. After rebooting X would not start, it found the correct resolution but it only applied the 640x480. I am using a Lenovo W530.

memstick commented 10 years ago

@jozamm Can you post dmesg output + xorg? (/var/log/Xorg.0.log, check which of the Xorg.* files are most recently changed and post that one)

ArchangeGabriel commented 8 years ago

I’m closing this. The main issue was incompatibilities between nvidia driver and latest kernel. If anyone is still having troubles after all this time, please open a new thread.