Brightness (Linux): fixes random built-in flag and stdout leak in DDC/CI detection - #2616
Merged
Merged
Conversation
…/CI detection DDC/CI results never set `builtin`, and FF_LIST_ADD does not zero the new element, so external monitors were reported as built-in or external at random. Set it to false, as the BSD DDC/CI backend does. FF_SUPPRESS_IO() was declared inside the `if (ffddca_init)` block, so its cleanup restored stdout before display detection ran and libddcutil trace lines could reach the output, ahead of `--format json` too. Declare it at function scope so it covers the whole detection, including the FF_DISABLE_DLOPEN build. Closes fastfetch-cli#2615
ihsandeniz
force-pushed
the
fix/brightness-ddcutil
branch
from
September 26, 2026 06:55
2649178 to
25efa96
Compare
1 task
CarterLi
pushed a commit
that referenced
this pull request
Sep 27, 2026
* Vulkan: fixes driver name concatenation on multi-GPU systems applyDriverName appended to the result buffer without clearing it. When a later device reported a higher API version, its driver name was appended to the name of the earlier device instead of replacing it, as the comment in detectVulkan intends. * CHANGELOG: moves the #2615 entry to Unreleased #2616 was opened after 2.69.0 had been released, but its entry was written under 2.69.0 Bugfixes, so the changelog listed the fix as part of 2.69.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two problems in
detectWithDdcci(src/detection/brightness/brightness_linux.c), described with measurements in #2615:builtin.FF_LIST_ADDdoes not zero the element, so external monitors were labelled[Built-in]or[External]at random.FF_SUPPRESS_IO()was scoped to theif (ffddca_init)block, so stdout was restored before display detection ran, and libddcutil trace lines could end up in the output, including ahead of--format json.Related issue (required for new logos for new distros)
Closes #2615
Changes
brightness->builtin = falsefor DDC/CI results, matching the BSD DDC/CI backend.FF_SUPPRESS_IO()to function scope so it coversddca_init,ddca_get_display_info_list2,ddca_open_display2and the VCP read. This also covers theFF_DISABLE_DLOPENbuild, which previously had no suppression.Screenshots
Not a visual change. Before and after, same machine (Arch, Hyprland, 3 external monitors over DDC/CI, ddcutil 3.0.1),
dev@c3164d1:builtin: true--pipeoutput¹ Counted over the 42 runs whose JSON parsed. The entry count also varies because ddcutil occasionally misses one of the three monitors.
Checklist
clang-format --dry-runreports no changes for the edited file,ctestpasses (19/19), and-c presets/all.jsonc --format jsonparses on the patched build, with the same set of modules reporting errors as the unmodified build (all environment-related here, e.g. no terminal attached).