mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, new tarball. Fixed a bug in Xorg where it shows drivers as unloaded when they
are actually loaded. Since we can't fix xorg, inxi will try to work around this bug by validating one step further in the Xorg.0.log data, to confirm that drivers noted as loaded/unloaded/failed are actually running the display(s) of the system. There is a possible case of error that might happen due to this change in the case of a system with a complex xorg that uses two drivers/modules to run two different displays, ie, nvidia on one, and amd on the other, for example, or intel/nvidia, etc. However, if that bug appears, we'll get that data set of debugging output and fix it at that point. This fix repairs an existing xorg bug that is unlikely to get fixed any time soon (the call to load the detected drivers, eg, vesa, intel, is repeated, causing a failure of driver already loaded on the second occurance.
This commit is contained in:
parent
90f4c78dd4
commit
6bf5746de2
20
inxi
20
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### Version: 1.9.12
|
||||
#### Date: July 2 2013
|
||||
#### Version: 1.9.13
|
||||
#### Date: August 12 2013
|
||||
#### Patch Number: 00
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -4701,7 +4701,7 @@ get_graphics_driver()
|
|||
eval $LOGFS
|
||||
|
||||
# list is from sgfxi plus non-free drivers
|
||||
local driver_list='apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|intel|i810|imstt|mach64|mga|neomagic|nsc|nv|nvidia|openchrome|nouveau|radeon|radeonhd|rendition|s3|s3virge|savage|siliconmotion|sis|sisusb|tdfx|tga|trident|tseng|unichrome|vboxvideo|vesa|vga|via|voodoo|vmware|v4l'
|
||||
local driver_list='apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|intel|i810|imstt|mach64|mga|neomagic|nsc|nvidia|nv|openchrome|nouveau|radeon|radeonhd|rendition|s3virge|s3|savage|siliconmotion|sisusb|sis|tdfx|tga|trident|tseng|unichrome|vboxvideo|vesa|vga|via|voodoo|vmware|v4l'
|
||||
local driver='' driver_string='' xorg_log_data='' status='' temp_array=''
|
||||
|
||||
if [[ $B_XORG_LOG == 'true' ]];then
|
||||
|
@ -4709,7 +4709,10 @@ get_graphics_driver()
|
|||
gawk '
|
||||
BEGIN {
|
||||
driver=""
|
||||
bLoaded="false"
|
||||
IGNORECASE=1
|
||||
}
|
||||
# note that in file names, driver is always lower case
|
||||
/[[:space:]]Loading.*('"$driver_list"')_drv.so$/ {
|
||||
driver=gensub(/.*[[:space:]]Loading.*('"$driver_list"')_drv.so/, "\\1", 1, $0 )
|
||||
# we get all the actually loaded drivers first, we will use this to compare the
|
||||
|
@ -4733,6 +4736,17 @@ get_graphics_driver()
|
|||
aDrivers[driver]="failed"
|
||||
}
|
||||
}
|
||||
# verify that the driver actually started the desktop, even with false failed messages which can occur
|
||||
# this is the driver that is actually driving the display
|
||||
/.*\([0-9]+\):\sDepth.*framebuffer/ {
|
||||
driver=gensub(/.*('"$driver_list"')\([0-9]+\):\sDepth.*framebuffer.*/, "\\1", 1, $0 )
|
||||
# we need to make sure that the driver has already been truly loaded, not just discussed, also
|
||||
# set driver to lower case because sometimes it will show as RADEON or NVIDIA in the actual x start
|
||||
driver=tolower(driver)
|
||||
if ( driver != $0 && driver in aDrivers ) {
|
||||
aDrivers[driver]="loaded"
|
||||
}
|
||||
}
|
||||
END {
|
||||
for ( driver in aDrivers ) {
|
||||
print driver "," aDrivers[driver]
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
=====================================================================================
|
||||
Version: 1.9.13
|
||||
Patch Version: 00
|
||||
Script Date: August 12 2013
|
||||
-----------------------------------
|
||||
Changes:
|
||||
-----------------------------------
|
||||
New version, new tarball. Fixed a bug in Xorg where it shows drivers as unloaded when they
|
||||
are actually loaded. Since we can't fix xorg, inxi will try to work around this bug by validating
|
||||
one step further in the Xorg.0.log data, to confirm that drivers noted as loaded/unloaded/failed are
|
||||
actually running the display(s) of the system.
|
||||
|
||||
There is a possible case of error that might happen due to this change in the case of a system with
|
||||
a complex xorg that uses two drivers/modules to run two different displays, ie, nvidia on one, and amd
|
||||
on the other, for example, or intel/nvidia, etc. However, if that bug appears, we'll get that data set
|
||||
of debugging output and fix it at that point.
|
||||
|
||||
This fix repairs an existing xorg bug that is unlikely to get fixed any time soon (the call to load the
|
||||
detected drivers, eg, vesa, intel, is repeated, causing a failure of driver already loaded on the second
|
||||
occurance.
|
||||
|
||||
-----------------------------------
|
||||
-- Harald Hope - Mon, 12 Aug 2013 16:20:51 -0700
|
||||
|
||||
=====================================================================================
|
||||
Version: 1.9.12
|
||||
Patch Version: 00
|
||||
|
|
Loading…
Reference in a new issue