-
Notifications
You must be signed in to change notification settings - Fork 20
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
Windows: Implement gpus
#149
base: main
Are you sure you want to change the base?
Conversation
I don't think matching GPU names is a good idea. There are actually other GPU vendors. I used DXGI to fetch GPU devices if Both impls support GPU memory detection. |
Yeah, the list in that implementation was just one I threw together, it would need a significantly larger one to be able to cover most cases. I replaced it with another implementation for now |
Implementation Speeds:
Speeds on Battery life:
Speeds when heavily throttled (used power plans to downclock CPU to 1.06 GHz to simulate a slow computer)
|
Because impl of EnumDisplayDevices has issues with same GPUs, I think it should be removed EnumDisplayDevices generally won't fail, which makes other impls meaningless. |
I think my most recent commit has fixed that issue by getting the value that represents a GPUs location in the registry, and only adds the first entry
Generally it won't, but it might be a good idea to at least keep the WMI implementation just in case things go wrong, like if the registry entries EnumDisplayDevices uses doesn't exist. Removing the DXGI implementation might be fine though since it seems to use the same registry entries as the first implementation.
Good catch, I'll add it to the output. |
MSDN says that DeviceKey is reserved, so you should better not use it https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-display_devicea |
DXGI version doesnt rely on LastSeen, which only exists in Win11 |
It is reserved, but that doesn't mean it doesn't output some useful value. Generally reserved means that the value was used internally during development or is reserved for future use. And if the returned value ends up being contrary to the expected one, the implementation will just fail and move on to the next one. Theoretically I could just use the registry keys it uses, but it would likely be slower and would achieve the same result. |
It's ok then, except that |
Good catch, I didn't see any speed improvement when setting it to 0 ( |
I keep forgetting to run it
Hello, I'm a contributor to https://github.com/lptstr/winfetch (you've talked to the maintainer in #112), and would like to start applying some of the experience I gained there to this project.
LastSeen
value inHKLM\SOFTWARE\Microsoft\DirectX\
and compares it with thelastseen
values in its subkeysLastSeen
value in the parent key, therefore a backup implementation is neededEnumerates over the subkeys inHKLM\SYSTEM\CurrentControlSet\Enum\PCI\
Enumerates over each subkey and matches theDeviceDesc
value (if it has one) with a list of stringsA possible issue with this one is in the case someone has a more obscure GPU model alongside a more common one, causing it to only find one of the two and not fall back to the other backup implementationEnumDisplayDevicesW
to get every display adapter, formats its name, and adds it to a HashSet to prevent duplicatesWin32_VideoController
Name