Skip to content

v2026.708.1-solarflare

Choose a tag to compare

@vindeckyy vindeckyy released this 09 Jul 03:22

SolarFlare 2026-07-08 patch release

Fixes the long-standing "I have to re-pair every time Sunshine restarts" bug.

Highlights since v2026.708.0-solarflare:

  • fix(certs): adopt existing pkey/cert on restart instead of generating (7fde0ef)
    Every restart was creating a new server cert because the user's
    sunshine.conf has no pkey=/cert= lines, so the empty-config
    branch in http::init() generated a random unique_id on every
    start. The new cert invalidated every paired Moonlight client and
    forced re-pair. Fix: scan appdata/credentials/ for existing
    pkey-* files and adopt the newest by mtime. On Hayden's box
    this stops the accumulation of 2266+ cert/pkey pairs from previous
    restarts. One re-pair required after this update (the existing
    paired client certs in sunshine_state.json don't match the
    adopted server cert). After that, every restart preserves the cert.

  • feat(error): SUN_ERR tagged error log + process-wide counters (5d113c3, 6cd3046, 718fb65)
    New src/error.h with error_category_e, encode_error_e, and the
    SUN_ERR(cat, tag, msg) macro. Every error log line is now
    self-correlated with file:line:func + category tag + per-category
    atomic counter. encode() and encode_nvenc() return
    std::optional<encode_error_e> so call sites can branch on the
    specific cause (EMPTY_PACKET, FRAME_INDEX_MISMATCH,
    UNSUPPORTED_SESSION) instead of the previous generic "Could not
    encode video packet" message. New GET /api/errors endpoint
    (LOGS_GET scope) returns the counter snapshot for the Web UI.

  • test(error): standalone runner
    tests/run_test_error.sh bypasses the cmake test target (which
    OOMs the 16GB box on full test_sunshine link). Compiles only
    src/error.cpp + tests/unit/test_error.cpp + gtest_main.cc in
    ~5s, ~300MB peak. 4 unit tests pass on the host.

Upgrade notes:

  1. Pull and rebuild: cd ~/Desktop/Solar-Flare && git pull --rebase && cmake --build cmake-build-test --target sunshine -j4
  2. Install: sudo cp cmake-build-test/sunshine /usr/local/bin/sunshine && sudo setcap "cap_dac_override,cap_sys_admin,cap_sys_nice+ep" /usr/local/bin/sunshine
  3. Restart: systemctl --user restart sunshine
  4. Re-pair ONE TIME in Moonlight (forced because the adopted server cert doesn't match the certs currently in sunshine_state.json)
  5. Optional cleanup: rm ~/.config/sunshine/credentials/pkey-* to remove the 2265 orphan pairs

After step 4, every subsequent restart preserves the cert. No more forced re-pair.