[PATCH v2 0/2] Save Brightness on Macs

Atharva Tiwari posted 2 patches 3 weeks, 1 day ago
There is a newer version of this series
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
[PATCH v2 0/2] Save Brightness on Macs
Posted by Atharva Tiwari 3 weeks, 1 day ago
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 v2:
- Saved the brightness only when it is different than the previous boot.

Link to v1:
https://lore.kernel.org/all/20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com/

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

-- 
2.43.0