-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: How should we go about detecting integrated and dedicated GPU? #121
Comments
Thanks for the really good question. I haven't thought about that at all yet. I think the best solution would be to collect all GPUs and then compare them with a list of known dedicated GPUs. Alternatively, you could also filter for integrated GPUs. If the GPU is not in the list, the first of the GPUs will be used by default. |
No. Fastfetch also tries to detect the GPU type. Both Vulkan ( GLX report GPU type if open source Mesa driver is used. If All of these graphic APIs will wake up supended GPUs, which make them very slow on laptop with discrete GPU. Besides these graphic APIs, there is another way to detect the type of AMD GPU: https://www.kernel.org/doc/html/v5.10/gpu/amdgpu.html#hwmon-interfaces. If Let me know if you find better ways. |
Oh that is interesting. It waking up the GPU is quite a downside...
So, in summary of what you're saying, a way to do this is to
I think that probably works, as I also couldn't think of a better option myself... |
NVIDIA does have integrated GPUs. The most famous one is GM20B used by Nintendo Switch. Fastfetch tests if its brand name contains
You should use |
Ask your Question:
According to how PR #90 works, it selects the first item in the list from and output that's similar to
lspci | grep VGA
:However, as also highlight in the PR, this will more often than not output the integrated GPU rather than the dedicated GPU depending on which one is the first in the PCI bus number. How should we go about showing them properly?
Additional context:
It seems like the way neofetch apparently do this is to just ignore intel when querying for dedicated GPU (line ~2528 of the link above):
However, Intel Arc exists as a dedicated GPU, so this option doesn't cover all the cases... (seems like even hyfetch also still does this though...)
The way screenfetch does it is via checking for GPU with
nvidia-smi
andglxinfo
first before checkinglspci
(e.g.glxinfo | grep OpenGL
will show the GPU in use for OpenGL) (line ~1697)Personally I think letting the user prioritize which of the GPU vendor to show in the config / or show the list of all the GPUs (I think fastfetch does this) would be a proper solution, but maybe it is too manual? Ultimately I think this is yours to decide.
The text was updated successfully, but these errors were encountered: