mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added loaded, unloaded, and failed output to graphics driver output, like: nvidia->loaded
This commit is contained in:
parent
b5ac8e13ad
commit
9272811889
15
inxi
15
inxi
|
@ -3218,14 +3218,23 @@ get_graphics_driver()
|
|||
|
||||
# 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 vesa vga via voodoo vmware v4l'
|
||||
local driver='' driver_string='' spacer='' xorg_log_data=''
|
||||
local driver='' driver_string='' spacer='' xorg_log_data='' status=''
|
||||
|
||||
if [[ $B_XORG_LOG == 'true' ]];then
|
||||
xorg_log_data="$( cat $FILE_XORG_LOG )"
|
||||
for driver in $driver_list
|
||||
do
|
||||
if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) && -z $( grep -s "[[:space:]]Unloading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
driver_string="$driver_string$driver$spacer"
|
||||
if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
if [[ -z $( grep -si "[[:space:]]Unloading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
status='loaded'
|
||||
else
|
||||
if [[ -n $( grep -si "\(EE\)[[:space:]]Failed[[:space:]]to[[:space:]]load[[:space:]]module[[:space:]]\"${driver}\"" <<< "$xorg_log_data" ) ]];then
|
||||
status='failed'
|
||||
else
|
||||
status='unloaded'
|
||||
fi
|
||||
fi
|
||||
driver_string="$driver_string$driver->$status$spacer"
|
||||
spacer=' '
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue