Skip to content

Combine #23 + #24 + #25 with fixes on top: animated lighting, dashboard UI, README overhaul (1.1.0) - #26

Merged
Batuhan4 merged 12 commits into
mainfrom
integrate/community-prs
Sep 4, 2026
Merged

Batuhan4 merged 12 commits into
mainfrom
integrate/community-prs

Conversation

@Batuhan4

@Batuhan4 Batuhan4 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

What this is

One reconciled branch that lands the three stacked PRs from @hemangjoshi37a with fixes applied on top, the same way #20 combined #15/#17/#18. Original authorship of all contributor commits is preserved.

#22 from @idkreally001 (normal-urgency notifications) is independent and is merged on its own.

Fixes applied on top

Fan control

  • VICTUS_NO_FAN_CONTROL=1 is now a real gate. The backend writes AUTO at start-up so nothing a previous run left behind stays in effect, refuses SET_FAN_MODE / SET_FAN_SPEED from every client, and reports DISABLED through GET_FAN_TARGET_SUPPORT, so the app locks the profile selector and shows telemetry only. Before, it only skipped the start-up Better Auto.
  • The target probe checks both fan1_target and fan2_target. Boards without them are left on the firmware curve at start-up, and MANUAL / Better Auto are refused there since both steer through those targets; the app offers AUTO and MAX only. Better Auto was previously still offered on such boards and would have switched the driver to manual with nothing to write.

Keyboard lighting

  • Four-zone boards get an explicit off state. Frames are serialised with the on/off toggle and dropped while the backlight is off, so switching it off sticks and the animation resumes on "on"; switching on with nothing stashed lights the zones white.
  • The direct-write check runs per frame, so the udev rule takes effect without restarting the service, and an effect that cannot write three frames in a row stops instead of retrying forever.
  • Picking a solid colour is remembered across restarts (STATIC); shutdown no longer overwrites the saved effect.
  • The Flow preview no longer runs half a cycle away from the keyboard, and stopping an effect on four-zone boards reads every zone back rather than copying zone 0.

udev / installers

  • The four-zone RGB rule now matches bind: the platform device's add event fires before the driver's probe creates the rgb_zones files, so the rule could never apply at boot. Fedora gets the same rule (its installer replaces the rules file), and all three installers trigger the platform device after reloading rules.
  • The hwmon rule used $DEVPATH, which udev rejects as a substitution and therefore dropped the whole line; it now uses %p like the Fedora rules and also grants pwm1_enable.

Cleanup

  • Preset, toggle, Apply and effect-dropdown handlers that the dashboard replaced are removed, along with unused card/tile helpers.
  • README: the fan1_target read diagnostic is gone (the patched driver returns EINVAL for every target read, on every board); troubleshooting now compares RPM with the backend log under load.
  • Version bumped to 1.1.0.

Verification

  • Clean build of the backend and the GTK4 frontend under -Wall -Wextra (GTK 4.18, GCC 14); meson test passes, including the new backend-fan-support test covering the gate and the probe.
  • cppcheck, shellcheck, udevadm verify on both rules files, systemd-analyze verify and visudo -c are clean.
  • Backend protocol exercised over the socket for the UNSUPPORTED and DISABLED paths, the effect worker's failure stop, and STATIC persistence across a colour change and a SIGTERM shutdown.

Upgrading

Re-run install.sh (or the bootstrap one-liner): it installs the new set-rgb-zones.sh helper, its sudoers entry and the updated udev rules, and restarts the backend.

hemangjoshi37a and others added 12 commits September 4, 2026 18:46
The keyboard could only be set to one static colour. This adds a small
animation engine in the backend that repaints the keyboard on a timer,
plus the controls to drive it from the GTK app.

Effects: RAINBOW (whole keyboard walks the hue wheel), BREATHE (the
current colour fades in and out) and FLOW. On four-zone Omen keyboards
FLOW offsets the hue across the zones in their physical left-to-right
order (2, 3, 1, 0 — far left, WASD, middle, right) so the colour travels
along the board like a river. Single-zone backlights have no geometry for
a wave to travel across, so FLOW behaves like RAINBOW there and the
dropdown label says so rather than looking broken.

Protocol: SET_KBD_EFFECT <NAME> [SPEED] and GET_KBD_EFFECT. Speed is
1-100 and maps onto the cycle period; omitting it keeps the current rate.
Setting a static colour cancels a running effect, since otherwise the
next frame would paint straight over the user's choice.

Notes on cost, which drove a few of the decisions here:

- A single-zone frame is one ~0.15ms sysfs write, so it runs at 30fps for
  about 0.4% CPU. A four-zone frame has to go through the setuid helper,
  so it runs slower and all four zones are pushed in one invocation via a
  new set-rgb-zones.sh; doing it per zone would mean four sudo execs and
  four journal entries for every frame.
