[PATCH] Xorg modalias dump

Nathaniel McCallum nathaniel at natemccallum.com
Sat Sep 6 23:13:29 PDT 2008


I've always wondered how I could dump a table of all the hardware 
supported by Xorg.  This can be useful for regression testing, 
auto-detection, and other things.  Well, I've written a rudimentary 
patch that implements such a feature.  Its not ready for inclusion, but 
I thought I'd at least get some feedback.

Basically, this patch adds a '-modalias' option to Xorg.  When Xorg is 
run with this option, it dumps a modalias file (similar to what the 
Linux kernel uses, except the drivers are Xorg drivers, not kernel 
drivers).  It does this by loading every driver installed and inspecting 
the new libpciaccess information.

There are still some problems though (and I'd appreciate any advise on 
how to solve them):
1. It crashes when the ati "umbrella" driver is installed, I'm not sure 
why...
2. It seems to want to initialize the display (or something).  Could 
someone help me move this option to earlier in the Xorg start-up process 
so we don't have to mess with peoples' displays?
3. It of course only reports the information that drivers report.  If 
the drivers don't support the new libpciaccess model or report 
inaccurate data (*cough*NVIDIA*cough*) we will of course report no data 
or inaccurate data, respectively.

Anyway, patch is attached.  I'd love to hear some feedback. Thanks!

Nathaniel McCallum
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorg-modalias.patch
URL: <http://lists.x.org/archives/xorg/attachments/20080907/e6cb1e89/attachment.ksh>


More information about the xorg mailing list