Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138083 - Workaround in /sbin/livecd-functions.sh to support GF 6xxx and 7xxx without "NV" string
Summary: Workaround in /sbin/livecd-functions.sh to support GF 6xxx and 7xxx without "...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: LiveCD/DVD/USB (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-26 10:43 UTC by Fabio Erculiani
Modified: 2006-06-26 14:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Erculiani 2006-06-26 10:43:48 UTC
I have this card:
02:00:0 VGA compatible controller: NVIDIA Corporation GeForce 6200 (rev a1)

pci id misses the NV code, that's a nice workaround for now (until pciids gets properly updated):

--- /sbin/livecd-functions.sh   2006-06-26 20:08:30.000000000 +0200
+++ /var/tmp/catalyst/tmp/stage1-x86_tiny-2006.0/sbin/livecd-functions.sh       2006-06-26 20:06:59.000000000 +0200
@@ -59,10 +59,15 @@ get_video_cards() {
        [ -x /usr/sbin/lspci ] && VIDEO_CARDS="$(/usr/sbin/lspci | grep VGA)"
        NUM_CARDS="$(echo ${VIDEO_CARDS} | wc -l)"
        if [ ${NUM_CARDS} -eq 1 ]; then
-               NVIDIA=$(echo ${VIDEO_CARDS} | grep "nVidia Corporation")
-               ATI=$(echo ${VIDEO_CARDS} | grep "ATI Technologies")
+               NVIDIA=$(echo ${VIDEO_CARDS} | grep -i "nVidia Corporation")
+               ATI=$(echo ${VIDEO_CARDS} | grep -i "ATI Technologies")
                if [ -n "${NVIDIA}" ]; then
                        NVIDIA_CARD=$(echo ${NVIDIA} | awk 'BEGIN {RS=" "} /(C|NV|nv)[0-9]+/ {print $1}' | cut -d. -f1 | sed 's/ //' | sed 's:[^0-9]::g')
+                       if [ -z "$NVIDIA_CARD" ]; then
+                               # try to find out if it is a NVIDIA 6xxx video card that doesn't have NV[0-9] string
+                               NVIDIA_CARD=$(echo ${NVIDIA} | grep -i "geforce" | sed 's/(.*)//'  | cut -d' ' -f 3-10  | sed 's:[^0-9]::g')
+                       fi
+                       NVIDIA_CARD=$()
                        if [ -n "${NVIDIA_CARD}" ]; then
                                if [ $(echo ${NVIDIA_CARD} | cut -dV -f2) -ge 4 ]; then
                                        nv_gl
Comment 1 Fabio Erculiani 2006-06-26 10:44:52 UTC
Chris, it is better to use grep -i "nvidia corporation" than grepping with case sensitive enabled.
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-26 14:54:25 UTC
I'm marking this as UPSTTREAM.  Anyone can submit to the pciids.sourceforge.net database and they have accepted every change that I have ever requested.  Get this fixed upstream, instead.  I'm not adding more hacks for poorly-done pciids entries.