- A udev rule grants the victus group write access to the zone files, so
  frames normally take a direct-write fast path and skip sudo entirely.
- The loop skips writes while the backlight is off rather than repainting
  a dark keyboard.
- Frames advance on measured elapsed time, so the rate holds steady
  regardless of how long a hardware write took.

The chosen effect is saved under StateDirectory= and restored on start,
so the lighting survives a reboot. The GTK app animates its drawn
keyboard to match, seeding the preview phase from the colour the hardware
is showing so it runs in step instead of at a random offset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
Some boards report software fan support through the BIOS query but then
ignore per-RPM target writes. On those, Better Auto switches the fans to
MANUAL (which succeeds) and then fails to set a speed, leaving the fans
pinned at a fixed RPM with the firmware curve switched off.

Measured on a Victus 15-fb3xxx (board 8E5F): writes to fan1_target return
success while fan1_target itself reads EINVAL, the fans never change, and
under an all-core load the CPU sat at 100C with the fans held at 2691 RPM
and fan2 stopped for 30 seconds. The same load with the stock in-tree
hp-wmi driver kept both fans running, so this is the control loop taking
over and not being able to hand anything back.

VICTUS_NO_FAN_CONTROL=1 skips the startup Better Auto enforcement and
leaves the fans entirely to the firmware, so the backend can still serve
keyboard lighting on affected hardware. Off by default; nothing changes
for boards where fan control works.

README documents how to tell whether a board is affected and the drop-in
that sets it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
The app used stock GTK defaults: full-width stacked buttons, plain labels
and no visual grouping. This gives it a look that suits the hardware it
controls.

- A stylesheet (frontend/src/style.cpp) with a dark carbon palette and an
  electric cyan accent, squared-off controls, and glow on the accented
  elements. Amber and red are reserved for temperature, so colour always
  carries meaning rather than decoration.
- Controls are grouped into titled cards instead of a flat stack, each
  headed by a symbolic icon from the icon theme. Icons come from the theme
  rather than a bundled icon font, so they follow the accent colour and add
  no assets.
- The fan tab becomes a telemetry dashboard: fan RPM and CPU/GPU
  temperature as large monospace readouts (monospace so digits do not
  jitter as values update). Temperatures turn amber at 70C and red at 85C.
- The drawn keyboard is rendered as key caps in a chassis with a backlight
  glow, instead of flat rectangles. Unlit keys still show a dark cap, so
  the keyboard reads as a keyboard when it is off.
- The colour readout follows the animation rather than showing whatever
  value was set when the effect started, which looked like a bug next to a
  keyboard that was visibly cycling.
- Pages scroll, so a short window no longer clips the controls at the
  bottom.

No colour scheme is forced. Asking GTK for a dark scheme makes it load the
system theme's dark variant, and themes shipping only a gtk-dark.css (Yaru
among them) fail that import and drop their whole base stylesheet; the
rules here paint every surface the app shows instead.

Also adds GET_FAN_TARGET_SUPPORT. Boards whose firmware refuses software
fan control never expose fan*_target, and the manual speed slider on those
machines moves but changes nothing. The fan tab now asks the backend up
front and, when unsupported, disables the slider and says why rather than
letting it fail silently on every drag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
The README was a flat wall of bullets with no way in and nothing showing
what the app actually is. Same information, arranged so it can be scanned.

- Centred header with the project icon, a one-line pitch, and badges for
  licence, platform, toolkit and the supported distros.
- Screenshots of both tabs near the top, so the first thing a visitor sees
  is the software rather than a paragraph about it.
- A table of contents, and a feature table replacing the "Why" bullet list.
- Support matrix, requirements and background services become tables.
- Lighting effects get their own section with a table per effect.
- Troubleshooting entries become collapsible <details> blocks, so the
  section stops dominating the page while staying complete.
- GitHub alert syntax (NOTE / TIP / IMPORTANT / WARNING / CAUTION) for the
  hardware warning, the "do not pipe into sudo" note, and the warning
  against running two fan controllers at once.

No technical content was dropped; every command, model number, caveat and
link from the previous revision is still present. The AGENTS.md reference
stays plain text, as it was, because that file is not in the repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
Reworks the interface around what someone actually does with it, rather
than mirroring the backend's command list.

Layout
- The two tabs become one page with a card per subsystem. A control panel
  is glanced at, and tabs hid half the machine's state behind a click.
- Each card leads with its visual: the backlight preview, and the fan
  dials.

Keyboard card
- A switch in the card header replaces the full-width toggle button.
- Lighting style is a row of radios (Solid / Rainbow / Breathe, plus Flow
  on four-zone boards) instead of a dropdown, so every option is visible
  without opening anything.
- FLOW is not offered at all on single-zone hardware. It has nowhere to
  travel there, and an option that quietly behaves like a different one is
  worse than an absent option.
- Speed sits directly under the style row, and only appears for the
  animated styles. The colour picker only appears for Solid. Neither
  control is shown when it would do nothing.
