Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111509 - livecd-tools OpenGL NV41.8 detection error
Summary: livecd-tools OpenGL NV41.8 detection error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-11-04 14:26 UTC by Fabio Erculiani
Modified: 2005-11-29 16:00 UTC (History)
0 users

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


Attachments
Fix for NV41.8 and NV11DDR (livecd-functions.sh.diff,1.75 KB, patch)
2005-11-13 11:05 UTC, Fabio Erculiani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Erculiani 2005-11-04 14:26:05 UTC
The problem: 
When lspci tells that NVIDIA CARD IS: 
 
0000:01:00.0 VGA compatible controller: nVidia Corporation NV41.8 [GeForce Go 
6800] (rev a2) 
 
/sbin/livecd-functions.sh fail at line : 
 
   if [ -n "${NVIDIA_CARD}" ]; then 
 
                                if [ $(echo ${NVIDIA_CARD} | cut -dV -f2) -ge 
4 ]; then 
                                        nv_gl 
                                else 
                                        no_gl 
                                fi 
                        else 
                                no_gl 
                        fi 
 
Because the integer comparision -gt between 41.8 and 4 fail. 
 
We need to change: 
 
echo ${NVIDIA_CARD} | cut -dV -f2 
 
in: 
 
echo ${NVIDIA_CARD} | cut -dV -f2 | cut -d. -f1 
 
So the problem is solved. 
 
I suggest to test things with RV100 too (and Radeon cards in general).
Comment 1 Fabio Erculiani 2005-11-04 14:47:07 UTC
Correction: fix for NV11DDR too  
  
                        NVIDIA_CARD=$(echo ${NVIDIA} | awk 'BEGIN {RS="  
"} /NV[0-9]+/ {print $1}')  
                        if [ -n "${NVIDIA_CARD}" ]; then  
  
                                # fix for NV41.8 (for example)  
                                nv_test=$(echo ${NVIDIA_CARD} | cut -dV -f2 |  
cut -d "." -f 1 | sed 's/ //')  
  
                                # fix for NV11DDR (for example)  
                                nv_test_count=$(echo $nv_test | wc -m)  
                                if [ "$nv_test_count" -gt 3 ]; then  
                                  nv_test=$(echo $nv_test | cut -c 0-2)  
                                fi  
  
                                if [ $(echo ${NVIDIA_CARD} | cut -dV -f2 | cut  
-d "." -f 1 ) -ge 4 ]; then  
                                        nv_gl  
                                else  
                                        no_gl  
                                fi  
                        else  
                                no_gl  
                        fi  
  
Comment 2 Fabio Erculiani 2005-11-04 14:50:39 UTC
WORKING VERSION: 
 
                        if [ -n "${NVIDIA_CARD}" ]; then 
 
                                # fix for NV41.8 (for example) 
                                nv_test=$(echo ${NVIDIA_CARD} | cut -dV -f2 | 
cut -d "." -f 1 | sed 's/ //') 
 
                                # fix for NV11DDR (for example) 
                                nv_test_count=$(echo $nv_test | wc -m) 
                                if [ "$nv_test_count" -gt 3 ]; then 
                                  nv_test=$(echo $nv_test | cut -c 0-2) 
                                fi 
 
                                if [ "$nv_test" -ge 4 ]; then 
                                        nv_gl 
                                else 
                                        no_gl 
                                fi 
                        else 
                                no_gl 
                        fi 
 
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2005-11-05 07:58:17 UTC
Any chance you could have that as a patch, rather than a complete function?

I'm also not really sure why you added so much extra code.  All we need to know,
at all, is that the NV version is above NV4, which is the lowest card supported
by the drivers *usually* on the CD.  I'm going to have to come up with a newer
detection method for the newer drivers that have dropped legacy support.
Comment 4 Fabio Erculiani 2005-11-05 08:59:49 UTC
That was not my code. I have only found that the (bloated) script does not 
work with NV41.8 and NV11DDR. 
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2005-11-05 10:53:16 UTC
What are you talking about?  The script is extremely concise.  Besides that,
what does the NVidia detection have to do with Radeon cards?  At any rate, it
looks like I have a single line fix that will work for both cards.

Could you post the output of "lspci" as a text/plain attachment to this bug?
Comment 6 Fabio Erculiani 2005-11-05 11:14:19 UTC
0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express 
Processor to DRAM Controller (rev 03)  
 0000:00:01.0 PCI bridge: Intel Corporation Mobile 915GM/PM Express PCI 
Express Root Port (rev 03)  
 0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 
Family) USB UHCI #1 (rev 03)  
 0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 
Family) USB UHCI #2 (rev 03)  
 0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 
Family) USB UHCI #3 (rev 03)  
 0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 
Family) USB UHCI #4 (rev 03)  
 0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 
Family) USB2 EHCI Controller (rev 03)  
 0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)  
 0000:00:1e.2 Multimedia audio controller: Intel Corporation 
82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)  
 0000:00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
AC'97 Modem Controller (rev 03)  
 0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface 
Bridge (rev 03)  
 0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA 
Controller (rev 03)  
 0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
SMBus Controller (rev 03)  
 0000:01:00.0 VGA compatible controller: nVidia Corporation NV41.8 [GeForce Go 
6800] (rev a2)  
 0000:03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX 
(rev 02)  
 0000:03:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b3)  
 0000:03:01.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller 
(rev 0Cool  
 0000:03:01.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host 
Adapter (rev 17)  
 0000:03:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 
05)  
 
and there's a card called NV11DDR. 
 
I am talking about /scripts/livecd-functions.sh 
 
I am not the developer of livecd-tools 
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2005-11-05 11:27:36 UTC
*sigh*

I asked for it as an attachment.  Thanks for following directions.  Yes, I
understand that there is a card called NV11DDR, as I'm not an idiot and can
follow a simple conversation.  I *am* the developer of livecd-tools, and I don't
have a clue where you got the impression that I was even insinuating that you
are in any way tied to the package.
Comment 8 Fabio Erculiani 2005-11-13 11:05:56 UTC
Created attachment 72840 [details, diff]
Fix for NV41.8 and NV11DDR
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2005-11-13 13:57:05 UTC
So I made a simple one line change that works for both of these cards.  My whole
point was that you're adding a ton of code for what is essentially a simple fix.

diff -u -b -B -r1.13 livecd-functions.sh
--- livecd-functions.sh 16 Aug 2005 19:02:33 -0000      1.13
+++ livecd-functions.sh 13 Nov 2005 21:56:03 -0000
@@ -55,7 +55,7 @@
                NVIDIA=$(echo ${VIDEO_CARDS} | grep "nVidia Corporation")
                ATI=$(echo ${VIDEO_CARDS} | grep "ATI Technologies")
                if [ -n "${NVIDIA}" ]; then
-                       NVIDIA_CARD=$(echo ${NVIDIA} | awk 'BEGIN {RS=" "}
/NV[0-9]+/ {print $1}')
+                       NVIDIA_CARD=$(echo ${NVIDIA} | awk 'BEGIN {RS=" "}
/NV[0-9]+/ {print $1}' cut -d. -f1 | sed 's/ //' | sed 's:[^0-9]::g')
                        if [ -n "${NVIDIA_CARD}" ]; then
                                if [ $(echo ${NVIDIA_CARD} | cut -dV -f2) -ge 4
]; then
                                        nv_gl

At any rate, I've added this into livecd-tools, so it'll show up in 1.0.27, when
it is released.
Comment 10 Fabio Erculiani 2005-11-13 14:11:40 UTC
great. Thank you very much. 
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2005-11-29 16:00:01 UTC
1.0.27 is in portage