Skip to content

feat(redshift): dim backlight via acpilight/ddcci on day/night cycle - #6621

Merged
perrin4869 merged 7 commits into
masterfrom
feat/redshift/support-setting-brightness-via-ddcci
Sep 10, 2026
Merged

perrin4869 merged 7 commits into
masterfrom
feat/redshift/support-setting-brightness-via-ddcci

Conversation

@perrin4869

Copy link
Copy Markdown
Owner

Pulls in acpilight (deps/acpilight) as a backward-compatible xbacklight replacement driving brightness through /sys/class/backlight instead of X11 RandR, and wires it to redshift via a period-changed hook so displays dim on the day/night cycle and restore full brightness when redshift is disabled. Works uniformly on a native ACPI panel or, once ddcci-driver-linux is loaded, a DDC/CI-controlled external monitor.

perrin4869 and others added 4 commits September 9, 2026 16:56
Pulls in acpilight (deps/acpilight) as a backward-compatible xbacklight
replacement driving brightness through /sys/class/backlight instead of
X11 RandR, and wires it to redshift via a period-changed hook so
displays dim on the day/night cycle and restore full brightness when
redshift is disabled. Works uniformly on a native ACPI panel or, once
ddcci-driver-linux is loaded, a DDC/CI-controlled external monitor.
brightness-day (RandR's Brightness property, distinct from Gamma) and
temp-day apply uniformly across every monitor via software gamma
scaling, unlike the hardware-backlight hook which only reaches
DDC/CI-capable displays -- so this covers the two LGs that ddcci can't
control. Backed off the hook's own brightness_day to 100 now that
daytime dimming is handled here, avoiding the two effects compounding
on the Philips.
A desktop can have multiple independently-registered ddcci displays
(discovered while debugging the two LG monitors on this box). Loop
over every ddcci* backlight device instead of stopping at the first
match found under /sys/class/backlight.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… all monitors

brightness-day was compensating for the two LGs having no hardware
backlight path at all. Now that both register correctly on their AUX
i2c bus, real DDC/CI hardware dimming reaches every monitor, which is
strictly better than gamma scaling (no color/banding degradation,
actual backlight power reduction). Moved the daytime dim target back
into the hook's own brightness_day.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@perrin4869
perrin4869 force-pushed the feat/redshift/support-setting-brightness-via-ddcci branch from b7e7678 to b715457 Compare September 9, 2026 10:43
perrin4869 and others added 3 commits September 10, 2026 13:50
Writing to new_device is a synchronous sysfs call that blocks until
the driver's real I2C handshake with that monitor finishes -- doing
this for several monitors serially, un-backgrounded, measurably slows
down boot. modprobe alone is instant and doesn't need it, only the
per-monitor loop does.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Git already tracks the file's mode as 100755, so a checkout produces
an executable script with no chmod needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Trim mk/build.mk's acpilight comment to match the file's terser style
(the udev-rule caveat it dropped is still covered in the README).
Move the "why backgrounded" explanation from README prose into an
inline shell comment next to the code it explains, add DP/HDMI branch
labels, and genericize "/etc/rc.d/rc.local" to "your system's
startup" for portability to non-Slackware systems.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@perrin4869
perrin4869 merged commit 26fec29 into master Sep 10, 2026
2 checks passed
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.

1 participant