* NVIDIA GPU: reserve load index 3 for GPU Memory, remap other loads
* NVIDIA GPU: simplify load sensor indexing
* NVIDIA GPU: create GPU Memory load after utilization loads
Place the GPU Memory Load sensor before power topology and D3D node loads
so it appears with other GPU metrics in the UI. Load indices advance in
the same order as before for uniqueness.
* NVIDIA GPU: use local nextLoadIndex in constructor
Replace the instance field with a ctor-local counter for Load sensor indices.
* feat: Add Native AOT compilation support for LibreHardwareMonitorLib
- Replace non-generic Marshal.GetDelegateForFunctionPointer with generic versions
(NvApi.cs, NvidiaML.cs, OpCode.cs)
- Replace non-generic Marshal.PtrToStructure/SizeOf with generic versions
(AtiAdlxx.cs, AmdGpu.cs, Ipmi.cs)
- Replace reflection-based Mono.Posix calls with direct Syscall for non-NETFRAMEWORK
(OpCode.cs)
- Add DynamicallyAccessedMembers annotations for trim-safe generic marshaling
(MsiCoreLiquidController.cs, WireViewPro2.cs)
- Add IsAotCompatible, IsTrimmable, and AOT/trim analyzers to csproj for net8.0+
- All changes maintain full backward compatibility with net472/netstandard2.0
Tested: dotnet publish with PublishAot=true on net10.0 win-x64 succeeds.
AOT binary correctly enumerates all hardware and sensors without errors.
* feat: Add conditional compilation for .NET 5.0 or greater in various classes
* feat: Add AOT test project and update workflows for AOT compilation
* Drop test project
* NET5_0_OR_GREATER > NET
---------
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
* fix: skip integrated GPU in IGCL enumeration to prevent duplicate hardware entries
IGCL's ctlEnumerateDevices returns all Intel graphics devices including
the integrated GPU, but IntelDiscreteGpu was created for every device
without filtering. This caused the iGPU to appear twice: once from the
IGCL path (as IntelDiscreteGpu) and once from the D3D path (as
IntelIntegratedGpu), with overlapping sensors.
Check the CTL_ADAPTER_PROPERTIES_FLAG_INTEGRATED flag on each device's
graphics_adapter_properties and skip integrated adapters, since they are
already handled by IntelIntegratedGpu via D3D enumeration.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add IGCL-based telemetry sensors for Intel integrated GPUs
Use Intel Graphics Control Library (IGCL) to expose temperature, clock
frequency, and voltage sensors for the integrated GPU via the safe
user-mode ctlPowerTelemetryGet API. Each sensor is only activated if
the driver reports it as supported, so this degrades gracefully on
hardware/drivers that don't expose specific telemetry items.
This mirrors the approach already used by IntelDiscreteGpu, bringing
parity between discrete and integrated Intel GPU monitoring.
Depends on: fix/intel-igpu-deduplication
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
IGCL's ctlEnumerateDevices returns all Intel graphics devices including
the integrated GPU, but IntelDiscreteGpu was created for every device
without filtering. This caused the iGPU to appear twice: once from the
IGCL path (as IntelDiscreteGpu) and once from the D3D path (as
IntelIntegratedGpu), with overlapping sensors.
Check the CTL_ADAPTER_PROPERTIES_FLAG_INTEGRATED flag on each device's
graphics_adapter_properties and skip integrated adapters, since they are
already handled by IntelIntegratedGpu via D3D enumeration.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Implement Fan control for TG WVP2.
Calculate approximate fan speed.
Catch two exceptions.
Remove leftover close in ReadConfig.
* Support for multi device detection
* Add more data to report
* Add group for power monitors and remove from GenericGpu.
* Move files.
Add option for Power Monitor in Computer + UI.
* Add support for Thermal Grizzly WireView Pro 2.
* Process PR comments.
* PR comments.
* Add private keyword.
* PR comments.
* Replace WMI with SetupAPI.
Some first updates according to Thermal Grizzly code.
* Add report.
* Further improve implementation according to code of Thermal Grizzly (thanks !).
* No connection check for welcome message.
* Rename class + change SerialPort to SharedSerialPort for guard - fixing mutex issues.
* PR comments.
* Remove SP_DEVINFO_DATA from NativeMethods.txt
* Update WireViewPro2.cs
* Rename hasMutex to _hasMutex for consistency
* Formatting
* Fix build
---------
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
* Add Intel Arc VRAM sensors support
- Implement BDF-based device matching for Intel discrete GPUs
- Add VRAM sensors (total, used, free, load percentage)
- Use D3D device enumeration with fallback logic
- Enable Windows-specific VRAM monitoring for Intel Arc GPUs
- Fix device identification to distinguish between multiple identical GPUs
Resolves issue where both Intel Arc GPUs showed identical VRAM values.
Now each GPU displays unique, accurate memory usage statistics.
* Add defensive validation to GetBdfFromDeviceIdentifier
- Add null/empty check for deviceIdentifier parameter
- Return false explicitly when LastIndexOf('#') returns -1
- Add DEVPROPTYPE.DEVPROP_TYPE_UINT32 validation after property queries
- Use sizeof(uint) instead of hardcoded 4 for buffer sizes
- Apply PCI spec bit masks (5-bit device, 3-bit function)
- Add bus range validation (0-255)
* Revert to Windows DEVPKEY_Device_Address spec masks
Use 0xFFFF masks as per Windows documentation instead of PCI spec
bit widths. The Windows API uses full 16-bit fields for device and
function numbers.
* Update IntelDiscreteGpu.cs
* Update NativeMethods.txt
---------
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
- Add GPU Memory Total, Used, Free sensors (SmallData type, in MB)
- Add GPU Memory load sensor (percentage)
- Add GPU Memory Read/Write bandwidth sensors (Throughput type, in B/s)
- Use D3DDisplayDevice API to query VRAM usage via Windows kernel
- Match Intel discrete GPUs using PCI vendor/device IDs
- Include fallback detection for Intel GPUs if initial matching fails
- Bandwidth sensors read from Intel GCL telemetry with unit conversion
ADL finds multiple logical gpus, this commit avoids multiple
unneeded initializations of AmdGpu class. The main control is moved to
AmdGpuGroup and the ADL_* calls are updated to ADL2_*, using the
context. Adapters using PMlog should be initialized only if sensors are
detected, adapters that pmlog is not enabled or doesn't work, should
fallback previous logic.
* Refactor ADL sensors update
- Check support for each sensor, on OD8 and new PMLog.
- Exclude cards before Vega10 from using PMLog
- Better validation for individual sensor support (for now asic-power/board-power)
- Validate pmlog struct using the lastUpdate, there are situations the
sensors values are corrupted, maybe because something blocking the pointer access to
the struct, but this needs to be verified.
* Update AmdGpu.cs
---------
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
* Add ADL pmlog support, fix metrics on newer gpus
Newer GPUs needs this to show performance metrics properly. Sample rate
is hard coded (1000ms).
* Clean up
---------
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
* Fixes saving the sensor values on program exit.
* Fixes the displayed fan control values for NVIDIA GPUs.
* Update NvidiaGpu.cs
Check cooler id.
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>