708 Commits
Author SHA1 Message Date
JMR-dev e23feff44d dropped support for WinForms and .NET 4.7.2. Refactored to modern .NET and C# 2026-06-10 22:41:05 -05:00
JMR-dev 193de6059e wip 2026-06-08 10:37:00 -05:00
JMR-dev 739b2be4c2 clean up and AMD parity check 2026-06-03 18:59:45 -05:00
JMR-dev 2ffd237ddd cleanup after DI graph rewrite 2026-06-03 17:27:58 -05:00
JMR-devandClaude Opus 4.8 1bde5d531d Fix unbounded memory growth during monitoring
While the app was running, working set grew ~20 MB/min (reaching tens of GB
over a day). dotnet-gcdump traced it to COM-callable wrappers accumulating from
the per-tick binding interop: SensorTreeItemViewModel.RefreshValues raised
PropertyChanged for Value/Min/Max/ToolTip on every sensor every update tick, and
ViewModelBase allocated a new PropertyChangedEventArgs per raise. WinUI's binding
engine is native, so each raised event marshals its args across the boundary and
retains a wrapper.

- ViewModelBase: reuse one cached PropertyChangedEventArgs per property name.
- SensorTreeItemViewModel.RefreshValues: raise PropertyChanged only when the
  formatted text actually changed.

Also close a leaked D3DKMT adapter handle: D3DDisplayDevice.GetDeviceInfoByIdentifier
opened the adapter but skipped CloseAdapter on every early-return failure path,
and it runs on each GPU's Update() tick. Close it in a finally block.

