nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable (http://www.nvnews.net/vbulletin/showthread.php?t=142656)

underling 12-15-09 08:35 PM

Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
I discovered after updating to Fedora 12 that my 3 monitor Xinerama setup broke. At X startup, the CPU would shoot to 100%, and GDM would never get a chance to paint anything.

I noticed that while the server was wedged, it was spinning reading and writing to /dev/vga_arbiter. Since the nvidia driver has no need to communicate over the legacy VGA channel, I patched the driver to call vga_set_legacy_decoding(dev, VGA_RSRC_NONE); at init time, and my Xinerama setup works perfectly once again.

Patch:

Code:

*** usr/src/nv/nv-linux.h.orig        2009-11-22 19:27:38.000000000 -0800
--- usr/src/nv/nv-linux.h        2009-12-15 18:32:06.000000000 -0800
***************
*** 83,102 ****
--- 83,103 ----
 
  #if !defined(KERNEL_2_4)
  #include <linux/sched.h>            /* suser(), capable() replacement  */
  #include <linux/moduleparam.h>      /* module_param()                  */
  #include <linux/smp_lock.h>        /* kernel_locked                    */
  #include <asm/tlbflush.h>          /* flush_tlb(), flush_tlb_all()    */
  #include <asm/kmap_types.h>        /* page table entry lookup          */
  #endif
 
  #include <linux/pci.h>              /* pci_find_class, etc              */
+ #include <linux/vgaarb.h>          /* vga_set_legacy_decoding          */
  #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
  #include <linux/timer.h>
 
  #include <asm/div64.h>              /* do_div()                        */
  #include <asm/system.h>            /* cli, sli, save_flags            */
  #include <asm/io.h>                /* ioremap, virt_to_phys            */
  #include <asm/uaccess.h>            /* access_ok                        */
  #include <asm/page.h>              /* PAGE_OFFSET                      */
  #include <asm/pgtable.h>            /* pte bit definitions              */
 
*** usr/src/nv/nv.c.orig        2009-11-22 19:27:36.000000000 -0800
--- usr/src/nv/nv.c        2009-12-15 18:32:06.000000000 -0800
***************
*** 724,743 ****
--- 724,745 ----
                  goto failed;
              }
 
              entry->data = nv;
              entry->read_proc = nv_kern_read_agpinfo;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
              entry->owner = THIS_MODULE;
  #endif
          }
 
+        vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
+
          NV_PCI_DEV_PUT(dev);
      }
 
      entry = create_proc_entry("version", flags, proc_nvidia);
      if (!entry)
          goto failed;
 
      entry->read_proc = nv_kern_read_version;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
      entry->owner = THIS_MODULE;


underling 12-16-09 01:14 PM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Here is a new patch with appropriate macro shielding to only interact with the new vgaarb API when it's present:

Code:

*** usr/src/nv/nv-linux.h.orig        2009-11-22 19:27:38.000000000 -0800
--- usr/src/nv/nv-linux.h        2009-12-16 11:02:22.000000000 -0800
***************
*** 83,102 ****
--- 83,105 ----
 
  #if !defined(KERNEL_2_4)
  #include <linux/sched.h>            /* suser(), capable() replacement  */
  #include <linux/moduleparam.h>      /* module_param()                  */
  #include <linux/smp_lock.h>        /* kernel_locked                    */
  #include <asm/tlbflush.h>          /* flush_tlb(), flush_tlb_all()    */
  #include <asm/kmap_types.h>        /* page table entry lookup          */
  #endif
 
  #include <linux/pci.h>              /* pci_find_class, etc              */
+ #if defined(CONFIG_VGA_ARB)
+ #include <linux/vgaarb.h>          /* vga_set_legacy_decoding          */
+ #endif
  #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
  #include <linux/timer.h>
 
  #include <asm/div64.h>              /* do_div()                        */
  #include <asm/system.h>            /* cli, sli, save_flags            */
  #include <asm/io.h>                /* ioremap, virt_to_phys            */
  #include <asm/uaccess.h>            /* access_ok                        */
  #include <asm/page.h>              /* PAGE_OFFSET                      */
  #include <asm/pgtable.h>            /* pte bit definitions              */
 
*** usr/src/nv/nv.c.orig        2009-11-22 19:27:36.000000000 -0800
--- usr/src/nv/nv.c        2009-12-16 11:02:54.000000000 -0800
***************
*** 724,743 ****
--- 724,747 ----
                  goto failed;
              }
 
              entry->data = nv;
              entry->read_proc = nv_kern_read_agpinfo;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
              entry->owner = THIS_MODULE;
  #endif
          }
 
+ #if defined(CONFIG_VGA_ARB)
+        vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
+ #endif
+
          NV_PCI_DEV_PUT(dev);
      }
 
      entry = create_proc_entry("version", flags, proc_nvidia);
      if (!entry)
          goto failed;
 
      entry->read_proc = nv_kern_read_version;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
      entry->owner = THIS_MODULE;


