mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.33.1
This commit is contained in:
parent
a466d4b076
commit
b5b969efe8
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.33.0
|
||||
date="13/11/2017"
|
||||
version=2.33.1
|
||||
date="14/11/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
script="getInfo"
|
||||
|
@ -924,8 +924,9 @@ fi_dmesg(){ # 10/11/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_graph(){ # 10/11/2017
|
||||
local slots ig cmd cards glx_dev glx_dev_temp openGl providers resolutions pluriel modules text
|
||||
fi_graph(){ # 13/11/2017
|
||||
local slots ig cmd cards stock_glxinfo glx_dev glx_dev_temp openGl providers resolutions
|
||||
local pluriel modules text
|
||||
local alert_hybrid alert_3D
|
||||
# cardsManuel="$(lspci -nnk | grep -EiA 3 'vga|display|3d')" # -nn: textual and numeric ID's, k kernel
|
||||
# cardsManuel="$(lspci -nnv | grep -iEA11 'vga|display|3d)" # v=verbose
|
||||
|
@ -961,32 +962,36 @@ fi_graph(){ # 10/11/2017
|
|||
alert_hybrid+="Voir DRI_PRIME, vga-switcheroo, Bumbledee...?"
|
||||
fi
|
||||
# openGl / glxinfo
|
||||
if [ $(f__cmd_exist glxinfo) ]; then
|
||||
# devices
|
||||
glx_dev="$(glxinfo | grep 'Device: ' | xargs)"
|
||||
if grep -iq 'no' <<< $( glxinfo | grep -i 'direct rendering' ) ; then
|
||||
if [ $( f__cmd_exist glxinfo ) ]; then
|
||||
stock_glxinfo=$( glxinfo )
|
||||
# test 3D actif
|
||||
glx_dev=$( grep -i 'direct rendering:' <<< "$stock_glxinfo" )$'\n'
|
||||
if grep -iq 'direct rendering: No' <<< "$stock_glxinfo" ; then
|
||||
alert_3D="l'accélération 3D n'est pas activée"
|
||||
fi
|
||||
# devices
|
||||
glx_dev+=$( grep 'Device: ' <<< "$stock_glxinfo" | xargs )
|
||||
# openGL
|
||||
fi_graph_openGl(){
|
||||
fi_graph_openGl(){ # $1="|opt|dri", assigne $openGl pour une ou plusieurs gpu (dri & optirun)
|
||||
local iogl
|
||||
[[ "$1" == "dri" || "$1" == "opt" ]] && openGl+="◽"
|
||||
for iogl in 'vendor' 'renderer' 'version' 'shading language version' 'extensions'; do
|
||||
iogl="OpenGL $iogl"
|
||||
[ "$1" == "dri" ] && openGl+=$(DRI_PRIME=1 glxinfo | grep "$iogl")$'\n'
|
||||
[ "$1" == "opt" ] && openGl+=$(optirun glxinfo | grep "$iogl")$'\n' || \
|
||||
openGl+=$(glxinfo | grep "$iogl")$'\n' # commande par défaut
|
||||
openGl+=$( grep "$iogl" <<< "$stock_glxinfo" )$'\n' # commande par défaut
|
||||
done
|
||||
}
|
||||
fi_graph_openGl # openGl pour une carte ou gpu de base
|
||||
if [ "$fg_nb_gpu" -gt 1 ]; then # plusieurs cartes, essai optirun et prime
|
||||
if [ $(f__cmd_exist optirun) ]; then
|
||||
glx_dev_temp="$(optirun glxinfo | grep 'Device: ' | xargs)"
|
||||
glx_dev_temp=$( optirun glxinfo | grep 'Device: ' | xargs )
|
||||
fi_graph_openGl "opt" # ajout à $openGl existant, à voir si infos sorties redondantes
|
||||
else # DRI
|
||||
glx_dev_temp="$(DRI_PRIME=1 glxinfo | grep 'Device: ' | xargs)"
|
||||
glx_dev_temp=$( DRI_PRIME=1 glxinfo | grep 'Device: ' | xargs )
|
||||
fi_graph_openGl "dri" # ajout à $openGl existant, à voir si infos sorties redondantes
|
||||
fi
|
||||
[ "$glx_dev_temp" != "$glx_dev" ] && glx_dev+="\n $glx_dev_temp"
|
||||
[ "$glx_dev_temp" != "$glx_dev" ] && glx_dev+="\n $glx_dev_temp" # ajout si diff, pas suffisant avec optirun?
|
||||
fi
|
||||
openGl=${openGl/ string:/:} # suppression chaîne ' string'
|
||||
openGl=${openGl::-1} # suppression dernier $'\n'
|
||||
|
@ -1010,7 +1015,7 @@ fi_graph(){ # 10/11/2017
|
|||
f_display "cards" "cmd" "$cmd"
|
||||
f_dspl_alert "alert_hybrid" "alert"
|
||||
# openGl
|
||||
f_display "glx_dev" "var" "" "devices OpenGl"
|
||||
f_display "glx_dev" "cmd" "glxinfo" "devices OpenGl"
|
||||
f_dspl_alert "alert_3D" "info"
|
||||
f_display "openGl" "cmd" "glxinfo" "OpenGl"
|
||||
# liste providers, preferred & current
|
||||
|
@ -3140,7 +3145,7 @@ for j in $options; do
|
|||
case $j in
|
||||
-t | --test )
|
||||
prg_1 "$*"
|
||||
fi_pkg__ctl
|
||||
fi_graph
|
||||
exit ;; # test
|
||||
-c* | all )
|
||||
[ "$j" == "-c" ] && exec $0 "menu"
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
* ! f__requis, fscript_install, f__scandir
|
||||
|
||||
|
||||
## 2.33 13/11/2017
|
||||
## 2.33.1 14/11/2017
|
||||
|
||||
* révision: fi_graph
|
||||
|
||||
## 2.33.0 13/11/2017
|
||||
|
||||
* nouveau: fi_pkg_apt, nouvelle alerte sources: extension non .list
|
||||
* fix, révision: structure gestionnaires de paquets
|
||||
|
|
Loading…
Reference in New Issue