Verified with dotnet-gcdump over an 18-minute soak: managed heap and live object
count stay flat (~50 MB) instead of climbing 47 -> 470 MB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:16:40 -05:00
JMR-dev f9edc1dc64 Fixes applied (14 of 15 findings — see note on R5)
Concurrency crashes
  - H1 HardwareMonitorService.RebuildTree now builds the tree under _updateLock, so it can't enumerate a hardware's _active HashSet while the update loop mutates it.
  - A1 AppSettings now guards every dictionary read/write (and snapshots in Save) with a lock — safe under concurrent access from the parallel discovery threads.
  - R2 Plumbed that same lock (HardwareMonitorService.SensorReadLock) into RemoteWebServer and wrapped the Prometheus sensor.Values enumeration with it.
  - L1 Computer — refactored Add into AddCore, which performs the cancellation/enabled re-check and the _groups insertion atomically under _lock. A deferred task can
  no longer add (and leak) a group after Close() drained the list; if it loses the race it closes the group instead.
  - M1 UpdateTimer_Tick now bails before/after the await when _isShuttingDown is set in MainWindow_Closed, so an in-flight tick won't touch the disposed
  view-model/Computer.

  Broken behavior
  - T1 Tray callback now decodes NOTIFYICON_VERSION_4 correctly (message = LOWORD(lParam), icon id = HIWORD(lParam)) — right-click menu and double-click work again.
  - M2 A transient update exception no longer calls _timer.Stop(); the loop keeps running.
  - H2 Newly discovered (deferred) storage devices get the current ForceDriveWakeup setting applied in HardwareChanged.
  - V2 Sensor items carry a parent reference; toggling IsVisible recomputes the parent group's visibility, so no empty group headers. (Strengthened the existing test
  that had skipped this assertion.)
  - H3 Tree-rebuild coalescing now uses a dirty flag with a re-check, so a change arriving during a rebuild isn't lost.
  - R4 Web routing matches endpoints exactly on the query-stripped path (Url.AbsolutePath), so static assets like metrics.html aren't hijacked.
  - L8 IntelCpu.Update skips the bus/core-clock math while TimeStampCounterFrequency is still 0 (deferred-TSC window), so clocks keep their prior value instead of
  reporting 0 MHz.
  - V1 Existing plot series keep their assigned color; only an explicit user pen color updates them (no per-tick color shifting).
  - M3 Runtime errors write to a dedicated runtime.log (once), instead of overwriting the shared startup.log.
  - T2 CreateSensorIcon returns IntPtr.Zero on DIB failure instead of the shared main-icon handle (which callers DestroyIcon).

  I also set _isOpen = false in HardwareMonitorService.Dispose so the rebuild guard actually holds during shutdown (the latent after-close-rebuild issue adjacent to
  H3
2026-05-30 22:56:25 -05:00
JMR-dev 5f88f71e61 added unit tests 2026-05-30 22:07:19 -05:00
JMR-dev a1cffce9fd MVP port complete 2026-05-30 19:47:04 -05:00
JMR-dev f8b9949187 performance optimizations - TSC estimation moved off blocking path 2026-05-30 18:55:12 -05:00
JMR-dev c50757868f WIP - optimizing start times 2026-05-30 18:37:39 -05:00
JMR-dev 2c176e5dd7 WIP - optimizing start times 2026-05-30 17:45:37 -05:00
JMR-dev b744f70b0b WIP - optimizing start times 2026-05-30 15:11:32 -05:00
Blacktempel 2145344e4e Update DiskInfoToolkit. (#2385) 2026-05-20 15:51:44 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 91b01784ca Bump System.IO.Ports from 10.0.7 to 10.0.8 (#2373)
---
updated-dependencies:
- dependency-name: System.IO.Ports
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 18:15:55 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> f2d72f5b5c Bump the all-dependencies group with 4 updates (#2371)
Bumps System.Management from 10.0.7 to 10.0.8
Bumps System.Resources.Extensions from 10.0.7 to 10.0.8
Bumps System.Text.Json from 10.0.7 to 10.0.8
Bumps System.Threading.AccessControl from 10.0.7 to 10.0.8

---
updated-dependencies:
- dependency-name: System.Management
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: System.Resources.Extensions
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: System.Resources.Extensions
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: System.Text.Json
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: System.Threading.AccessControl
  dependency-version: 10.0.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 15:54:11 +02:00
Blacktempel 17cc90efed Update DiskInfoToolkit. (#2358) 2026-05-03 13:17:41 +02:00
mirko93s 3fb768295a Add support for Asrock B550M Pro4 (#2356) 2026-05-03 10:39:06 +02:00
A1ive a029461c5f Add support for Intel ArrowLake-U (#2357) 2026-05-03 10:30:22 +02:00
PhyxionNL de31b7bf5d Fix PTL voltage (#2351)
* Fix PTL voltage

* Formatting
2026-04-26 19:44:38 +02:00
PhyxionNL 4f58c459ca Add support for Intel Panther Lake microarchitecture (#2332)
* Add support for Intel Panther Lake microarchitecture

* Reorder RaptorLake in CPU microarchitecture list

* Handle unknown microarchitecture case in IntelCpu

* Refactor Intel CPU microarchitecture detection
2026-04-26 19:37:28 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> aa0781a7ca Bump System.Management from 10.0.6 to 10.0.7 (#2337)
---
updated-dependencies:
- dependency-name: System.Management
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-26 19:24:09 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> b0d4e079d7 Bump System.Threading.AccessControl from 10.0.6 to 10.0.7 (#2339)
---
updated-dependencies:
- dependency-name: System.Threading.AccessControl
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-26 19:23:36 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 6ce709c02c Bump System.IO.Ports from 10.0.6 to 10.0.7 (#2336)
---
updated-dependencies:
- dependency-name: System.IO.Ports
  dependency-version: 10.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-26 19:23:07 +02:00
Blacktempel 2fc0fe9710 Update DiskInfoToolkit. (#2350) 2026-04-26 19:22:48 +02:00
Blacktempel d7473cc8cc Update DiskInfoToolkit (#2328)
* Update DiskInfoToolkit.
Add trace to report.

* Adjust identifier to also support scsi identification.
2026-04-20 20:03:51 +02:00
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
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 5e7902df6b Bump Microsoft.Windows.CsWin32 from 0.3.269 to 0.3.275 (#2324)
---
updated-dependencies:
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.275
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 14:16:15 +02:00
CopilotPhyxionNLcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
f8f9712974 Bump 5 NuGet packages from 10.0.5 to 10.0.6 (#2323)
* chore: bump 5 NuGet packages from 10.0.5 to 10.0.6 (merge dependabot PRs #2316, #2318, #2319, #2320, #2321)

Agent-Logs-Url: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/sessions/e8950bd8-0ef3-4beb-aea7-64e19dcf937a

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

* Update System.Management package to version 10.0.6

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-04-15 19:18:55 +02:00
Blacktempel fadcba0a0d Update DiskInfoToolkit. (#2322)
Fixes bluescreen for Intel Rst drives where it has occurred.
2026-04-15 19:03:58 +02:00
Sandro Greinecker 824e400304 fix: Update temperature offset calculation for newer Zen processors (#2303) 2026-04-14 16:44:41 +02:00
Howon Lee 44c1ceb864 Fix unhandled NetworkInformationException in UpdateNetworkInterfaces (#2308) 2026-04-14 16:25:44 +02:00
Blacktempel c0ee111659 Fix NVMe temperature sensors. (#2311) 2026-04-14 16:24:00 +02:00
Blacktempel 9fce235e15 Update for DIT 2.0.1. (#2304)
Move force wakeup to proper place.
Check power state of disk and update depending on that.
2026-04-14 16:23:46 +02:00
Rémi Mercier d11d35bb2e X570 null exception and pdb in release (#2300)
* X570_MS7C35 nullref

Fix nullref

* No debug symbols/pdb in release

* Update LibreHardwareMonitorLib.csproj
2026-04-14 16:22:54 +02:00
push-0x57df 47b46c7bf4 Solve the problem of long delays in data updates for mechanical disk read/write speeds. (#2301) 2026-04-08 19:58:31 +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 9e831e07b2 Update for DiskInfoToolkit Version 2.0.0. (#2298)
* Update for DiskInfoToolkit Version 2.0.0.

* PR comments

* PR comments.

* Apply suggestion from @PhyxionNL

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-04-06 19:26:02 +02:00
MadLongTom 9d9bb0084b Fix NCT6687DR fan control for system fans (index 9–15) (#2294)
* Add NCT6687DR fan control support with bit mapping and configuration phase handling

* NCT6687DR: emulate CC_Engine SetManualFAN protocol

- System fans (index > 8): skip manual mode bit (0xA00), use flat SmartFAN curve instead
- Change commit value from 0x40 to 0xC0 (REQ|DONE) matching CC_Engine
- Write 7-point temp curve (all 0x20/32C) alongside duty curve for system fans
- Add Sleep(10ms) after request (0x80) and commit (0xC0) per CC_Engine timing
- Restore: only clear manual mode bit for CPU/Pump/Chipset/EZ-Connect fans

* NCT6687DR: add INVALID bit check with retry after EC commit

- FinishFanCfgUpdate now returns bool: false if EC sets INVALID (0xCF8 & 0x10)
- SetControl and RestoreDefaultFanControl retry up to 3 times on INVALID
- Matches CC_Engine's post-commit validation behavior

* fix(NCT6687DR): bypass SmartFAN engine for system fans — use direct PWM

System fans (SYSFAN1-7) now use the same direct PWM mechanism as
CPU/Pump/Chipset fans, completely bypassing the SmartFAN curve engine
and its inherent ~2%/sec PWM smoothing.

Key changes:
- FAN_PWM_COMMAND_REG: system fans now point to direct PWM registers
  (SYSFAN7: 08:E9, SYSFAN1-6: 02:65..02:60) instead of SmartFAN
  curve base addresses (0xBE0..0xC70)
- FAN_CONTROL_MODE_REG: system fans use 08:0F (not 0xA00) for their
  manual-mode enable bits
- FAN_CONTROL_MODE_BIT: corrected per-channel bit positions derived
  from BIOS unk_104C0 table (sub_2F50 / sub_2BDC analysis)
- Set6687DRControl: simplified to single WriteByte for all fans
  (no more 7-point flat curve + step/rate writes)
- SetControl: unified path — all fans set manual-mode bit + direct PWM
- RestoreDefaultFanControl: clear manual-mode bit to return to SmartFAN

Register mapping discovered via IDA analysis of BIOS firmware:
- Extended unk_101E0 table at 0x103AC contains channels 10-15
- sub_2BDC configures 5 register operations per channel before curve write
- Entry[1] in unk_104C0 = manual-mode enable register + bit position

* review: Stopwatch, engineSts rename, CompleteFanConfigUpdate

* refactor: PreciseWait via SpinWait, DateTime to Stopwatch in ReadByte/WriteByte

* review: remove regions, revert PreciseWait to Thread.Sleep
2026-04-02 14:21:13 +02:00
Blacktempel 3d0a31d4ab Update DiskInfoToolkit. (#2288) 2026-03-24 19:22:03 +01:00
Stephen Horvath 4058577277 Sensors on older Intel Framework Laptops (#2284)
* Add missing Framework Desktop

* PawnIO: Update LpcCrOSEC.bin

* Revert "Remove early Framework models"

This reverts commit 6d8326c56b15a655eb7a8f2c129176797a29786e.

* Add suspected Chromebook model
2026-03-20 12:03:24 +01:00
Blacktempel 0db3cc8e15 Add MSI B860 mainboard handling (NCT6687D-R). (#2281) 2026-03-19 13:14:54 +01:00
PhyxionNL 516c90c7be Update deps 2026-03-15 11:05:29 +01:00
Blacktempel 998b17b6f6 Update DiskInfoToolkit. (#2277) 2026-03-15 11:03:44 +01: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 44d3263b27 Support new firmware and fix possible freeze. (#2261) 2026-03-09 12:52:11 +01:00
Blacktempel 273b47b462 Fix build for Linux (#2257)
* Fix build for Linux.

* Fix Linux runtime issues.

* PR review + fix for Windows.
2026-03-05 14:09:21 +01:00
Blacktempel a0392ad4fc Add StorageDevice.ForceWakeup property. (#2252) 2026-03-02 19:16:01 +01:00
Blacktempel 14b6daa7d6 Update RAMSPDToolkit - adds detection logic for Intel Skylake IMC. (#2250) 2026-03-02 19:15:38 +01:00
Blacktempel f5479cdbf0 Update DiskInfoToolkit & add Force Drive Wakeup option (#2245)
* Update DiskInfoToolkit.
Add option for Force Drive Wakeup.

* Change default value

* Replace name
2026-02-27 16:26:30 +01:00
Rémi Mercier e4566effd3 ROG Crosshair X870E Dark Hero (#2242)
T-Sensor support
2026-02-27 14:26:04 +01:00