Skip to content

OpenHardwareOS v0.1.9 — Linux 风扇通道:按通道开启

Pre-release
Pre-release

Choose a tag to compare

@SvenKunkka SvenKunkka released this 16 Sep 02:46
· 25 commits to main since this release

OpenHardwareOS v0.1.9 adds Linux fan control, one channel at a time and only where you have confirmed it. The Linux preview has been read-only since it shipped, and the reason was written down rather than hidden; this release makes that reason the switch. Existing v0.1.0 – v0.1.8 tags and downloads remain available.

Changes

Reading is unconditional; writing is per channel and opt-in

pwm<N> and fan<N>_input share a chip and a channel number, which is not a promise that pwm1 drives the header fan1_input measures. That pairing is a property of the board and no kernel interface states it, so this project treats it as information only a person can supply:

{
  "adapter_settings": {
    "system": { "pwm_write_allow": ["fan.system.nct6798d_fan1"] }
  }
}
  • Empty by default, and empty means read-only.
  • Only a listed channel gains a writable fan.speed_percent; the others stay read-only, and a write that reaches the path anyway is refused naming the setting that would have allowed it.
  • A blank or non-string entry matches no device: a mistake fails towards allowing nothing.

Taking control is explicit, reversible, and refuses to guess

  • The first write switches pwm<N>_enable to manual (so a driver curve cannot overwrite it) and remembers what it was. On exit the original value goes back — which is why the adapter now declares that it hands control back to the firmware. It also declares that writing needs root, because pwm<N> does.
  • If the channel's ownership cannot be read — an unreadable file, or a value that is not a number — nothing is written and nothing is restored: writing a guess back would decide who owns a fan.
  • A write that fails puts the channel back before reporting the failure, and a shutdown that cannot restore one channel still attempts the rest, reporting every failure rather than the first.

What is verified, and what is not

13 new tests cover the path against a prepared sysfs tree: capability exposure with and without consent, percentage-to-255 conversion including out-of-range and non-finite values, taking control and giving it back, an unauthorised channel refused with its file untouched, a read-only capability still refused, and a shutdown with nothing to hand back.

Nothing here has run on real hardware. Linux install explains why the confirmation must be human; the field checklist §3 is the procedure — write one channel directly as root to see whether the tachometer follows, record pwm<N>_enable, hand the channel over, and a three-step rollback. Until that is done on your machine, leave the list empty: the default is always available.

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.