<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>105963</bug_id>
          
          <creation_ts>2005-05-19 16:18:01 +0000</creation_ts>
          <short_desc>kcmopengl 3d card is always unkwnown</short_desc>
          <delta_ts>2005-05-20 20:29:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kcontrol</product>
          <component>kcminfo</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Ilya Korniyko">k_ilya</reporter>
          <assigned_to name="Helge Deller">deller</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>343534</commentid>
    <comment_count>0</comment_count>
    <who name="Ilya Korniyko">k_ilya</who>
    <bug_when>2005-05-19 16:18:02 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
OS:                Linux

it is because of changed format of /proc/dri/0/name in newer Linux&apos;es (X.org or new kernel matter?)

So the following line 
  QRegExp rx = QRegExp(&quot;\\bPCI:([0-9a-fA-F]:[0-9a-fA-F]:[0-9a-fA-F])\\b&quot;);

in file &quot;kcontrol/info/opengl.cpp&quot; in function &quot;static bool get_dri_device()&quot;

should be updated to allow wider format</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>343585</commentid>
    <comment_count>1</comment_count>
      <attachid>11106</attachid>
    <who name="Ilya Korniyko">k_ilya</who>
    <bug_when>2005-05-19 18:07:17 +0000</bug_when>
    <thetext>Created attachment 11106
patch to fix it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>343877</commentid>
    <comment_count>2</comment_count>
    <who name="Helge Deller">deller</who>
    <bug_when>2005-05-20 20:19:47 +0000</bug_when>
    <thetext>SVN commit 416133 by deller:

fix Bug 105963: kcmopengl 3d card is always unkwnown 
BUG:105963


 M  +7 -2      trunk/KDE/kdebase/kcontrol/info/opengl.cpp  


--- trunk/KDE/kdebase/kcontrol/info/opengl.cpp #416132:416133
@@ -109,10 +109,15 @@
     if (!line.isEmpty()) {
 	dri_info.module = line.mid(0, line.find(0x20));
 
-	QRegExp rx = QRegExp(&quot;\\bPCI:([0-9a-fA-F]:[0-9a-fA-F]:[0-9a-fA-F])\\b&quot;);
+	// possible formats, for regression testing
+	// line = &quot; PCI:01:00:0&quot;;
+	// line = &quot; pci:0000:01:00.0&quot;
+	QRegExp rx = QRegExp(&quot;\\b[Pp][Cc][Ii][:]([0-9a-fA-F]+[:])?([0-9a-fA-F]+[:][0-9a-fA-F]+[:.][0-9a-fA-F]+)\\b&quot;);
 	if (rx.search(line)&gt;0)	 {
-		dri_info.pci = rx.cap(1);
+		dri_info.pci = rx.cap(2);
 		int end = dri_info.pci.findRev(&apos;:&apos;);
+		int end2 = dri_info.pci.findRev(&apos;.&apos;);
+		if (end2&gt;end) end=end2;
 		dri_info.pci[end]=&apos;.&apos;;
 
 		QString cmd = QString(&quot;lspci -m -v -s &quot;) + dri_info.pci;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>343883</commentid>
    <comment_count>3</comment_count>
    <who name="Helge Deller">deller</who>
    <bug_when>2005-05-20 20:29:07 +0000</bug_when>
    <thetext>committed to KDE 3.4 branch as well (svn commit #416134).
Thanks for the bug report &amp; patch!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>11106</attachid>
            <date>2005-05-19 18:07:17 +0000</date>
            <delta_ts>2005-05-19 18:07:17 +0000</delta_ts>
            <desc>patch to fix it</desc>
            <filename>k_ilya_patch</filename>
            <type>text/plain</type>
            <size>990</size>
            <attacher name="Ilya Korniyko">k_ilya</attacher>
            
              <data encoding="base64">LS0tIG9wZW5nbC5jcHAgIDIwMDUtMDUtMTkgMTk6MDA6MzguMTgzNTIwNzIwICswMDAwCisrKyAv
aG9tZS91c2VyL3NyYy9rZGUva2RlYmFzZS0zLjQuMC9rY29udHJvbC9pbmZvL29wZW5nbC5jcHAg
ICAyMDA1LTA1LTE5IDE4OjU5OjU2LjA3ODkyMTU5MiArMDAwMApAQCAtMTA4LDExICsxMDgsMTcg
QEAKICAgICBRU3RyaW5nIGxpbmUgPSBzdHJlYW0ucmVhZExpbmUoKTsKICAgICBpZiAoIWxpbmUu
aXNFbXB0eSgpKSB7CiAgICAgICAgZHJpX2luZm8ubW9kdWxlID0gbGluZS5taWQoMCwgbGluZS5m
aW5kKDB4MjApKTsKKworLy8gICAgcG9zc2libGUgZm9ybWF0cywgZm9yIHJlZ3Jlc3Npb24gdGVz
dGluZworLy8gICAgbGluZSA9ICIgUENJOjAxOjAwOjAiOworLy8gICAgbGluZSA9ICIgcGNpOjAw
MDA6MDE6MDAuMCIKCi0gICAgICAgUVJlZ0V4cCByeCA9IFFSZWdFeHAoIlxcYlBDSTooWzAtOWEt
ZkEtRl06WzAtOWEtZkEtRl06WzAtOWEtZkEtRl0pXFxiIik7CisgICAgICAgUVJlZ0V4cCByeCA9
IFFSZWdFeHAoIlxcYltQcF1bQ2NdW0lpXVs6XShbMC05YS1mQS1GXStbOl0pPyhbMC05YS1mQS1G
XStbOl1bMC05YS1mQS1GXStbOi5dWzAtOWEtZkEtRl0rKVxcYiIpOwogICAgICAgIGlmIChyeC5z
ZWFyY2gobGluZSk+MCkgICB7Ci0gICAgICAgICAgICAgICBkcmlfaW5mby5wY2kgPSByeC5jYXAo
MSk7CisgICAgICAgICAgICAgICBkcmlfaW5mby5wY2kgPSByeC5jYXAoMik7CiAgICAgICAgICAg
ICAgICBpbnQgZW5kID0gZHJpX2luZm8ucGNpLmZpbmRSZXYoJzonKTsKKyAgICAgICAgICAgICAg
IGludCBlbmQyID0gZHJpX2luZm8ucGNpLmZpbmRSZXYoJy4nKTsKKyAgICAgICAgICAgICAgIGlm
IChlbmQyPmVuZCkgZW5kPWVuZDI7CiAgICAgICAgICAgICAgICBkcmlfaW5mby5wY2lbZW5kXT0n
Lic7CgogICAgICAgICAgICAgICAgUVN0cmluZyBjbWQgPSBRU3RyaW5nKCJsc3BjaSAtbSAtdiAt
cyAiKSArIGRyaV9pbmZvLnBjaTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>