KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.87k stars 454 forks source link

GPU and CPU lines excessively long #457

Open James-E-A opened 7 years ago

James-E-A commented 7 years ago

The GPU is supposed to be an HD 7870 GHz Edition ("Pitcairn" is correct here), there's an "8x" thrown into the CPU line as well as the temperature.. not sure what happened here.

screenshot_2017-03-25_19-18-56

Git master, cloned just minutes ago (c72f75b). This is my first time using this on Gentoo, so I have no idea whether it's a regression or just a plain bug. Bash version is 4.3.48.

darealshinji commented 7 years ago

8x means 8 CPU cores. I don't know about the GPU detection, whether that's actually incorrect or if that's just the name that your GPU is identified with using the command line utils.

James-E-A commented 7 years ago

@darealshinji The extraneous "8x" is not present on Release 3.7.0, but is there on Release 3.8.0. (The processor being an i7: quad-core with hyperthreading, I'm not sure why it's listing the number of threads rather than cores.)

I poked around in the code a bit, and I'm not actually sure why the output of glxinfo parsed, as it doesn't really contain anything relevant to GPU detection; just driver info:

server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_…
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_…
GLX version: 1.4
GLX extensions:
    GLX_…
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: AMD PITCAIRN (DRM 2.49.0 / 4.10.3-ck, LLVM 4.0.0) (0x6818)
    Version: 17.0.1
    Accelerated: yes
    Video memory: 2048MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD PITCAIRN (DRM 2.49.0 / 4.10.3-ck, LLVM 4.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_…
OpenGL version string: 3.0 Mesa 17.0.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
    GL_…
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
    GL_…
480 GLX Visuals
…
600 GLXFBConfigs:
…

Though, I notice there is a codepath for lspci in the code; not sure why it's not being triggered. It looks like it would provide the expected/intuitively "correct" result if the bit inside the last pair of brackets were printed:

/$ usr/sbin/lspci | grep VGA
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition]
DmitryHetman commented 7 years ago

They are not long, make your window wider.

Gentoo 2.3 Update screenfetch. wayland-screenshot

James-E-A commented 7 years ago

@DmitryHetman I am using standard/universal 80x24 terminal default size.

DmitryHetman commented 7 years ago

@JamesTheAwesomeDude Maybe it's better just change defaults? I don't think 80 columns in enough, especially if you writing a long path, it's not enouth even if PS1='$'

James-E-A commented 7 years ago

@DmitryHetman Not only was even your terminal screenshot also 80 columns wide, but this is the conventional size at which screenfetch is used: https://google.com/search?q=screenfetch&tbm=isch

Grief commented 7 years ago

I think, it's fixable. Not sure how easy is it to fix in BASH but in general, it's possible to get terminal width and reformat the messages so they would only wrap in the right part of the terminal, not breaking the ASCII-art.