Commit Graph
81 Commits
Author SHA1 Message Date
jasonlyoin 035a878e20 NVIDIA GPU: reserve load index 3 for GPU Memory, remap other loads (#2310)
* 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.
2026-04-16 14:17:04 +02:00
MadLongTomandPhyxionNL aa7c8be02f feat: Add Native AOT compilation support for LibreHardwareMonitorLib (#2280)
* 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>
2026-04-07 13:38:41 +02:00
BlacktempelandPhyxionNL 1a5a11b12e Handle driver restart for NVIDIA GPUs (#2255)
* Handle driver restart for NVIDIA GPUs.

* PR review

* Update NvidiaGroup.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-03-15 11:03:28 +01:00
Blacktempel 315a767fa0 Fix same memory for different GPUs. (#2232)
* Fix same memory for different GPUs.

* Status check
2026-02-19 16:21:49 +01:00
kyranmcdonnellandCursor 9158b5ac75 Add IGCL telemetry sensors (temperature, clock, voltage) for Intel integrated GPUs (#2218)
* 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>
2026-02-14 12:10:25 +01:00
kyranmcdonnellandCursor 1564a69c52 fix: skip integrated GPU in IGCL enumeration to prevent duplicate hardware entries (#2217)
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>
2026-02-13 18:16:37 +01:00
Blacktempel e2e0d1c9ad Updates for TG WVP2 (#2215)
* 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.
2026-02-13 18:15:24 +01:00
Blacktempel cdb0c65b4c TG WireView Pro 2: Changes for firmware update (#2193)
* Changes for firmware update.

* Undo SharedSerialPort.Open signature change.
2026-02-03 11:46:37 +01:00
BlacktempelandPhyxionNL df9e0a5131 Add support for Thermal Grizzly WireView Pro 2. (#2171)
* 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>
2026-01-27 13:20:07 +01:00
TimotejandPhyxionNL 6f9ac5aece Add sensors for Astral GPUs (#2168)
* Add sensors for Astral GPUs

* Clean up imports

* Code clean-up

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-01-22 10:00:23 +01:00
Blacktempel 24218b0703 Add core voltage for NVIDIA GPU. (#2175) 2026-01-20 17:21:06 +01:00
David ReneltandPhyxionNL a792c26891 Add intel vram sensors (#2077)
* 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>
2025-11-28 21:54:04 +01:00
David Renelt 4c9e9f5dfd Add VRAM memory and bandwidth sensors for Intel discrete GPUs (#2067)
- 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
2025-11-23 13:45:55 +01:00
Carlos BederiánandPhyxionNL fe9857c2ed Intel discrete GPU support (#1822)
* Intel discrete GPU support through Intel GCL library

* Formatting

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-10-09 20:11:02 +02:00
辉夜andPhyxionNL 3023089017 Changed NvApi lifecycle (#1885)
* Changed NvApi lifecycle

* Changed from public to internal

* Revert unnecessary changes.
Reinitialize() -> Initialize().

* Refactor try-catch blocks for NVML device methods

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-26 10:34:20 +02:00
Betalos (Oussama Thoura) 12fcfa6752 Record RTX 50XX gpu core temp with decimal precision (#1899) 2025-09-25 19:05:35 +02:00
辉夜 3d8642c03f Fix RTX 40 Series Hot Spot and Memory Junction sensor not reading (#1890)
* Resolved an issue where RTX 40 Series sensors.

* change if to else if
2025-09-22 23:00:21 +02:00
Betalos (Oussama Thoura)andPhyxionNL 2f595d76c2 FIX RTX 50XX Memory junction temp reading (#1878)
* Update NvidiaGpu.cs

* Enhance 50 series detection logic

* Remove unused namespace import in NvidiaGpu.cs

Removed unused 'System.Xml.Linq' namespace import.

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-21 13:54:21 +02:00
namazsoandPhyxionNL eb5e1a20be Swap WinRing0 to PawnIO (#1857)
* Replace WinRing0 with PawnIO

* Update RAMSPDToolkit

* Add install check + cleanup

* Move folder + formatting

* Add back missing TryLoadDll

* Update PawnIo.cs

* Add third party notices file

* Remove the how to apply section

* Drop silent

* Don't crash if PawnIO isn't installed

* Formatting

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-16 11:58:31 +02:00
Daniel VargaandPhyxionNL f0681e14ea Fix duplicate sensor index in nvidia-gpu (#1441) (#1442)
* Fix duplicate sensor index in nvidia-gpu (#1441)

* Update NvidiaGpu.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2024-11-24 10:51:01 +01:00
SeongChan Lee a044f1fe31 GpuIntelIntegrated initial power value should be read from MSR_PP1_ENERGY_STATUS, not from MSR_RAPL_POWER_UNIT (#1366) 2024-06-26 10:49:45 +02:00
Emerson Pinter 3959e8e3c0 Fix AMD Overdrive, update ADL methods to ADL2 variants (#1332)
After the change of ADL2_Main_Control_Create in commit 07234e3,
overdrive api checks and sensors broke. Updating to ADL2_ variants fixes
the problem.
2024-05-15 19:21:11 +02:00
Emerson Pinter e62443761b Fix ADL PMLog sensor, ignore invalid values (#1329)
There was a missing condition to avoid invalid values reported by some
cards.
2024-05-05 15:32:43 +02:00
Emerson Pinter 418888502a Add shared memory free/total for Intel iGPU (#1328) 2024-05-03 10:23:21 +02:00
Emerson Pinter 92bfa55f12 Add memory info for Amd GPUs (#1326)
* Add DedicatedVideoMemorySize to D3D

* Add memory info for Amd GPUs
2024-05-02 23:55:39 +02:00
Emerson Pinter 07234e3594 Avoid multiple initializations of AmdGpu (#1324)
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.
2024-05-02 21:42:22 +02:00
Emerson PinterandPhyxionNL 0c3ebb1933 Refactor ADL sensors update (#1317)
* 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>
2024-04-27 13:47:50 +02:00
Emerson PinterandPhyxionNL 331d334aef Add ADL pmlog support, fix metrics on newer gpus (#1308)
* 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>
2024-04-09 11:00:16 +02:00
dde9e52823 reading the proposed Total Board Power for RX 7000 Cards (#1123)
* reading the proposed Total Board Power for RX 7000 Cards

* undo requested changes

* Update AmdGpu.cs

---------

Co-authored-by: Peter Hindelang <PHindelang@artiso.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2023-08-31 10:14:40 +02:00
PhyxionNL cd77cec0b5 Unify CPU namespace with folder (#1023) 2023-03-21 18:11:40 +01:00
PhyxionNL dcf42adac9 Check if number of nodes is still identical for Intel iGPU. 2023-03-15 19:28:56 +01:00
PhyxionNL 50d7adb9ba Fixes #948 2023-03-15 19:11:17 +01:00
PhyxionNL 76245c9a32 Read storage performance sensors without WMI 2023-03-15 18:00:38 +01:00
PhyxionNL ad575e7a13 Fixes #971
Closes #972
2023-03-15 16:34:26 +01:00
PhyxionNL 20bf5bb1f7 Check if ADL overdrive caps method exists and InpOut opened OK. 2023-03-14 17:29:28 +01:00
ntoff 640ba73f83 add nvidia gpu memory used as percentage (#912)
Adds a sensor to the "Load" category to show GPU memory usage
as a percentage for Nvidia GPUs
2022-11-27 14:16:19 +01:00
PhyxionNL 58cef111a1 Use file-scoped namespaces (#842) 2022-10-09 13:22:57 +02:00
PhyxionNL 3ac329f247 Fix some code analysis issues (#841) 2022-10-09 13:16:31 +02:00
PhyxionNL 517bf2629d Check if ADL_Adapter_ID_Get exists (#827) 2022-09-22 16:58:39 +02:00
PhyxionNL 38b97e10d0 Update editorconfig + changes (#771) 2022-06-29 19:38:57 +02:00
PhyxionNL 0d20a0db2c Fixes #753 2022-06-23 19:06:05 +02:00
PhyxionNL 0f523b4a10 Expose device id for GPUs (#762)
* Expose device id for GPUs

* Update NvidiaGpu.cs
2022-06-23 19:02:32 +02:00
Bjarni Ivarsson 627f0a56ce Add Intel integrated GPU (#671)
Thanks to @bjarniivarsson.
2022-02-26 10:14:09 +01:00
PhyxionNL b0dc162359 Fixes #625 2022-01-10 17:55:09 +01:00
Tim Sirmovics 1701eb91b2 Nvidia Hotspot / VRAM temps (#583)
Thanks to @TimSirmovics
2021-10-27 16:34:07 +02:00
JoeBroeseleandPhyxionNL 6b86ec9253 Fixes saving the sensor values on program exit and the displayed fan control values for NVIDIA GPUs.. (#575)
* 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>
2021-10-18 22:11:56 +02:00
Nick Babcock ce882e3910 Remove duplicate nvidia moniker in hardware name (#571)
Thanks to @nickbabcock
2021-10-06 16:19:56 +02:00
PhyxionNL b05a3ad4df Fixes #564 (#567) 2021-10-02 10:57:36 +02:00
PhyxionNL 8c01e4b21b NV API changes (#553)
* NV API changes

Restores parts of https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/commit/eea8558825cc0d5a76aa3e57fcc862b5d6f22100 while implementing the missing bits from the original implementation.

Fixes #524.
2021-09-29 11:34:13 +02:00
javguit 0fd00e27bb Fixed compatibility with older AMD/ATI cards when calling ADL2_Adapter_FrameMetrics_Caps (#535) 2021-09-10 11:02:39 +02:00