Repository navigation
leds: pwm: optional duty cycle range; J604 keyboard light on macOS's scale - #1919
Open
IronsideXXVI wants to merge 3 commits into
Open
IronsideXXVI wants to merge 3 commits into
IronsideXXVI wants to merge 3 commits into
Conversation
Some PWM LEDs must not run at full duty, and some stay dark below a threshold duty cycle. Add min-duty-cycle-bp and max-duty-cycle-bp, in basis points of the period: brightness b > 0 gives min + (max - min) * b / max-brightness, and brightness 0 is off. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
leds-pwm drives max-brightness at 100 % duty and brightness 0..max at 0..100 %. Some LEDs must not run at full duty, and some stay dark below a threshold duty cycle, so a linear 0..100 % scale wastes the bottom of the range and overdrives the top. Add two optional properties, in basis points of the period: min-duty-cycle-bp and max-duty-cycle-bp. Brightness b > 0 gives min + (max - min) * b / max-brightness; brightness 0 stays off. Without the properties the duty cycle is exactly period * b / max-brightness, as before. default-state = "keep" reads the brightness back on the same scale. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
macOS drives this keyboard backlight at 25 kHz with its levels 0.0625 / 0.25 / 0.5 / 0.75 / 1.0 at 69 / 123 / 194 / 265 / 336 of 960 cycles: on = 52 + 284 * level. Its top level is 35 % duty. Linux drove max-brightness at 100 %, about 2.9 times macOS's top, and the bottom fifth of its scale under the duty cycle where macOS's line starts. Label the keyboard LED in t8132-laptop.dtsi and give the J604 the duty cycle range 542..3500 basis points, so brightness 0..255 follows macOS's line and 255 is macOS's top level. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
IronsideXXVI
added a commit
to IronsideXXVI/omarchy-j604
that referenced
this pull request
Nov 14, 2026
…d the test tool on 1.909 kernel/: the 4 patches 1.909 adds (580 in all), same Aurora base: a crumb naming the section a stalled boot stopped in, the external display controllers' DART left alone while powered down (the fix built for the intermittent early-boot stall), the resume stub's fault vectors told apart by the time to reset, and the detecting camera firmware kept up into the first stream. The recipe is the linux-aurora package again. STATUS.md: 1.909 is the default as linux-aurora with 1.908 beside it as linux-aurora-next. The camera's first open after boot streamed 30 of 30 frames with no firmware retry on 3 of 3 boots since 1.908, the last with 1.909's own camera change switched off. The team's test tool in an unattended dry run on 1.909: 42 pass, 4 fail, 27 skipped of 73. UPSTREAM.md: aurora-silicon/linux#1919 (keyboard light duty range) and omacom/omarchy-mac-pkgs#142 (display and keyboard brightness follow the room light); the third camera check on #1918.
This was referenced Nov 14, 2026
|
Tested on a J604 (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.0; aura 1.0.0b13). The kernel was alarm-aurora's pkgrel 38 recipe on PWM duty read back from
Stepping 255 / 128 / 32 / 0 by eye: each step clearly visible, and full brightness looks like macOS's brightest. Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening and looking, reviewed it, and am responsible for it. Assisted-by: LLM |
This was referenced Nov 14, 2026
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.
The J604's (14" MacBook Pro M4, T8132) keyboard backlight is a
pwm-ledsLED.leds-pwmmapsmax-brightnessto 100 % duty, but macOS never drives this light above 35 %, and its scale starts at 5.42 %. On Linux the top step was therefore about 2.9 times macOS's brightest, and the bottom fifth of the scale sat below where macOS's line starts.macOS drives the light at 25 kHz. Its levels 0.0625, 0.25, 0.5, 0.75 and 1.0 drive 69, 123, 194, 265 and 336 of 960 cycles, so on = 52 + 284 × level.
pwm-ledsproperties,min-duty-cycle-bpandmax-duty-cycle-bp, in basis points of the period. Brightness b > 0 gives min + (max − min) × b / max-brightness, and 0 stays off. Without the properties, nothing changes.default-state = "keep"reads back on the same scale.t8132-laptop.dtsiand gives the J604 542..3500, so brightness 0..255 follows macOS's line and 255 is macOS's top level. The J713 and J715 are unchanged.Checked on top of
integration/aurora7c71d6d:dt_binding_check DT_SCHEMA_FILES=leds/leds-pwm.yamlpassesleds-pwmbuilds with W=1 and no warningsCHECK_DTBS=yfor t8132-j604, -j713 and -j715: the output is identical with and without the series, and the J604 DTB carries 542 / 3500On the J604, the same three patches have run in our kernels since 1.905 (now 1.908). I read the duty back from the PWM on 1.905, unlocked with the display on (MEASURED 2026-11-14): brightness 255 is 14000 of 40000 ns, 35.00 %, the same as macOS. Levels 0.0625, 0.5 and 0.75 give 7.19, 20.21 and 27.50 % (macOS 7.19, 20.21 and 27.60 %). Tested on the J604 only.