Skip to content

Save Brightness on Macs

Atharva Tiwari linux-efi lkml platform-driver-x86 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesIn review
  2. v32 patches 1 replySuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches3 repliesSuperseded

Changes in v4 from the cover letter

- Fixed build error, when apple-gmux is compiled without apple-brightness.
- Fix grammatical errors.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2efi: Save Brightness using EFI on Macsdrivers/firmware/efi/Kconfig drivers/firmware/efi/Makefile drivers/firmware/efi/apple-brightness.c +1 more+98 -03 replies
2/2platform/apple-gmux: use apple_brightness to save brightness to EFIdrivers/platform/x86/apple-gmux.c+21 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] Save Brightness on Macs

Currently, when a Mac is rebooted, the display brightness does not reflect the level used during the previous boot. Instead, the brightness is reset to the value last stored by macOS, causing the system to ignore any changes made since that time.

We fix this by writing the brightness value to efivar 'backlight-level' at shutdown only, when it is changed since the last boot.

Changes in v4:
- Fixed build error, when apple-gmux is compiled without apple-brightness.
- Fix grammatical errors.
Changes in v3:
- Fixed a bug, in which apple_brightness_shutdown is still called on non-supported devices.
Changes in v2:
- Saved the brightness only when it is different than the previous boot.

Link to v3:
https://lore.kernel.org/all/[email protected]/
Link to v2:
https://lore.kernel.org/all/[email protected]/
Link to v1:
https://lore.kernel.org/all/[email protected]/

Atharva Tiwari (2):
efi: Save Brightness using EFI on Macs platform/apple-gmux: use apple_brightness to save brightness to EFI

 drivers/firmware/efi/Kconfig                  | 10 +++
 drivers/firmware/efi/Makefile                 |  1 +
 drivers/firmware/efi/apple-brightness.c       | 67 +++++++++++++++++++
 drivers/platform/x86/apple-gmux.c             | 21 ++++++
 .../linux/platform_data/apple-brightness.h    | 20 ++++++
 5 files changed, 119 insertions(+)
 create mode 100644 drivers/firmware/efi/apple-brightness.c
 create mode 100644 include/linux/platform_data/apple-brightness.h
Signature · 1 line
2.43.0