331.20 on 3.13-rc1 kernel

Hi.

There is a problem on 3.13-rc1 kernel.
Module compiles, but when X starts, drivers don’t work.
This is the error that is showen in dmesg:

nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)

I manged to make it work, but I don’t know if that method is OK, and if it is not going to break something. :)

I edited nv-acpi.c file and comented this part:

if (pNvAcpiObject->notify_handler_installed)
    {
        NV_ACPI_OS_WAIT_EVENTS_COMPLETE();

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

Now X starts and drivers are working (for now).
nvidia-bug-report.log.gz (77.8 KB)

As I can see, kernel devs removed

EXPORT_SYMBOL(acpi_os_wait_events_complete);

from /drivers/acpi/osl.c

Thanks, Milos_SD! It works for me too, on Arch Linux x86_64. For those using Arch PKGBUILDs or something else automated, here’s the patch I diffed following your instructions:

diff -Naur NVIDIA-Linux-x86_64-331.20-no-compat32-orig/kernel/nv-acpi.c NVIDIA-Linux-x86_64-331.20-no-compat32/kernel/nv-acpi.c
--- NVIDIA-Linux-x86_64-331.20-no-compat32-orig/kernel/nv-acpi.c	2013-10-30 20:15:05.000000000 -0400
+++ NVIDIA-Linux-x86_64-331.20-no-compat32/kernel/nv-acpi.c	2013-11-24 00:50:41.325302579 -0500
@@ -301,14 +301,14 @@
             "NVRM: nv_acpi_remove: failed to disable display switch events (%d)!\n", status);
     }
 
-    if (pNvAcpiObject->notify_handler_installed)
-    {
-        NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
-
-        // remove event notifier
-        status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
-    }
-
+/*    if (pNvAcpiObject->notify_handler_installed)
+ *   {
+ *       NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
+ *
+ *       // remove event notifier
+ *       status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
+ *   }
+ */
     if (pNvAcpiObject->notify_handler_installed &&
         ACPI_FAILURE(status))
     {

Please attach nvidia bug report .

I attached nvidia-bug-report file on the first post.

A better fix is the following:

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);

Unlike the previous version, this patch still removes the ACPI handle.

@lwfinger, isn’t the test backwards in your patch? If I do it your way the nvidia module doesn’t load, but if I make it

  • #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  • it works.

    To compile using 3.13-rc2, apply above patch and change uvm/nvidia_uvm_linux.h around line 394

    from:

    #if defined(NV_TASK_STRUCT_HAS_CRED)
    #define NV_CURRENT_EUID() \
        (((typeof(*current->cred) __force __kernel *)current->cred)->euid)
    #else
    #define NV_CURRENT_EUID() (current->euid)
    #endif
    

    to:

    #if defined(NV_TASK_STRUCT_HAS_CRED)
    #define NV_CURRENT_EUID() \
        (((typeof(*current->cred) __force __kernel *)current->cred)->euid.val)
    #else
    #define NV_CURRENT_EUID() (current->euid.val)
    #endif
    

    Note that above patch allows loading the NVidia driver, it doesn’t actually seem to work (crashes when using google in chromium or starting an OpenGL app).

    With 3.13-rc4 the issue is more complex, at least on my box (ArchLinux x86_64, Gigabyte 990FXA-UD5, IOMMU enabled )

    1.) I needed the drm oops fix from http://lists.freedesktop.org/archives/dri-devel/2013-December/050098.html otherwhise the kernel oopses when loading drm
    2.) Used the corrected nvidia drivers patch from lwfinger @ #6

    Kernel boots, driver loads fine, but when I try to start X:

    [   28.137015] nvidia 0000:01:00.0: irq 78 for MSI/MSI-X
    [   28.176663] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.176671] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.176674] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.248505] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.248518] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.251650] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.251663] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.251667] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.251671] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.253737] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.253749] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   28.253753] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   32.262180] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   32.264936] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002dc6b1200 flags=0x0010]
    [   32.264938] AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0017 address=0x00000002d80d5000 flags=0x0010]
    [   40.285919] NVRM: RmInitAdapter failed! (0x26:0x38:1179)
    [   40.285939] NVRM: rm_init_adapter failed for device bearing minor number 0
    [   40.285963] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
    [   40.322869] kdm[2978]: X server died during startup
    [   40.329841] kdm[2978]: X server for display :0 cannot be started, session disabled
    

    Turning off IOMMU is not an option, so no idea if it works without it.

    EDIT: Nevermind, I found it. In the 3.13-rc4 build I disabled CONFIG_INTEL_IOMMU, but obviously the nvidia driver fails to start X without it even on an IOMMU enabled AMD system (CONFIG_AMD_IOMMU=y)

    not working with the latest linux-mainline on Arch Linux with nvidia-dkms and Bumblebee-git

    [  123.417751] nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)
    [  149.289306] nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)
    [  786.649979] nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)
    [ 1073.135115] nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)
    

    nv-acpi.txt (42.9 KB)
    nvidia_uvm_linux.txt (13.8 KB)

    Just patch the driver, and it will work. I didn’t have any problems with patched driver. Every 3.13 RC kernel worked great.

    I did. Din’t work.

    I also have patched 331.20 and it’s working with 3.13-rc7 on OpenSUSE 13.1 x64.

    EDIT: Working as in the module was loading, and GLX was working. But the driver breaks signal handling and Akonadi start and the whole desktop (KDE 4.11) seems slow.
    I’ve installed 319.82 and it’s better, working Akonadi and faster desktop. Also compiled OK with 3.13-rc7 after patching 319.82 with the above ACPI patch.

    Still testing things…

    It doesn’t load for me on ArchLinux 64bit with the patch:

    janv. 11 17:49:50 arch kernel: NVRM: failed to copy vbios to system memory.
    janv. 11 17:49:50 arch kernel: NVRM: RmInitAdapter failed! (0x30:0xffffffff:720)
    janv. 11 17:49:50 arch kernel: NVRM: rm_init_adapter failed for device bearing minor number 0
    janv. 11 17:49:50 arch kernel: NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
    

    https://devtalk.nvidia.com/default/topic/670893/linux/nvidia-331-20-will-not-load-with-kernel-3-13-on-efi-without-csm/

    I don’t have an UEFI BIOS, but this fixed the issue anyway, thanks!

    331.38 released, still no Linux 3.13 support it seems.

    I have it compiled and running with 3.13.0-rc7 on OpenSUSE 13.1 x64. Be mindful that 3.13 is still in development and NVIDIA doesn’t support devel version kernels.

    Worked for me on gentoo 3.13.0 and nvidia-drivers-331.38.
    Patch by lwfinger (#5) with corrections by gun26 (#7)