- The Apply button is gone: choosing a colour applies it. Every other
  control already applied on change, so Apply was an inconsistency.

Fan card
- Fan speed and temperature get analog dials with the digital value under
  each (frontend/src/gauges.cpp). Rotor blades turn at a rate derived from
  the measured RPM — scaled down, since 3000 RPM is 50 rev/s and could not
  be drawn honestly — and a stopped fan renders grey rather than simply
  still, so a stalled fan is distinguishable from a slow one.
- Thermometers fill against 100C and shift cyan to amber to red on the
  same thresholds as the digital readouts.
- Where the firmware refuses fan targets, manual speed is removed from the
  card and MANUAL is dropped from the profile list, instead of being shown
  disabled.

Fixes found while testing this
- The preview kept the colour it was constructed with after an effect was
  stopped, showing white next to a keyboard sitting on the last animated
  frame; the settled colour is now read back from the device.
- The preview did not repaint when the backlight was switched off, so lit
  keys were drawn over an off keyboard.
- GTK's accent colours are overridden, otherwise radios and focus rings
  followed the desktop accent (orange on Ubuntu) against a cyan UI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
The screenshots and wording described the previous tabbed layout.

- One dashboard screenshot as the hero image instead of a pair of tab
  shots, plus a second showing that picking Solid swaps the speed slider
  for a colour picker.
- "Cooling tab" / "Lighting tab" become cards, and the daily-usage section
  describes the switch, style radios and direct-apply behaviour.
- Telemetry is described as analog dials with digital values, including
  that a stopped fan renders differently from a slow one.
- Notes that controls which cannot do anything are absent rather than
  disabled: Flow on single-zone boards, manual speed where the firmware
  refuses targets.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELZkKrF8iHGDQG3qK19xcG
…red; make lighting off and static stick

VICTUS_NO_FAN_CONTROL=1 only skipped the start-up Better Auto: SET_FAN_MODE
and SET_FAN_SPEED still went through, and a driver left in MANUAL by the
previous run stayed there. It is now a real gate: the backend writes AUTO at
start-up, refuses every fan-changing command, and reports DISABLED through
GET_FAN_TARGET_SUPPORT so clients can hide the controls.

The target probe checks both fan1_target and fan2_target. Boards that have
neither get the same start-up treatment (AUTO, no Better Auto), and MANUAL
and Better Auto are refused there since both steer through those targets;
AUTO and MAX keep working.

Four-zone boards get an explicit off flag: animation frames are serialised
with the on/off toggle and dropped while the backlight is off, so switching
it off sticks and the effect resumes on "on"; "on" with nothing stashed
lights the zones white instead of leaving them dark. The direct-write probe
runs per frame so the udev rule takes effect without a restart, and an effect
that cannot write three frames in a row stops instead of retrying forever.
Choosing a solid colour now persists STATIC; shutdown stops the worker
without touching the saved effect.

Adds backend-fan-support-test covering the gate and the probe.
… the hwmon rule

The platform device's "add" uevent fires before the driver's probe creates
the rgb_zones files, so a rule matching add|change could never apply at
boot; it now matches bind as well. The Fedora rules file gains the same
rule, and all three installers trigger the platform device after reloading
rules, so the animation takes the direct-write path right after install
instead of forking sudo for every frame.

The hwmon RUN line used $DEVPATH, which udev rejects as a substitution and
therefore dropped the whole rule; it now uses %p like the Fedora rules and
also grants pwm1_enable, so mode writes no longer need the sudo fallback.

set-rgb-zone.sh tests the write directly instead of $? after echo.
…eview in step; drop leftover preset code

The cooling card now removes Better Auto as well as manual speed when the
board exposes no fan targets, and locks the profile selector with a note
when fan control is switched off. The Flow preview seeded its phase from
zone 0's hue although zone 0 is painted three quarters of a cycle ahead, so
it ran half a cycle away from the keyboard; the offset is taken back out.
Stopping an effect on a four-zone board reads every zone back rather than
copying zone 0 across the preview.

Presets, the toggle button, Apply and the effect dropdown were replaced by
the dashboard but their handlers and members were still compiled in; they
are removed along with the unused card and tile helpers.
Reading fan1_target returns EINVAL on every board with the patched driver,
so it is no diagnostic; the troubleshooting entry now compares fan RPM with
the backend log under load. The notes now say that Better Auto is
unavailable without fan targets, what VICTUS_NO_FAN_CONTROL=1 does, and that
the last lighting choice survives a reboot.
Animated keyboard lighting, the single-page dashboard, the README overhaul and the fan-control fixes that came with them.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 Hi @Batuhan4, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@Batuhan4
Batuhan4 merged commit 143b1c8 into main Sep 4, 2026
4 of 5 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 I'm sorry @Batuhan4, but I was unable to process your request. Please see the logs for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants