diff --git a/inxi b/inxi index 73451e7..21c775d 100755 --- a/inxi +++ b/inxi @@ -3224,15 +3224,13 @@ get_graphics_driver() xorg_log_data="$( cat $FILE_XORG_LOG )" for driver in $driver_list do + # note there appears to be different unload/failed syntax, so using simple conservative one + # I was not able to find a case where xorg.log shows unload and not fail if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then - if [[ -z $( grep -si "[[:space:]]Unload.*${driver}" <<< "$xorg_log_data" ) ]];then + if [[ -z $( grep -si "Failed.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then status='loaded' else - if [[ -n $( grep -si "Failed[[:space:]]to[[:space:]]load[[:space:]].*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then - status='failed' - else - status='unloaded' - fi + status='failed' fi driver_string="$driver_string$driver->$status$spacer" spacer=' '