Bug 748481

Summary: Kudzu skips X11 config for video cards w/o a kernel module
Product: Red Hat Enterprise Linux 5 Reporter: Brian Nelson <bhnelson>
Component: kudzuAssignee: Jaromír Cápík <jcapik>
Status: CLOSED ERRATA QA Contact: Jiri Pospisil <jpospisi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7CC: amarecek, dapospis, ebenes, jpospisi, ksrot, ovasik
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: kudzu-1.2.57.1.26-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 03:30:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Fix for video configuration none

Description Brian Nelson 2011-10-24 15:13:16 UTC
Created attachment 529899 [details]
Fix for video configuration

Description of problem:

As shipped, kudzu seems to skip X11 configuration for any video card that does not have an associated kernel module. This case seems to be very common, particularly with Intel onboard video.

Specifically, if an appropriate line in not present in modules.alias, even if the proper X11 module is available and the proper PCI IDs are in /usr/share/hwdata, kudzu refuses to update xorg.conf.

Version-Release number of selected component (if applicable):

1.2.57.1.26-1

How reproducible:

Always.

Steps to Reproduce:

On a machine with a supported video card (in /usr/share/hwdata) that does not have a kernel module:
1. cp /dev/null /etc/sysconf/hwconf
2. /sbin/kudzu

Expected results:

/etc/X11/xorg.conf should be updated with the appropriate X video driver

Actual results:

It is not.


Additional info:

Nvidia cards (like Quadro FX 580) supported in nvidiafb kernel module work fine with kudzu.

Other cards (like Intel Q45 integrated) have no kernel module and work find in X11, do NOT work with kudzu.

Video cards WITHOUT a kernel module seem to be more prevalent than ones with.


I've attached a fix. The problem is this:
kudzu populates dev->driver with a kernel module (if available) and dev->classprivate with the X11 module
kudzu skips configuration of video card where dev->driver is not defined, even if dev->classpath is.

Comment 1 Jaromír Cápík 2012-03-12 16:08:59 UTC
Hello Brian.

You're right. The attached patch looks like it could fix that. Anyway, it needs to be well tested before releasing, since the internal kudzu logic might be sometimes more tricky than it looks like and we need to be sure it doesn't break anything else.

Thanks for the patch.

Regards,
Jaromir.

Comment 2 RHEL Program Management 2012-04-02 10:33:40 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 4 Jaromír Cápík 2012-04-06 16:47:31 UTC
Hello Brian.

The original expression was a bit knotty ...

 		if (isConfigurable(dev) &&
-		    !(dev->bus == BUS_PCI && !dev->driver)) {
+		    ((!(dev->bus == BUS_PCI && !dev->driver)) ||
+		     (dev->type == CLASS_VIDEO && dev->classprivate)))

I'm gonna change it to the following more transparent expression using the basic conversion rule !(A && B) = (!A || !B) :

   dev->bus != BUS_PCI || dev->driver

and then finally add your part of the expression, that fits better now ...

   dev->bus != BUS_PCI || dev->driver || (dev->type == CLASS_VIDEO && dev->classprivate)

Comment 15 Jiri Pospisil 2012-07-26 12:58:39 UTC
Reproduced in kudzu-1.2.57.1.26-3.x86_64 and verified in kudzu-1.2.57.1.26-4.x86_64.

Comment 19 errata-xmlrpc 2013-01-08 03:30:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0053.html