Open ChALkeR opened 3 years ago
I propose an additional solution (Maybe for AMD only?):
Currently, both lspci and neofetch show my GPU as Radeon RX 5600 OEM/5600 XT / 5700/5700 XT
, however glxinfo shows OpenGL renderer string: AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.11.8-gentoo-r1, LLVM 11.1.0)
With a grep the output can be cleaned up into:
glxinfo -B | grep -Po '(?<=^OpenGL renderer string: ).*(?= \(.*\)$)'
AMD Radeon RX 5700 XT
udevadm
nor any of the techniques above using cat
worked for me. I have managed to get it to work using glxinfo -B | grep -Po '(?<=^OpenGL renderer string: ).*
by modifying @xbjfk's version above to work with Nvidia GPUs.
Here is the commit from my local version https://github.com/githubmo/neofetch/commit/23b9eaf40c70667ad62e3593c75a39b04e165280 so you can clone and install my version if you wish to use that for Nvidia GPUs.
Since I don't have any AMD or older GPUs to test with, I will not be raising a PR for this.
P.S. the following is the output I get:
❯ glxinfo -B | grep -Po '(?<=^OpenGL renderer string: ).*'
GeForce RTX 3090/PCIe/SSE2
Any update on official support of this enhancement?
I'd like to see this implemented as well. My RX 5700 XT gets reported strictly as "AMD ATI Radeon RX 5600 OEM/5600" in Ubuntu 22.0.4.3 even though glxinfo and Ubuntu settings will show it as the 5700 XT it is.
Description
This is mainly about faster pci.ids updates (see below).
E.g.:
This is what
neofetch
reports (note how Nvidia card is obscurely named).Currently, neofetch reports them as:
But let's demonstrate how the (widely available)
udevadm
can be used to fetch more info (or actually, less outdated info, see below):Paths are taken using the PCI slot names already known from
lspci
.That is able to decode the NVidia GPU name (and likely others where just
lspci
is not sufficient).Without udevadm
Alternatively:
Provides the same info and is essentially what
udevadm
does. Not sure how exactly portable is that, though.pci.ids
That combination is already present in upstream
pci.ids
, added on2020-09-21
, over three months ago. But hwids (which provides/usr/share/hwdata/pci.ids
used bylspci
) is updated less frequently than udev (actually, systemd), apparently.For comparison:
pci.ids
commits: https://github.com/pciutils/pciids/commits/master/pci.idshwids
commits (used bylspci
): https://github.com/gentoo/hwids/commits/master/pci.idssystemd
(udev) commits: https://github.com/systemd/systemd/commits/master/hwdb.d/pci.idsNeofetch version
7.1.0
pciutils: 3.7.0 hwids: 20200813.1-1