Skip to content

Releases

0.3.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 19:19
657e2c5

Added

  • "Follow USB switch" in the Linux tray menu: when the devices learned from a USB switch leave this computer, ddc-tray switches the monitor to the other computer's input (0x60), once, and prints ddc-tray: follow: switching <monitor-id> to input 0x<hh>. "Learn USB switch" records, within 30 s, the devices that leave together (hubs left out) and the monitor the brightness entries act on, without turning the follow on or writing to the monitor; the target input is one of DisplayPort 1/2 and HDMI 1/2. Turning the follow on needs all three and is the consent to that write; a monitor that does not answer only gets a line on stderr. Settings in $XDG_CONFIG_HOME/ddc-control/usb-follow.json; setup on both machines in docs/usb-switch-follow.md.

  • "Start with system" in the tray menu, on Linux and Windows: a checkable item that makes the OS start ddc-tray when you log in (~/.config/autostart/*.desktop, or HKCU\...\Run), through tauri-plugin-autostart. The mark is the OS's own state, read each time the menu opens; it is off on a fresh install and nothing turns it on by itself.

  • Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on Cargo.lock and package-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and an error finding fails the run.

  • SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus cargo llvm-cov coverage) and the popup's JS (coverage from node --test). scripts/ci/sonar-coverage.sh writes both reports, and runs locally too.

  • One esteira / Portao check that fails when any job of the pipeline failed, or when Sonar is off without a written reason.

  • An 80% line-coverage floor for the popup's JS modules: npm run test:unit writes apps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.

Fixed

  • Switching the monitor's input from the popup or from ddc-cli no longer reads the old input back. After a write of the input source (0x60) the adapter waits, up to 3 s, for the monitor to read the new input, and the popup says so when the monitor keeps another one (it may have no signal on the input asked for) or may have switched away after a failed read.

Changed

  • A monitor whose EDID reads but whose DDC/CI does not answer is marked "(on another input)" in the popup's selector, not "(no DDC/CI)", and the tip says it may be on another input or have DDC/CI off in its menu (Portuguese: "(em outra entrada)").
  • CI is one call to the shared pipeline.yml of slipalison/github-workflows, instead of versao, qualidade and lancar called one by one. Job names gain the esteira / prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate.
  • npm test in apps/ddc-tray runs test:unit (the node --test suites, with coverage), then the Playwright suite.

Removed

  • The release rehearsal on ensaio-release/* branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes only main and pull requests. The packages of every pull request remain downloadable as run artifacts.

0.3.0

Desde v0.2.0: 1 commit(s).

Novidades

  • usb-switch-follow: the monitor follows the USB switch (#14) (657e2c5)

0.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:19
420a3a1

Added

  • "Start with system" in the tray menu, on Linux and Windows: a checkable item that makes the OS start ddc-tray when you log in (~/.config/autostart/*.desktop, or HKCU\...\Run), through tauri-plugin-autostart. The mark is the OS's own state, read each time the menu opens; it is off on a fresh install and nothing turns it on by itself.
  • Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on Cargo.lock and package-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and an error finding fails the run.
  • SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus cargo llvm-cov coverage) and the popup's JS (coverage from node --test). scripts/ci/sonar-coverage.sh writes both reports, and runs locally too.
  • One esteira / Portao check that fails when any job of the pipeline failed, or when Sonar is off without a written reason.
  • An 80% line-coverage floor for the popup's JS modules: npm run test:unit writes apps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.

Fixed

  • Switching the monitor's input from the popup or from ddc-cli no longer reads the old input back. After a write of the input source (0x60) the adapter waits, up to 3 s, for the monitor to read the new input, and the popup says so when the monitor keeps another one (it may have no signal on the input asked for) or may have switched away after a failed read.

Changed

  • CI is one call to the shared pipeline.yml of slipalison/github-workflows, instead of versao, qualidade and lancar called one by one. Job names gain the esteira / prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate.
  • npm test in apps/ddc-tray runs test:unit (the node --test suites, with coverage), then the Playwright suite.

Removed

  • The release rehearsal on ensaio-release/* branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes only main and pull requests. The packages of every pull request remain downloadable as run artifacts.

0.2.0

Desde v0.1.1: 1 commit(s).

Novidades

  • input-switch-autostart: settle input switches, start with system (#13) (420a3a1)

0.1.1

Choose a tag to compare

@github-actions github-actions released this 29 Sep 02:22
134b665

Added

  • Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on Cargo.lock and package-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and an error finding fails the run.
  • SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus cargo llvm-cov coverage) and the popup's JS (coverage from node --test). scripts/ci/sonar-coverage.sh writes both reports, and runs locally too.
  • One esteira / Portao check that fails when any job of the pipeline failed, or when Sonar is off without a written reason.
  • An 80% line-coverage floor for the popup's JS modules: npm run test:unit writes apps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.

Changed

  • CI is one call to the shared pipeline.yml of slipalison/github-workflows, instead of versao, qualidade and lancar called one by one. Job names gain the esteira / prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate.
  • npm test in apps/ddc-tray runs test:unit (the node --test suites, with coverage), then the Playwright suite.

Removed

  • The release rehearsal on ensaio-release/* branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes only main and pull requests. The packages of every pull request remain downloadable as run artifacts.

0.1.1

Desde v0.1.0: 1 commit(s).

Manutenção

  • ci-full-pipeline: shared pipeline with security scans and Sonar (#12) (134b665)

0.1.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 17:05
8156ae1

Added

  • Cargo workspace with two crates, crates/ddc-core and crates/ddc-adapters, sharing workspace lints: unsafe_code denied; clippy unwrap_used, expect_used and panic warned, with unwrap/expect allowed in tests.
  • ddc-core domain model: VcpCode with named MCCS codes, VcpValue, MonitorId, MonitorInfo, Feature (kind, access, risk, allowed values), Confirm, FeatureReading and DdcError.
  • Seed risk table (risk_for_code): brightness, contrast, color preset, RGB gains, volume, sharpness and OSD language are Safe; every other code, including unclassified ones, is Dangerous.
  • Capabilities::parse, an in-house, tolerant parser for MCCS capabilities strings, tested against the real string of the "RTK QHD HDR" dev monitor.
  • Ports MonitorBackend (driven) and MonitorControl (driving), and SoftwareOsd, which implements MonitorControl: capabilities cached per monitor, reads never filtered or blocked by the capabilities (unreadable ones count as declaring nothing), and writes guarded by risk confirmation and value validation, then read back. A write whose maximum is not known yet reads the feature once first, whether or not the capabilities declare the code; if that read fails, nothing is written.
  • InMemoryMonitorBackend in ddc-adapters: a scripted fake monitor backend with a call log, used by the core's use-case tests.
  • DdcHiMonitorBackend in ddc-adapters: the real DDC/CI backend over ddc-hi 0.4.1 (dxva2 on Windows, /dev/i2c-* on Linux, no nvapi/macOS backends), behind the default-on crate feature ddc-hi.
    • It runs on a single worker thread that owns every monitor handle, so it is Send + Sync without unsafe; a static assertion checks this on every target.
    • Callers wait per-operation budgets (DdcHiBudgets: 1 s VCP read/write, 8 s capabilities, 5 s enumeration) and get Timeout past them. A job whose caller gave up never reaches the monitor.
    • No call needs an enumerate() first: an unknown monitor id costs one enumeration under the enumeration budget, then the call runs under its own budget; an id still missing answers MonitorNotFound.
    • Failed transactions are retried up to 3 times within the budget, 200 ms apart for VCP reads and writes and 500 ms apart for capabilities reads, then answer Transport. A VCP code the monitor answers as unsupported (DDC/CI result code 0x01) is not retried and answers UnsupportedFeature (Linux; dxva2 on Windows keeps that reply to itself). When one more enumeration still fits the rest of the budget (capabilities reads, with the defaults), the monitor is looked up again first, so an unplugged one answers MonitorNotFound. VCP reads and writes skip that check, so a display with mute DDC/CI fails in about 0.4 s.
    • MonitorIds come from EDID (manufacturer-model-serial), else from the device description, else index-N, with a #N suffix on repeats. Enumeration never probes DDC/CI.
    • VCP replies map to current/max in VESA MCCS byte order. Capabilities replies lose every NUL byte and are decoded lossily.
  • FakeMonitor::with_transient_capabilities_failures, to script capabilities reads that fail before succeeding.
  • Read-only hardware tests (crates/ddc-adapters/tests/real_monitor.rs), #[ignore]d and gated by DDC_HW_TESTS=1.
  • docs/linux-ddc-setup.md: libudev build headers, loading i2c-dev, udev uaccess or i2c group permissions, why never to use sudo, and the proprietary NVIDIA driver caveat.
  • ddc-cli, the command-line binary (crates/ddc-cli): list, caps [--refresh], get <vcp> and set <vcp> <value> [--yes], with --monitor selection (exact id, list index, or a unique case-insensitive part of an id; never a guess) and --json output.
    • <vcp> takes decimal, 0x hex, or the shortcuts brightness, contrast, input, preset, volume and power.
    • Dangerous writes need --yes, decided by the core; there is no prompt. The value read back after a write is printed, with a warning when the monitor ignored it. A code the capabilities do not declare can be written too, such as volume on the dev monitor: the core reads its maximum first.
    • Exit codes: 0 success, 2 usage, 3 monitor selection, 4 invalid feature or value, 5 unconfirmed dangerous write, 6 transport or timeout. A code the monitor refuses as unsupported exits 4, not 6, for get and set.
  • CachingMonitorBackend and default_cache_dir() in ddc-adapters: capabilities strings kept on disk per monitor id (%LOCALAPPDATA%\ddc-control\caps, $XDG_CACHE_HOME/ddc-control/caps or ~/.cache/ddc-control/caps), so a warm ddc-cli get skips the ~2.5 s capabilities read. Only successful reads the core can parse are stored. invalidate backs caps --refresh: the file is replaced only by a successful re-read, so a refused refresh keeps it.
  • FakeMonitor::with_vcp_failure, to script a VCP code whose reads and writes fail with a given error.
  • MCCS feature catalog in ddc-core (domain::mccs_catalog): one static table of the 39 VCP codes observed on the "RTK QHD HDR" (28 declared, 9 answered without being declared, 0xE6/0xF1 found by a full read-only scan), each with its MCCS name, CLI name, kind, access, risk and value names, plus the lookups built on it (catalog_entry, catalog_codes, value_name, value_for_name, code_for_alias, hertz, version_from_u16, interpret).
  • MonitorControl::probe_undeclared_features and ProbedFeature: reads, once each, every catalogued code the capabilities do not declare, telling a code the monitor refuses (UnsupportedFeature) from one it does not answer (Transport/Timeout); one failure never stops the probe, and nothing is written.
  • ddc-cli features [--probe] [--json]: every declared feature with its current value, kind, access, risk and meaning; --probe adds the catalogued codes the capabilities leave out, marked not supported by this monitor or not responding (probe_status in JSON).
  • ddc-cli names: <vcp> takes any catalog name (sharpness, osd-language, red-black-level, v-frequency…), and <value> takes value names, ignoring case and punctuation (set preset srgb, set preset 6500k, set input hdmi-1 --yes). A name that is no value of the feature being set exits 2 before any monitor is touched.
  • get and set show what a value means (1 (0x01) sRGB, 514 (0x202) 2.2); JSON gains value_name/interpreted only when there is one.
  • ddc-cli reset <factory|brightness-contrast|geometry|color> [--yes], the same write as set <code> reset --yes: 0x01 to 0x04/0x05/0x06/0x08, refused without --yes (exit 5), reported as sent since the reset codes are write-only.
  • ddc-tray (apps/ddc-tray), a Tauri 2 system-tray app over the same core, backend and capabilities cache as ddc-cli, installed from the release packages (below) or run with cargo run -p ddc-tray.
    • A 360×560 popup, hidden on focus loss and Esc: brightness, contrast and volume sliders, color preset, input source, power mode, and an "All settings" section loaded on demand, with a read-only probe of the codes the capabilities leave out.
    • Sliders write 80 ms after the last move, coalesced, one write in flight per feature; the popup shows the value the monitor reads back.
    • Every dangerous change (input, power, dangerous "All settings" entries) goes through a confirmation dialog first; Confirm::Yes is built only in the app's command layer.
    • Several monitors: a selector; the popup opens on the last monitor it loaded, else the first whose panel loads. A panel fails when none of its quick controls can be read, so a monitor whose DDC/CI is mute is skipped and marked "(no DDC/CI)" in the selector.
    • On Linux the icon is a StatusNotifierItem of the app's own, over ksni (pure Rust on D-Bus; no AppIndicator library, at build or run time): a left click toggles the popup, the mouse wheel changes the brightness by 5% per notch (0–100%, notches that arrive during a write coalesced into one write), and a right click opens the menu. Its tooltip names the monitor the wheel and the menu act on.
    • On KDE Plasma under Wayland the popup opens next to the tray icon, inside the screen's work area, with no taskbar entry: the app loads a KWin script over D-Bus at start and unloads it when it quits, through Quit or on SIGTERM, SIGINT or SIGHUP (which quit the app the same way), waiting at most 2 s for KWin; only a SIGKILL or a crash leaves it loaded, matching only the dead process's popup, and the next start replaces it. The script is written only to $XDG_RUNTIME_DIR; without it none is loaded. Elsewhere the popup opens where the compositor puts it.
    • Tray menu in English or Brazilian Portuguese, from the system's locale: "Open panel" and "Quit", plus brightness shortcuts 0/25/50/75/100% on Linux. On Windows (Tauri's tray icon) a left click toggles the popup anchored above the icon (not built on Windows yet).
    • Lists (monitor selector, color preset, "All settings" lists) are drawn inside the popup, keyboard operable as a WAI-ARIA select-only combobox: a native select's menu is a window of its own, and the popup hid as soon as it opened.
    • Popup in English or Brazilian Portuguese, every text from locale keys; light and dark themes; keyboard operable; strict CSP, tested as Tauri embeds it, with any platform config merged; capabilities limited to the app's own commands; single instance.
    • The CSP check covers the effective policy of Linux, Windows and macOS alike, each merged as Tauri's build merges it for that target (the_effective_csp_is_the_strict_policy_on_every_target), and a tauri.<platform>.conf.json must not touch app.security: the policy lives only in tauri.conf.json, and the test fails a platform file that changes csp or sets a devCsp.
    • On Linux, a restart at launch with WebKitGTK's DMA-BUF renderer off (WEBKIT_DISABLE_DMABUF_RENDERER=1) unless the variable is already set: that renderer crashed ...
Read more