Files
RedBear-OS/local
vasilito d53d9d7aff redbear-power: v1.2 — config file, AMD CCD, tab system, D-Bus methods
Completes the remaining plan §24 deferred items:

- Config file (TOML): new config.rs module loaded from
  /etc/redbear-power.toml and ~/.config/redbear-power.toml (with
  --config <path> override). Sections: display, theme, keybindings,
  benchmark. --help documents the full schema.

- AMD Zen CCD topology: cpuid.rs detect_hybrid now parses leaf
  0x8000001E NC field (cores per CCX) and Zen 4+ leaf 0x80000026
  (CCD count + cores per CCD). Linux host with 24 AMD cores now
  shows CCD0..CCD5 grouping instead of all-Unknown.

- Multi-view tab system: Per-CPU / System / Info tabs via ratatui
  Tabs widget. Hotkeys 1/2/3 jump directly; T cycles. System tab
  shows aggregate CPU stats (avg freq, max temp, total pkg power,
  aggregate flags, bench status). Info tab shows detailed CPU
  identification (family/model/stepping hex, full flags list,
  per-level cache hierarchy with KB+way+line size). New
  render_tab_bar / render_system_panel / render_info_panel render
  functions in render.rs. TabId enum added to app.rs.

- D-Bus methods: added CycleGovernor, SetGovernor(name),
  ToggleThrottle, ForceMinPstate, ForceMaxPstate, SetPstate(target)
  methods to org.redbear.Power. PowerCommand enum + command
  channel back to main thread for MSR-bound actions. New App
  methods set_governor(Governor) and set_selected_pstate(i32)
  enable D-Bus clients to set governor/P-state without sending
  keystrokes.

- Mouse sub-panel navigation: refined hit-test so left-click on
  header/controls cycles governor, right-click toggles throttle,
  middle-click on table expands P-state. Header now has two
  distinct actions (governor + throttle) reachable via different
  mouse buttons without per-label x hit-test.

New dependencies in Cargo.toml: toml = "0.8", dirs = "5",
serde = { version = "1", features = ["derive"] }.

Verification:
- cargo build --release (host): 0 errors.
- ./redbear-power --once: shows tab bar + Per-CPU view.
- ./redbear-power --config /tmp/rp-test/config.toml: respects
  refresh_ms override (50ms minimum enforced).
- AMD CCD labels visible: '▶ CCD0' / 'CCD1' / etc.
- cook redbear-power (Redox target): 3.2 MB stripped binary at
  local/recipes/system/redbear-power/target/x86_64-unknown-redox/stage/usr/bin/redbear-power.
  SHA256: 58b7812a5f673e227753c01e93a05678bd9e8f28101d8a447d70d4943170c40a.

ISO rebuild status: still blocked by pre-existing upstream nix-0.30.1
vs Redox relibc SaFlags incompatibility in uutils. v1.2 binary
is staged and will be packaged into the next successful ISO build
once that issue is resolved.

Source size: 2758 LoC across 11 modules (was 2376/10 in v1.1).
2026-06-20 14:21:06 +03:00
..
2026-06-18 20:46:44 +03:00