card_info=$(/usr/sbin/hwinfo --gfxcard | \ awk '/0300 VGA compatible controller/ { dev = gensub(/^([^:]*):.*/, "\\1", "g"); } \ /^ Vendor:/ { vendor[dev] = gensub(/.*pci 0x(....).*/, "\\1", "g"); \ name[dev] = gensub(/^.* "(.*)"$/, "\\1", "g"); } \ /^ Device:/ { device[dev] = gensub(/.*pci 0x(....).*/, "\\1", "g"); \ name[dev] = name[dev] " " gensub(/^.* "(.*)"$/, "\\1", "g"); } \ /^ SubVendor:/ { subvendor[dev] = gensub(/.*pci 0x(....).*/, "\\1", "g"); } \ /^ SubDevice:/ { subdevice[dev] = gensub(/.*pci 0x(....).*/, "\\1", "g"); } \ /^ Revision:/ { revision[dev] = gensub(/.*0x(..).*/, "\\1", "g"); } \ /^Primary display adapter: #/ { dev = gensub(/.*#/, "", "g"); \ print vendor[dev] ":" device[dev] ":" revision[dev] ":" subvendor[dev] ":" \ subdevice[dev] " " name[dev] "\n"; }'); ===== BEGIN: INPUT ===== 10: PCI 02.0: 0300 VGA compatible controller (VGA) [Created at pci.301] UDI: /org/freedesktop/Hal/devices/pci_8086_27a2 Unique ID: _Znp.4jPdI+D0FDB SysFS ID: /devices/pci0000:00/0000:00:02.0 SysFS BusID: 0000:00:02.0 Hardware Class: graphics card Model: "Lenovo Thinkpad R60e model 0657" Vendor: pci 0x8086 "Intel Corporation" Device: pci 0x27a2 "945 GM" SubVendor: pci 0x17aa "Lenovo" SubDevice: pci 0x201a "Thinkpad R60e model 0657" Revision: 0x03 Memory Range: 0xee100000-0xee17ffff (rw,non-prefetchable) I/O Ports: 0x1800-0x1807 (rw) Memory Range: 0xd0000000-0xdfffffff (rw,prefetchable) Memory Range: 0xee200000-0xee23ffff (rw,non-prefetchable) IRQ: 20 (55679 events) I/O Ports: 0x3c0-0x3df (rw) Module Alias: "pci:v00008086d000027A2sv000017AAsd0000201Abc03sc00i00" Driver Info #0: XFree86 v4 Server Module: intel Driver Info #1: XFree86 v4 Server Module: intel 3D Support: yes Extensions: dri Config Status: cfg=no, avail=yes, need=no, active=unknown 11: PCI 02.1: 0380 Display controller [Created at pci.301] UDI: /org/freedesktop/Hal/devices/pci_8086_27a6 Unique ID: ruGf.8PcVeYtn5_1 SysFS ID: /devices/pci0000:00/0000:00:02.1 SysFS BusID: 0000:00:02.1 Hardware Class: graphics card Model: "Lenovo Thinkpad R60e model 0657" Vendor: pci 0x8086 "Intel Corporation" Device: pci 0x27a6 "Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller" SubVendor: pci 0x17aa "Lenovo" SubDevice: pci 0x201a "Thinkpad R60e model 0657" Revision: 0x03 Memory Range: 0xee180000-0xee1fffff (rw,non-prefetchable) Module Alias: "pci:v00008086d000027A6sv000017AAsd0000201Abc03sc80i00" Config Status: cfg=no, avail=yes, need=no, active=unknown Primary display adapter: #10 ===== END: INPUT ===== ===== BEGIN: CURRENT OUTPUT ===== 8086:27a6:03:17aa:201a Intel Corporation Device: pci 0x27a6 "Mobile 945GM/GMS/GME, 943/940GML Express Integrated ===== END: CURRENT OUTPUT =====