diff --git a/inxi b/inxi index 511e46c..3f9a0b5 100755 --- a/inxi +++ b/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