neofetch icon indicating copy to clipboard operation
neofetch copied to clipboard

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

Open NathanielJS1541 opened this issue 4 years ago • 6 comments

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

NathanielJS1541 avatar Feb 05 '22 13:02 NathanielJS1541

image

I'm having the same issue!

jakebreiman avatar Feb 21 '22 03:02 jakebreiman

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"

Danfun64 avatar May 25 '22 03:05 Danfun64

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 avatar Aug 15 '22 19:08 josh-tf

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

image

josh-tf avatar Aug 15 '22 20:08 josh-tf

image

Same issue, fix works (scoop)

Winfetch doesn't have this issue btw

Cornelius-Figgle avatar Jul 16 '23 12:07 Cornelius-Figgle

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

queenbiscuit311 avatar Oct 02 '23 02:10 queenbiscuit311