Skip to content

OpenHardwareOS v0.1.6 — 后台规则服务

Pre-release
Pre-release

Choose a tag to compare

@SvenKunkka SvenKunkka released this 15 Sep 09:13
· 35 commits to main since this release

OpenHardwareOS v0.1.6 adds a background rules service: closing the desktop window no longer stops the rules. It exists because of the problem underneath it — two processes driving one fan. Existing v0.1.0 – v0.1.5 tags and downloads remain available.

Changes

The rules keep running with no window open

  • ohm-cli service run starts the runtime and the rule loop in a process that never opens a window. It runs until Ctrl-C or SIGTERM.
  • ohm-cli service status reports from the state file: pid, start time, heartbeat age, cycles, rules, whether the sources are simulated, whether writes are dry-run. It exits 1 when nothing is running and 0 when something is, so a script can ask.
  • docs/background-service.md documents the semantics, a systemd user unit template, the permission reality (reading needs no privileges; writing pwm<N> is not implemented in this build at all), and what is not verified.

One writer per channel

  • The service claims the hardware channels before touching them, by creating a state file atomically: two processes starting together — or two that both decide an abandoned file is reclaimable — cannot both win.
  • Liveness is a heartbeat, not a guess: the owner rewrites the file every second, so a file whose heartbeat stopped belongs to a process that died, including one killed with SIGKILL. A file that cannot be parsed counts as unowned, because refusing to start over a hand-broken file would leave a machine unable to run its rules until somebody deleted it by hand.
  • The desktop stands down. When another process owns the channels, the desktop does not start its own rule loop; it keeps reading and drawing, and records why in the log and the event feed instead of silently doing nothing.

Stopping hands control back

  • SIGTERM (what a service manager sends) and Ctrl-C stop the rule loop, shut the runtime down — which releases control and reports what that achieved, confirmed and unconfirmed and refused and failed separately — and remove the state file.
  • The signal handler is installed before the state file is claimed, so a service that looks alive can always be stopped cleanly.
  • The page says plainly why kill -9 is the wrong way to stop it: nothing hands control back, so the fans stay at the last value written.

Install

The Windows desktop installer and the optional PowerShell script are unsigned, and so are the Linux packages. LibreHardwareMonitor is a separate prerequisite for supported motherboard channels on Windows and is not bundled.