underling 12-16-09 01:23 PM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
It appears that a few people are running the patch successfully:

http://www.nvnews.net/vbulletin/showthread.php?t=141706
http://forums.fedoraforum.org/showthread.php?t=236211

I think it's the right thing to do. It's a shame that the vga arbiter is opt-out in nature, since the overwhelming majority of video cards have their own relocatable address space to communicate with each card independently without toggling the enable bits for each card in a round-robin loop. It would have probably made more sense for drivers to declare that they need that facility, rather than declare that they don't.

I'm going to post this to the rpmfusion mailing list if no one has any objections.

underling 01-07-10 05:41 PM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Can an nVidia dev comment on the necessity for the nvidia driver to opt out of vga arbitration if the interface is present in the kernel? It would be nice to have a patched version in rpmfusion that just works for us few Xinerama stragglers. AaronP?

zander 01-07-10 05:44 PM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Yes, we believe this is currently necessary. Future driver releases will do this. We have a bug file to track additional work we believe to be beneficial and/or feel may be needed in the future.

leigh123linux 01-08-10 05:39 AM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Quote:

Originally Posted by underling (Post 2160106)
Can an nVidia dev comment on the necessity for the nvidia driver to opt out of vga arbitration if the interface is present in the kernel? It would be nice to have a patched version in rpmfusion that just works for us few Xinerama stragglers. AaronP?


There is a patched driver at rpmfusion, it is currently in the testing repo.

Quote:

%changelog
* Wed Dec 30 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 190.53-1
- Update to 190.53
- Add patch for VGA_ARB
http://download1.rpmfusion.org/nonfr...od-nvidia.html

Aquila2063 06-24-10 11:14 AM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Greetings
Do the latest nvidia drivers contain these patches to the VGA arbiter? Any indication either way?

Thanks in advance.

danix 06-28-10 05:48 PM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
195.36.31 and 256.35 are both pre-patched, and should avoid this interaction with the VGA arbiter. If you are trying these versions, and still experiencing problems, you may be affected by another bug. Please start a new post and include an nvidia-bug-report.log.

To be clear, the patch to the driver does not patch the VGA arbiter. The VGA arbiter is part of the kernel and it currently behaves in a way that can break certain multi-GPU setups. We're working with the kernel VGA arbiter developers to fix this in the kernel; in the meantime, the patch to the driver works around the VGA arbiter's broken behavior.

petrovlucca 10-29-10 08:19 AM

Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable
 
Quote:

Originally Posted by underling (Post 2145121)
Here is a new patch with appropriate macro shielding to only interact with the new vgaarb API when it's present:

Code:

*** usr/src/nv/nv-linux.h.orig        2009-11-22 19:27:38.000000000 -0800
--- usr/src/nv/nv-linux.h        2009-12-16 11:02:22.000000000 -0800
***************
*** 83,102 ****
--- 83,105 ----
 
  #if !defined(KERNEL_2_4)
  #include <linux/sched.h>            /* suser(), capable() replacement  */
  #include <linux/moduleparam.h>      /* module_param()                  */
  #include <linux/smp_lock.h>        /* kernel_locked                    */
  #include <asm/tlbflush.h>          /* flush_tlb(), flush_tlb_all()    */
  #include <asm/kmap_types.h>        /* page table entry lookup          */
  #endif
 
  #include <linux/pci.h>              /* pci_find_class, etc              */
+ #if defined(CONFIG_VGA_ARB)
+ #include <linux/vgaarb.h>          /* vga_set_legacy_decoding          */
+ #endif
  #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
  #include <linux/timer.h>
 
  #include <asm/div64.h>              /* do_div()                        */
  #include <asm/system.h>            /* cli, sli, save_flags            */
  #include <asm/io.h>                /* ioremap, virt_to_phys            */
  #include <asm/uaccess.h>            /* access_ok                        */
  #include <asm/page.h>              /* PAGE_OFFSET                      */
  #include <asm/pgtable.h>            /* pte bit definitions              */
 
*** usr/src/nv/nv.c.orig        2009-11-22 19:27:36.000000000 -0800
--- usr/src/nv/nv.c        2009-12-16 11:02:54.000000000 -0800
***************
*** 724,743 ****
--- 724,747 ----
                  goto failed;
              }
 
              entry->data = nv;
              entry->read_proc = nv_kern_read_agpinfo;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
              entry->owner = THIS_MODULE;
  #endif
          }
 
+ #if defined(CONFIG_VGA_ARB)
+        vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
+ #endif
+
          NV_PCI_DEV_PUT(dev);
      }
 
      entry = create_proc_entry("version", flags, proc_nvidia);
      if (!entry)
          goto failed;
 
      entry->read_proc = nv_kern_read_version;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
      entry->owner = THIS_MODULE;


Thanks for the patch. It solve my problems. Everything is going nicely now.


All times are GMT -5. The time now is 06:18 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.