-
Notifications
You must be signed in to change notification settings - Fork 6
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
NVIDIA/Intel GPU VRAM is not detected #46
Comments
This is an issue I've been aware of for quite a while, however still don't have an NVIDIA GPU to play about with this. If anyone's willing to make a PR or give some guidance as to where to find this info it would be appreciated |
Intel GPU VRAM is also not fetched |
Also expected, same issue. |
Ok I will take a look when I have time |
Ok I surfed online and found out that NVIDIA proprietary driver does not expose the VRAM in the sysfs files. We can use the nvml-wrapper crate but it will create an overhead. The test results after adding nvm_wrapper: hyperfine ./crabfetch crabfetch -N -w 50
Benchmark 1: ./crabfetch
Time (mean ± σ): 25.1 ms ± 6.6 ms [User: 5.7 ms, System: 13.1 ms]
Range (min … max): 18.7 ms … 45.4 ms 100 runs
Benchmark 2: crabfetch
Time (mean ± σ): 7.2 ms ± 0.9 ms [User: 4.7 ms, System: 2.1 ms]
Range (min … max): 6.0 ms … 9.6 ms 444 runs
Summary
crabfetch ran
3.49 ± 1.02 times faster than ./crabfetch If the user have nouveau driver there would be no problem in fetching the VRAM info |
As for intel GPU it's a integrated graphics card so I cannot check from my part. |
If there's no sysfs stuff then I guess only one way. Only other thing I can think of is querying a Graphics API like Vulkan or OpenGL but I'm not sure which ones would be faster if any. If anyone's willing to make a PR with the NVIDIA wrapper I can merge it, just remember to validate the vendor ID n shit. As for Intel, it'll have to be someone else. |
I can create a PR with nvidia wrapper but it will slow down crabfetch by a large margin as you can see #46 (comment) let me know your thoughts |
Again if there's no other way it'll just have to be. It's a shame I don't have an NVIDIA GPU myself to mess about with for this. |
What module does this affect?
GPU
What hardware/software isn't being detected right?
GPU's VRAM is not detected and displayed as 0KB. I have a hybrid laptop Intel iGPU (Alder Lake-P GT2 (Iris Xe Graphics)) and NVIDIA dGPU (NVIDIA GeForce RTX 3050 Ti Laptop GPU)
Does detection work a little, or is it completely broken?
GPU is detected and other GPU module format placeholders are working. Only the VRAM is not detected. Didn't also work with default config generated by
crabfetch -g
The text was updated successfully, but these errors were encountered: