Page MenuHomeFreeBSD

backlight(9): Emit brightness changes via devd(8)
AcceptedPublic

Authored by lme on Jun 20 2026, 5:13 PM.
Tags
None
Referenced Files
F166625813: D57715.diff
Fri, Aug 14, 11:42 PM
Unknown Object (File)
Thu, Aug 13, 12:43 AM
Unknown Object (File)
Wed, Aug 12, 12:49 AM
Unknown Object (File)
Mon, Aug 10, 6:48 AM
Unknown Object (File)
Sun, Aug 9, 7:58 PM
Unknown Object (File)
Sat, Aug 8, 10:51 AM
Unknown Object (File)
Sat, Aug 8, 5:11 AM
Unknown Object (File)
Sat, Aug 8, 2:26 AM
Subscribers

Details

Reviewers
imp
manu
bcr
Summary

Teach backlight(9) to send brightness changes to devd(8), so one does
not need to poll for changes with backlight(8).

Output format:

!system=brightness subsystem=backlight0 type=change notify=42
Test Plan
  • build a kernel
  • run cat /var/run/devd.seqpacket.pipe | grep brightness
  • change the background brightness using backlight(8)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lme requested review of this revision.Jun 20 2026, 5:13 PM
bcr added a subscriber: bcr.

OK from manpages. Make sure to bump the .Dd to the date when you commit it.

This revision is now accepted and ready to land.Jun 20 2026, 7:54 PM
imp added inline comments.
sys/dev/backlight/backlight.c
88

So why not use device_get_nameunit(sc->dev) here?

sys/dev/backlight/backlight.c
88

So why not use device_get_nameunit(sc->dev) here?

It's weird. When I change it to

devctl_notify("brightness", device_get_nameunit(sc->dev),
    "change", notify_buf);

I get drmn0 and not backlight0 as value for subsystem.

!system=brightness subsystem=drmn0 type=change notify=19