dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
22.01k stars 1.77k forks source link

Extra GPU lines reported in Windows scoop install, not present in MSYS2 master install #2044

Open NathanielJS1541 opened 2 years ago

NathanielJS1541 commented 2 years ago

Description

Same as issue #1759, but happens when running from Windows Terminal, powershell, and cmd too. There is an extra line which just says GPU: Caption before GPUs are listed, and an extra line that says GPU after the GPUs are listed. However, this does not happen when running the latest master branch in MSYS2.

Does this issue still occur in the master branch?

Does not appear to be present in the master branch, although could still be an issue as they both report the same version (7.1.0). It could be an issue with the version installed with scoop in this case.

Neofetch version

Neofetch 7.1.0 (Installed with scoop).

Screenshots

Screenshots demonstrating the issue: image image

Same computer, same configuration file, but from MSYS2 installed from latest master: image

Config file

https://pastebin.com/Q7HMRLXf

Verbose log

https://pastebin.com/7tjNAyki

jakebreiman commented 2 years ago

image

I'm having the same issue!

Danfun64 commented 2 years ago

I'm getting the "GPU: Caption" message with MSYS2 image

edit: Wait, when you said "master branch", you mean self compiled? I just did a "pacman -S neofetch"

josh-tf commented 2 years ago

This was kinda bugging me so I hacked together a solution

Open the neofetch file in a text editor, for scoop users its in "C:\Users\(username)\scoop\apps\neofetch\7.1.0\neofetch"

Then go to line 2502 and replace:

            while read -r line; do
                prin "${subtitle:+${subtitle}${gpu_name}}" "$(trim "$line")"
            done < <(wmic path Win32_VideoController get caption)

with:

            while read -r line; do
                trimmed="$(trim "$line")"
                if [[ ! $trimmed == *"Caption"* && ! $trimmed = "" ]]; then
                    prin "${subtitle:+${subtitle}${gpu_name}}" "$(trim "$line")"
                fi
            done < <(wmic path Win32_VideoController get caption)

This will simply exclude the "Caption" and blank line, I also had a Citrix adaptor showing in GPUs so I've added it to the exclusions:

if [[ ! $trimmed == *"Caption"* && ! $trimmed = *"Citrix"* && ! $trimmed = "" ]]; then

happy hacking 👍

image

josh-tf commented 2 years ago

PS this "fix" is working fine on MSYS2 too, but you will need to edit the file in /usr/bin/neofetch

image

Cornelius-Figgle commented 1 year ago

image

Same issue, fix works (scoop)

Winfetch doesn't have this issue btw

queenbiscuit311 commented 1 year ago

image

This fix still seems to be necessary, tried on windows 10 through msys2 and it immediately fixed the output

EDIT: fix also necessary and working on the scoop version of neofetch

image