From: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
Cc: "Atharva Tiwari" <atharvatiwarilinuxdev@gmail.com>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: [PATCH v2 0/2] Save Brightness on Macs
Date: Mon, 16 Mar 2026 03:22:40 +0530 [thread overview]
Message-ID: <20260315215302.24087-1-atharvatiwarilinuxdev@gmail.com> (raw)
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
next reply other threads:[~2026-03-15 21:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 21:52 Atharva Tiwari [this message]
2026-03-15 21:52 ` [PATCH v2 1/2] efi: Save Brightness using EFI on Macs Atharva Tiwari
2026-03-15 21:52 ` [PATCH v2 2/2] platform/apple-gmux: use apple_brightness to save brightness to EFI Atharva Tiwari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260315215302.24087-1-atharvatiwarilinuxdev@gmail.com \
--to=atharvatiwarilinuxdev@gmail.com \
--cc=ardb@kernel.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox