mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(no version change, branch)
Fine tuned the glx handling to open it up for all cases, and to also fix the bug, which I found the cause of now. In case people don't like the glx information I'll add a further switch, but I think it's fine to show it for all cards now, especially with radeon and radeonhd work. Also improved direct rendering output to actually show now if -x or -F is used. This will be inxi 1.0.8 once it's tested and confirmed good.
This commit is contained in:
parent
6756f714de
commit
2a9eb185c4
24
inxi
24
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.0.7-b1-t1
|
#### version: 1.0.7-b1-t2
|
||||||
#### Date: 13 March 2009
|
#### Date: 13 March 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -992,8 +992,8 @@ show_options()
|
||||||
print_screen_output " 3 - Also show hard disk names as detected."
|
print_screen_output " 3 - Also show hard disk names as detected."
|
||||||
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
|
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
|
||||||
print_screen_output " 5 - For multicore systems, also show per core clock speeds; shows audio card."
|
print_screen_output " 5 - For multicore systems, also show per core clock speeds; shows audio card."
|
||||||
print_screen_output "-x Show extra data: bogomips on cpu; driver version (if available) for network/audio."
|
print_screen_output "-x Show extra data: bogomips on cpu; driver version (if available) for network/audio;"
|
||||||
print_screen_output " Only works with verbose or line output."
|
print_screen_output " direct rendering status for Graphics. Only works with verbose or line output."
|
||||||
print_screen_output ""
|
print_screen_output ""
|
||||||
print_screen_output "Additional Options:"
|
print_screen_output "Additional Options:"
|
||||||
print_screen_output "-h - this help menu."
|
print_screen_output "-h - this help menu."
|
||||||
|
@ -1896,6 +1896,9 @@ get_graphics_glx_data()
|
||||||
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
|
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
|
||||||
|
|
||||||
# note: function declarations go before BEGIN? It appears so, confirm.
|
# note: function declarations go before BEGIN? It appears so, confirm.
|
||||||
|
# the real question here though is why this function is even here, seems
|
||||||
|
# just to be a complicated way to pack/print a variable, but maybe the
|
||||||
|
# original idea was to handle > 1 cases of detections I guess
|
||||||
function join( arr, sep ) {
|
function join( arr, sep ) {
|
||||||
s=""
|
s=""
|
||||||
i=flag=0
|
i=flag=0
|
||||||
|
@ -1917,12 +1920,15 @@ get_graphics_glx_data()
|
||||||
# if ( $2 ~ / r[3-9][0-9][0-9] / ) {
|
# if ( $2 ~ / r[3-9][0-9][0-9] / ) {
|
||||||
gsub(/'"$BAN_LIST_NORMAL"'/, "", $2)
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", $2)
|
||||||
a[$2]
|
a[$2]
|
||||||
|
# this counter failed in one case, a bug, and is not needed now
|
||||||
# f++
|
# f++
|
||||||
# }
|
# }
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
$2 && a[$2]
|
$2 && a[$2]
|
||||||
}
|
}
|
||||||
|
# dropping all conditions from this test to just show full mesa information
|
||||||
|
# there is a user case where not f and mesa apply, atom mobo
|
||||||
# /opengl version/ && ( f || $2 !~ /mesa/ ) {
|
# /opengl version/ && ( f || $2 !~ /mesa/ ) {
|
||||||
/opengl version/ {
|
/opengl version/ {
|
||||||
$2 && b[$2]
|
$2 && b[$2]
|
||||||
|
@ -1931,12 +1937,10 @@ get_graphics_glx_data()
|
||||||
$2 && c[$2]
|
$2 && c[$2]
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
printf( "%s\n%s\n%s\n", join( a,", " ), join( b,", " ), join( c,", " ) )
|
printf( "%s\n%s\n%s\n", join( a, ", " ), join( b, ", " ), join( c, ", " ) )
|
||||||
}' ) )
|
}' ) )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
|
|
||||||
echo "working:${A_GLX_DATA[@]}"
|
|
||||||
|
|
||||||
# GLXR=$(glxinfo | gawk -F ': ' 'BEGIN {IGNORECASE=1} /opengl renderer/ && $2 !~ /mesa/ {seen[$2]++} END {for (i in seen) {printf("%s ",i)}}')
|
# GLXR=$(glxinfo | gawk -F ': ' 'BEGIN {IGNORECASE=1} /opengl renderer/ && $2 !~ /mesa/ {seen[$2]++} END {for (i in seen) {printf("%s ",i)}}')
|
||||||
# GLXV=$(glxinfo | gawk -F ': ' 'BEGIN {IGNORECASE=1} /opengl version/ && $2 !~ /mesa/ {seen[$2]++} END {for (i in seen) {printf("%s ",i)}}')
|
# GLXV=$(glxinfo | gawk -F ': ' 'BEGIN {IGNORECASE=1} /opengl version/ && $2 !~ /mesa/ {seen[$2]++} END {for (i in seen) {printf("%s ",i)}}')
|
||||||
fi
|
fi
|
||||||
|
@ -3067,8 +3071,8 @@ print_gfx_data()
|
||||||
get_graphics_glx_data
|
get_graphics_glx_data
|
||||||
local glx_renderer="${A_GLX_DATA[0]}"
|
local glx_renderer="${A_GLX_DATA[0]}"
|
||||||
local glx_version="${A_GLX_DATA[1]}"
|
local glx_version="${A_GLX_DATA[1]}"
|
||||||
local glx_direct_render="${A_GLX_DATA[2]}"
|
# this can contain a long No case debugging message, so it's being sliced off
|
||||||
echo ${A_GLX_DATA[@]}
|
local glx_direct_render=$( grep -oiE '^(Yes|No)' <<< "${A_GLX_DATA[2]}" )
|
||||||
|
|
||||||
if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
|
if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
|
||||||
i=1
|
i=1
|
||||||
|
@ -3096,8 +3100,8 @@ print_gfx_data()
|
||||||
# if [[ $B_X_RUNNING == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
|
# if [[ $B_X_RUNNING == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
|
||||||
if [[ $B_X_RUNNING == 'true' ]];then
|
if [[ $B_X_RUNNING == 'true' ]];then
|
||||||
gfx_data=$( create_print_line " " "${C1}GLX Renderer${C2} ${glx_renderer} ${C1}GLX Version${C2} ${glx_version}${CN}" )
|
gfx_data=$( create_print_line " " "${C1}GLX Renderer${C2} ${glx_renderer} ${C1}GLX Version${C2} ${glx_version}${CN}" )
|
||||||
if [[ $B_HANDLE_CORRUPT_DATA == 'true' ]];then
|
if [[ $B_HANDLE_CORRUPT_DATA == 'true' || $B_EXTRA_DATA == 'true' ]];then
|
||||||
gfx_data="${gfx_data} ${C1}Direct rendering${C2} ${glx_direct_render}${CN}"
|
gfx_data="$gfx_data ${C1}Direct Rendering${C2} ${glx_direct_render}${CN}"
|
||||||
fi
|
fi
|
||||||
print_screen_output "$gfx_data"
|
print_screen_output "$gfx_data"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue