[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f4409418-bd9e-471e-8a97-5c99481cba51@kernel.org>
Date: Mon, 9 Feb 2026 09:46:44 +0100
From: Hans de Goede <hansg@...nel.org>
To: Lukas Wunner <lukas@...ner.de>
Cc: Atharva Tiwari <atharvatiwarilinuxdev@...il.com>,
Ard Biesheuvel <ardb@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH 1/2] efi: Save Brightness using EFI on Macs
Hi,
On 8-Feb-26 14:16, Lukas Wunner wrote:
> On Sun, Feb 08, 2026 at 11:45:55AM +0100, Hans de Goede wrote:
>> I was already worried about the shutdown approach on v1,
>> but did not say anything since I'm not that familiar
>> with apple hw and other apple code is already doing
>> something similar.
>
> Yes, macOS saves the brightness so that it's persisted across reboots
> and can be set already by the EFI firmware, avoiding a bloom effect
> (brightness change) on handover to the OS. We want to provide the
> same seamless user experience on Linux that users have grown accustomed
> to on macOS, I think that's a reasonable thing to do.
>
>> But writing a non-volatile EFI variable every 300ms is
>> just a very very bad idea.
>
> Agreed. But what do you think about a delayed write when brightness
> is changed, so that brightness is persisted even if the OS crashes?
> Users don't change brightness that often, I can't imagine that it
> amounts to a significantly higher number of writes than if it's
> only done on shutdown.
How about saving the bootup brightness and then on shutdown
compare and store it only if it changed ?
That seems the safest approach. OS crashes should be seldom and
the brightness not getting restored will be the least of a user's
worries if those happen.
Something like this should really be written to minimize
the amount of nvram writes.
It might actually be a good idea to change the existing apply
brightness saving code in the same way.
Regards,
Hans
Powered by blists - more mailing lists