-
Notifications
You must be signed in to change notification settings - Fork 312
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
Add Support for the Intel Xe driver & HWMON power values #303
Conversation
src/extract_gpuinfo_intel.c
Outdated
const char *syspath; | ||
nvtop_device_get_syspath(gpu_info->card_device, &syspath); | ||
nvtop_device_new_from_syspath(&card_dev_copy, syspath); | ||
nvtop_device *intel_dev_auto = gpu_info->driver == DRIVER_XE ? gpu_info->driver_device : gpu_info->card_device; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a patch to re-introduce the copy. The problem is that libsystemd and libudev may/will cache these values so we need to get create a new device and query the sysattr to get up-to-date values (see libsystemd implementation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess calling sd_device_set_sysattr_value
with NULL should also do the trick to clear the cache
Thanks for your patch! I've reintroduced the temporary devices to avoid cached queries from the libsystemd/libudev. Could you please test with my changes? |
Hi @cyear,
Temperature isn't exposed by the driver so it wouldn't be easy to show it, and power consumption doesn't seem to be supported on consumer cards; it does however measure total energy consumption in joules, which could possibly be converted into watts. |
Hi @Syllo,
No worries!
Cool thanks, I was confused why they were there.
Nah, there's a bug with the driver/card where it only reports PCIe x1, even though it does operate at the full bandwidth available.
Apart from the PCIe speed, it works fine! While I'm booted with Xe again, I'll try and figure out the fdinfo hopefully in the next few hours. |
It seems only memory usage is supported by the Xe driver. ``` drm-driver: xe drm-client-id: 67 drm-pdev: 0000:03:00.0 drm-total-system: 0 drm-shared-system: 0 drm-active-system: 0 drm-resident-system: 0 drm-purgeable-system: 0 drm-total-gtt: 20608 KiB drm-shared-gtt: 0 drm-active-gtt: 0 drm-resident-gtt: 20608 KiB drm-total-vram0: 407556 KiB drm-shared-vram0: 56 MiB drm-active-vram0: 0 drm-resident-vram0: 407556 KiB drm-total-stolen: 0 drm-shared-stolen: 0 drm-active-stolen: 0 drm-resident-stolen: 0 ```
Hi, this PR adds basic support for Intel's new Xe driver, it doesn't support GPU utilisation (the fdinfo is different) but all other features that were working for i915 now work for Xe (on an A770).
The added power fields from the HWMON patch were also implemented, but only
power1_max
is present on both i915 and Xe. Temperature, fans, etc. were never implemented by Intel in the HWMON patch.Also, the memory clock speed attributes (
mem_cur_freq_mhz
&mem_max_freq_mhz
) don't seem to exist (in either drivers), should they be removed?Thanks,
Steve