Repository navigation
Conversation
chriskearney
left a comment
There was a problem hiding this comment.
Reviewed 70c122ce2677885e8ae3d44aa1fe84b7fcd55fa2. The fallback obtains period/polarity from the PWM arguments while retaining KEEP, so probe still skips the call that would apply zero duty. I found no source blocker in that change. The reported brightness can remain zero until userspace writes a value; that differs from turning the hardware output off.
Native ARM64 package build passes for this head and the base control with the same recipe/toolchain. I independently checked the as-built pin and packaged config: CONFIG_LEDS_PWM=y, so the changed driver is compiled in.
No J313 boot test yet. The remaining hardware check is output retention through probe followed by normal brightness control; suspend restoration is a separate change in #221.
|
Tested The tester reported 38 pass, 9 fail and 26 skip, with no functional regressions against the installed-kernel reference. Two additional lab-only failures are the expected installed-package/boot-chain checks for a temporary kernel. The remaining failures were already present. This verifies the brightness interface and readback; it does not measure physical light output or demonstrate a previously failing probe condition. No suspend/resume test ran. The machine returned to its installed |
|
Tested on a J313 (M1 Air): works, no regressions found.
All lab tests passed, including the device suspend phase and omarchy-m-test with no regressions against the installed kernel. The How this was tested
|
Apple FPWM comes out of reset with ON_CYCLES and OFF_CYCLES both zero. pwm-apple get_state reports that as period 0. leds-pwm, on default-state = "keep", treats a zero period as a failed read, switches to off, and applies duty 0. On J313 the keyboard backlight is that device: fpwm1 channel 0, pwms = <&fpwm1 0 40000>, default-state = "keep". Every boot logs leds_pwm led-controller: failed to read period for kbd_backlight, default to off and probe programs a 0% waveform before systemd-backlight can restore the saved level. The period in the pwms cell is already in pwm->args by the time led_pwm_add() runs. When the hardware period is 0 and that args period is not, keep the args period for later brightness updates and do not apply a duty of 0. Apply off only when there is still no period to use. The fpwm1 suspend power-state failure is a separate bug and is not touched here. Signed-off-by: Lucas Goossen <lucas.goossen@hey.com>
70c122c to
7cd67b0
Compare
|
Follow-up: confirmed by eye on the Mac. Watching the keyboard during boot, the backlight went dark only while the Mac was powered off. It lit early in boot and didn't go dark again; dmesg shows How this was tested
|
leds-pwm treated a zero PWM period readback, with default-state "keep", as a failed read and then applied duty 0. On Apple FPWM that readback is the reset value (ON_CYCLES and OFF_CYCLES both zero). The period from the pwms cell is already in pwm->args.
When the hardware period is 0 and the args period is not, keep that period for later brightness updates and leave the output unchanged. Apply off only when there is still no period to use.
This is the keyboard backlight on a MacBook Air M1 2020 (J313): fpwm1 channel 0, pwms period 40000 ns, default-state = "keep". Probe was logging "failed to read period for kbd_backlight, default to off" and forcing the LED off before systemd-backlight restored the saved level.
The fpwm1 suspend power-state failure is a separate bug and is not changed here.
Session build, Monday 26 Oct 2026 05:02 PM -03: linux-aurora 7.2.11-6-2-ARCH (package 7.2.11.aurora6-2), branch local/j313-test at 7638df0. makepkg exited 0. rustc 1.85.0, LLVM/clang 18.1.8. This machine is running that kernel. The stacked commit compiled in was 066a421. This pull request's head is 7cd67b0, which is not the commit that was built.
The new probe message appears at boot. malik-na confirmed the keyboard backlight lit early in boot and stayed lit.