gpu [linux]: Add clock speed
This commit is contained in:
parent
8e29cd00b3
commit
0e59d6c041
1 changed files with 3 additions and 2 deletions
5
neofetch
5
neofetch
|
@ -1225,7 +1225,6 @@ get_gpu() {
|
|||
[[ "$gpu_type" == "integrated" && ! "$gpu" =~ (i|I)ntel ]] && \
|
||||
{ unset -v gpu; continue; }
|
||||
|
||||
freq="$(< /sys/devices/pci0000\:00/0000\:"${gpu/ *}"/drm/card0/gt_cur_freq_mhz)"
|
||||
|
||||
case "$gpu" in
|
||||
*"advanced"*)
|
||||
|
@ -1246,6 +1245,8 @@ get_gpu() {
|
|||
;;
|
||||
|
||||
*"intel"*)
|
||||
freq="$(< /sys/devices/pci0000:00/0000:"${gpu/ *}"/drm/card0/gt_cur_freq_mhz)"
|
||||
|
||||
type -p glxinfo >/dev/null && \
|
||||
gpu="$(glxinfo | grep "Device:.*Intel")"
|
||||
|
||||
|
@ -1270,7 +1271,7 @@ get_gpu() {
|
|||
|
||||
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
|
||||
|
||||
[[ "$gpu_freq" == "on" && "$freq" ]] && \
|
||||
[[ "${gpu_freq:-on}" == "on" && "$freq" ]] && \
|
||||
prin "GPU Frequency" "${freq}Mhz"
|
||||
|
||||
((++gpu_num))
|
||||
|
|
Loading…
Reference in a new issue