Activity log for bug #385703

Date Who What changed Old value New value Message
2009-06-10 21:14:30 Bojan Vitnik bug added bug
2009-06-10 21:22:28 Bojan Vitnik description Binary package hint: xserver-xorg-video-nv In my case, "/usr/share/xserver-xorg/pci/nv.ids" was missing PCI-ID for my 7600 GS AGP (10de:02e1). X server autodetection failed and -vesa was used instead. By manualy adding appropriate PCI-ID to "nv.ids" and restarting X server, autodetection worked like a charm and I didn't have any problems with nv driver - changing resolution and refresh rate worked. I took some time to figure out what was realy going on here. It seems that a large number of supported cards are affected by this bug. The problem is the way "nv.ids" is generated. As far as I could tell, it's generated from "nv_driver.c" (NVKnownChipsets[] to be exact) by a simple awk+sed script. The problem is that not all PCI-IDs of supported cards are listed there and therefore, "nv.ids" is missing PCI-IDs that are not explicitely found in "nv_driver.c". Some supported cards, for example, AGP versions of the cards where both AGP and PCI-E versions exist, are handled diferently by the code. Here is the code snippet from nv_driver.c: const CARD32 id = ((dev->device_id & 0xfff0) == 0x00F0 || (dev->device_id & 0xfff0) == 0x02E0) ? NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id; const char *name = xf86TokenToString(NVKnownChipsets, id); So, cards with PCI-IDs 02Ex and 00Fx (AGP) are handled by translating their PCI-IDs in PCI-E equivalent PCI-IDs and then looked up in NVKnownChipsets[]. For example, PCI-IDs of my card, 02E1 is translated to 0392, looked up in NVKnownChipsets[] and then handled properly. NVGetPCIXpressChip() is used in the process and, as far as I could tell, it's medling with registers to do its job. Even more supported cards are handled by NVIsSupported() and NVIsG80() using bitmasks. All in all, "nv.ids" is incomplete because of the way it's generated at the moment. Solutions: 1) Add supported PCI-IDs, 02Ex and 00Fx, to "nv.ids" manualy, after "nv.ids" is generated with awk+sed script. Consult "pci.ids" if needed. 2) Add supported PCI-IDs in NVKnownChipsets[] and then generate "nv.ids". Those entries in NVKnownChipsets[] would never be used by the code so the question is should they even be there. 3) Change how X server handle .ids files upstream, by adding support for whildcards/bitmasks. "nv.ids" would be generated differently. (ideal) Binary package hint: xserver-xorg-video-nv In my case, "/usr/share/xserver-xorg/pci/nv.ids" was missing PCI-ID for my 7600 GS AGP (10de:02e1). X server autodetection failed and -vesa was used instead. By manualy adding appropriate PCI-ID to "nv.ids" and restarting X server, autodetection worked like a charm and I didn't have any problems with nv driver - changing resolution and refresh rate worked. I took some time to figure out what was realy going on here. It seems that a large number of supported cards are affected by this bug. The problem is the way "nv.ids" is generated. As far as I could tell, it's generated from "nv_driver.c" (NVKnownChipsets[] to be exact) by a simple awk+sed script. The problem is that not all PCI-IDs of supported cards are listed there and therefore, "nv.ids" is missing PCI-IDs that are not explicitely found in "nv_driver.c". Some supported cards, for example, AGP versions of the cards where both AGP and PCI-E versions exist, are handled diferently by the code. Here is the code snippet from nv_driver.c: const CARD32 id = ((dev->device_id & 0xfff0) == 0x00F0 || (dev->device_id & 0xfff0) == 0x02E0) ? NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id; const char *name = xf86TokenToString(NVKnownChipsets, id); So, cards with PCI-IDs 02Ex and 00Fx (AGP) are handled by translating their PCI-IDs in PCI-E equivalent PCI-IDs and then looked up in NVKnownChipsets[]. For example, PCI-IDs of my card, 02E1 is translated to 0392, looked up in NVKnownChipsets[] and then handled properly. NVGetPCIXpressChip() is used in the process and, as far as I could tell, it's medling with registers to do its job. Even more supported cards are handled by NVIsSupported() and NVIsG80() using bitmasks. All in all, "nv.ids" is incomplete because of the way it's generated at the moment. Solutions: 1) Add supported PCI-IDs, 02Ex and 00Fx, to "nv.ids" manualy, after "nv.ids" is generated with awk+sed script. Consult "pci.ids" if needed. 2) Add supported PCI-IDs in NVKnownChipsets[] and then generate "nv.ids". Those entries in NVKnownChipsets[] would never be used by the code so the question is should they even be there. 3) Change how X server handle .ids files upstream, by adding support for whildcards/bitmasks. "nv.ids" would be generated differently. (ideal) References used: xserver-xorg-video-nv_2.1.12.orig.tar.gz - (nv_driver.c) xserver-xorg-video-nv_2.1.12-1ubuntu5.diff.gz - (how nv.ids is generated) /usr/share/xserver-xorg/pci/nv.ids http://pciids.sourceforge.net/pci.ids http://cgit.freedesktop.org/xorg/driver/xf86-video-nv/plain/src/nv_driver.c
2009-06-14 03:31:46 Robert Hooker attachment added 101_agp_bridge_pci_id.patch http://launchpadlibrarian.net/27885379/101_agp_bridge_pci_id.patch
2009-06-24 22:50:50 Bryce Harrington xserver-xorg-video-nv (Ubuntu): importance Undecided High
2009-06-24 22:50:50 Bryce Harrington xserver-xorg-video-nv (Ubuntu): status New Triaged
2009-06-24 22:51:57 Bryce Harrington xserver-xorg-video-nv (Ubuntu): status Triaged In Progress
2009-06-25 13:32:19 Bojan Vitnik attachment added Xorg.0.logs and output of lspci http://launchpadlibrarian.net/28369409/logs.tar.gz
2009-08-13 21:23:48 Bryce Harrington tags autodetection nv autodetection jaunty nv
2009-10-13 09:17:36 Bryce Harrington xserver-xorg-video-nv (Ubuntu): status In Progress Incomplete
2009-10-13 20:52:26 Bojan Vitnik attachment added Xorg.0.log http://launchpadlibrarian.net/33613796/Xorg.0.log
2009-10-13 21:04:12 Bojan Vitnik attachment added nv_list.csv http://launchpadlibrarian.net/33616767/nv_list.csv
2010-02-20 00:22:21 Bryce Harrington xserver-xorg-video-nv (Ubuntu): status Incomplete Won't Fix