From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 351413DE42C; Wed, 6 May 2026 07:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778053621; cv=none; b=e6r+yRpiIjRl4JTBtVk3heF09uC0DI/CtxEU1GOkSIRmdYR4EgZUxRxI+dThB54m88K5OG9V3g7JceB/nWpKDlhvIzgKBCsBQAK7r2NRZmTBMKdeyEbsXwd6YZnLOAWkGE828aLTye+J6/lCibFNG38QMT/lbaezGG28N3BQm6c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778053621; c=relaxed/simple; bh=x0lbYvLCfjiGJXltv0N3gQU5RyimP+OMXsEN73ZE9bk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MxuDjyU7E5BLUEOyspgZeS06e9FEhOH6J7GmjsVijLsvOjVGRLDrRNk8j+QtIz1ZPSI7yYI3V8LvIlBZnLDQ873ayaYY217PN+bpUvr3y599izPJxV3m0NjBLGKKGw2leAw138o2ej5ctLj1qi/KR2Du7rxe5a1tVdkOdutaBz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=psdv8u8z; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="psdv8u8z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1778053610; x=1778658410; i=w_armin@gmx.de; bh=nozYKYXOWaYrdGXZ6qq6b+Nj4+DcUSMnEFSPjIjblqA=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=psdv8u8zLV1cG//+xKVLV1VkJHwc+r29zrmGeJpDyIiqazhvfi2c+2sXs2eDiheX YePKXFfXBXWkbUGpMGTHHQcQDNXx0+uub0dIXPUevEBOUfWuAsGutvzDJtWBpzdD9 nuUd81KbQyyYZBwPvylEFAUsret7q90/etxkUPf72KQlO/UVnIsqppME7HM0ptFW/ iK5hRlN843FgiybzXne7nD+Wg26ntCWRMDdPliplBniZ3IAnpSq402LJ1FAMXgNs4 XyFUc/2hrfjCeHceyNybunXcRu8tTLs8d42hSnDEycQl3gnRtPldOx1vSLQzyNl7O IAu1FxEW3+LacCNshA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from client.hidden.invalid by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXGr8-1vnyeC25xm-00L8Rq; Wed, 06 May 2026 09:46:50 +0200 Message-ID: <8542a7cd-2be7-4c51-b843-658d312ad1c8@gmx.de> Date: Wed, 6 May 2026 09:46:49 +0200 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Plan to fix nvidia_wmi_ec backlight issues, help wanted To: Daniel Dadap , Hans de Goede Cc: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , "Rafael J. Wysocki" , "dri-devel@lists.freedesktop.org" , linux-fbdev@vger.kernel.org, linux-acpi , "platform-driver-x86@vger.kernel.org" References: Content-Language: en-US From: Armin Wolf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:WbZ1P23ppBRf9xFe+duDwYpfBqmwaq1aRDIkXYEd9ibNBEGgiHG PRRjiQYyt70971iUoN5M1dvnP9+vGTP1trxqRPMokJH0ZiVd6gUB2XxQRLSY0c+rNqS64fY QAWID+f8IzA+81wvlKkgs4WJ4XC21vgK/fBQkp4NTadmtMg6IDn6P5DBx7rBGmQMqXYYsPi fDdBbB9i/0Nb70vyTsxoQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5yi0TzAPTQw=;QdsK3UZ82g6w3wAQRi2ATNtMrcG GSG6II+/fyi/8wWaQjKHn9BoAexJj3auLPD0xvTMsI0zAl8Kvh0ZQW2vh0RsVM0MoX1vfWd60 KWDGL8NG6Mn3liZk9nl/LMCG9YU1J+6HXVrRGWK0bHqSlwRJjbuuqjpWrlL1WU/rnlBrrVPfd 4uv5awM5Ql9lf2Gr5nQ7OZOm8sFl65Zc1CigKEEfhL2tE+3S6d2E6Fp8eV6seQyjoB4BGtfiw 4R5aZu6TDhySEzhMtH2WUU0yy04Z90IQ/3HnOwjXBmYnZeDvbKw6chB7uEWD64JlFXGzEr8Db 5DR3W9wyCEvMYD9PObta1dvCdq6MaC5sZ7qQW4/WdFMTSzFc+g0zgCdo+KjwMrlzCI0YoJvRz nm02LJZpwpijOAsf3u2wW73xLcn5Uy8JLBsLvEwXkVdbrQ1HA3zGFXvNsjJIynJdKtDAon4z3 IcLLWXMjrso/y9309RbJRhfo8ZnyIU9lwAwhMLuBWhU3OZV0SXmt69m1PrRWUDdKqIHRLrsyj 8fuHg53+OMbfBEbtQfTE2sTaTV8BapZ+QlJ8EjCDRJoBu/POeW1thiJFNLVN1QWkffz3RaOOE F2ky+zDfk7Hdz2dEaFVJHGj3rK9AG//56LIYtRoRL6OWU1d3kbWHrM5jSx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r6rL4TjLwVPDQBf4ZCCne7lnKdf8h/p93joQWvuc3wSRPoagHbPM/eBj6 yWkAjjSVIyB4iB15jKvAhVE4KBObIxeEBIEDUptoLnUu4FZjeWzyS907mKsxplpf9KPO94BSW 1aGRwuFgtjiGxCZLDfseU02y2TXZmLjTAKq5q1BbzApnwBwgxa7XOoNymYoDwdv80xeTZiD6E LJpOTjG1ORjj5MJfhd3ULT/Bsuqd9+ZS+Oy3At0mfp5tbgMfx+RqzANcfUk8NCuh7wRYzqna4 L8Z5jNk09QECH5uQ8U4houRRdXtQuI/pQMN/Nu5bB5ZGIEnvM+f9ktunrFsp9uSxoX+S3mZpK iuRO+wm4AQsyIHsjx+OBeBfjz0W0votEH1p2eZdAsW4jIN/+jJKXt6gX6ip7mCFltkn9XmbRS fTzuXEWq0H3IwXCNWxWnUWzBgRrbAqT63wr/12opIC+nWsCGpoxzcubkbUFpPNPrJFbk+6d9R +cJuzkNhf+bc1GXinhzUkuTwSuzHvmjOZgy5oOjTwTXFQ0BPKTirEghE2YhQ6nX+kkeRWd0Gq u04N5Zjzj2QTSiJHrkS94HjfEP7iXWb4WnZ7a0/QX3EGSSQTporH57uKt3A58cPsLnuDwSFxb JzxUtKWO5m0ZPLtKzIv40kCqeCPwNwRhbqDSgQ33Zc+eVqc/C9bHJPT9n9YQcZ4SS5hTL/QDO 4tu61SyVipPv4QG0Ko6v8JYxxUc= Am 05.05.26 um 17:51 schrieb Daniel Dadap: > Thanks, Hans - >=20 > On Tue, May 05, 2026 at 11:52:55AM +0200, Hans de Goede wrote: >> >> >> Hi All, >> >> A while ago Nvidia introduced a new Nvidia specific firmware method >> for controlling the backlight on laptops with runtime switchable >> Nvidia hybrid graphics. >> >> This is supported through the nvidia-wmi-ec-backlight driver, but has >> never worked 100%. >> >> The new WMI firmware interface has a method to ask the firmware if >> the backlight is controlled though the EC and this the new WMI interfac= e >> should be used; or if it is directly controlled by the GPU and the GPU >> driver's native backlight support should be used. >> >> There are several bugs in the implementation of this on various laptops= : >> >> 1. The method to get the backlight control source sometimes does not >> report the correct value. >> >> 2. On some laptop models which method (native-gpu vs nvidia-wmi) works >> changes at runtime, e.g. when plugging in a charger. >> >> Known affected laptop models/bug reports about this: >> - Acer Predator PH315-55: needs acpi_backlight=3Dnative >> - Dell G15 5515 with RTX 3050: *needs* acpi_backlight=3Dnative >> - Dell G15 5515 with RTX 3060: *breaks* with acpi_backlight=3Dnative >> - Lenovo Legion Slim 7 2021 >> - https://bugzilla.kernel.org/show_bug.cgi?id=3D217026 >> - https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/work_items/784 >> - https://gitlab.freedesktop.org/drm/amd/-/issues/4512 >> - https://bugzilla.suse.com/show_bug.cgi?id=3D1217750 >=20 > I believe there were also a couple of cases where different builds of th= e > same notebook (as far as DMI quirks tables could detect) would be driven > by different methods, exacerbating problem (1) because adding a quirtk t= o > fix one notebook would break other versions of the "same" notebook. (Oh, > maybe that's the two G15 5515 bugs linked above.) >=20 >> >> It turns out that under Windows both a WMI backlight driver and a GPU >> native backlight driver get installed and Windows simply always calls >> both when the backlight changes working around these kind of firmware >> bugs. >> >=20 > Yes, it's frustrating that so many notebooks have implementations of thi= s > interface that have bugs that get masked by Windows always using both of > the interfaces. I wonder whether Windows behaves this way because bugs o= f > this type are so prevalent, or if the bugs are prevalent because Windows > always behaved that way so nobody noticed. I suspect that both scenarios apply :( That being said, i am asking myself if "both interfaces" also includes=20 the backlight interface from the iGPU. If not then we could simply use a= =20 notifier to dynamically tie the WMI device to the Nvidia GPU backlight=20 interface. >> When this first came up, about 2 years ago, I came up with the below >> plan to fix this. Nvidia was supposed to work in implementing this, >> but so far an implementation of this plan has not happened. >> >> Note I do not have time to work on this myself. I'm posting this here >> in the hope that either Nvidia will pick this up after all; or that >> someone else can make this happen. >> >> I'm more then happy to help answering any questions which may come up >> while implementing this; and to review the resulting patches. >> >=20 > Sorry about that - I totally forgot about this proposal. I'm still happy > to help here, although if someone else is especially eager to implement > these changes, I'm also happy to answer questions, test, review, and hel= p > in other ways as bandwidth allows. I have some clarifying questions abou= t > the plan - it's been some time since we talked about this, so I apologiz= e > if I've already asked these questions and you've already answered them. > =20 >> >> The plan >> =3D=3D=3D=3D=3D=3D=3D=3D >> >> 1. Modify the core backlight code to allow registering a backlight-devi= ce >> for in kernel use only, disabling the registering of a class device und= er >> /sys/class/backlight . >> >> 2. Add a new backlight-aggregate.c backlight driver, which exports a >> devm_backlight_aggregate_register_or_add() function. Drivers can call >> this passing in an existing backlight-device (with its sysfs interface >> disabled). This either creates a singleton /sys/class/backlight/aggrega= te >> device, or adds the passed in backlight to the existing singleton insta= nce >> if it already exists. >> >> This new driver always exposes a range of 0-255 to userspace. This acts >> as a proxie for any backlight-devices registered to be part of >> the aggregate, forwarding any brightness set calls to all backlights, >> scaled to their actual range. For reads this will report the last set >> brightness value (starting with the value of the first registered >> backlight-device). >> >> 3. Add a new nvidia_wmi_ec_and_native type to drivers/acpi/video_detect= .c >> for both DMI quirks and commandline handling. >> >=20 > So by default both the native and GPU drivers would register a "normal" > backlight handler, and if the "both" quirk is set (or if requested via > kernel command line) they'll register with the aggregate device? >=20 > Would it make sense to make this more generic, with a parameter which > can be set via command line or quirks for which backlight devices to > aggregate? And then maybe instead of a new "nvidia_wmi_ec_and_native" > backlight type in video_detect.c, it could be called "aggregate" or > something else along those lines, used in combination with the list of > backlight types to aggregate. >=20 > Have we seen systems where both the iGPU and dGPU register their own > native handlers? I vaguely recall seeing such a system, but I do not > keep careful notes about this sort of thing, so I'm not certain. If > there are indeed such systems, then "native" might not be specific > enough, and it may be necessary to explicitly name backlight drivers > individually in order to aggregate them. >> >> 4. Modify acpi_video_backlight_use_native() to also return true if >> the __acpi_video_get_backlight_type() call there returns the new >> acpi_backlight_nvidia_wmi_ec_and_native. >=20 >> 5. Add a new devm_backlight_device_register_native() helper which >> calls __acpi_video_get_backlight_type(true, NULL) and if that returns >> the new nvidia_wmi_ec_and_native type then registers the passed in >> backlight with the flag to not register a sysfs class interface and >> then on success calls the new devm_backlight_aggregate_register_or_add(= ) >> with the just registered backlight device; and if the returned type >> instead is acpi_backlight_native register the passed in backlight >> normally through devm_backlight_device_register() >> >> 5. Modify the i915 and amdgpu drivers to use the new >> devm_backlight_device_register_native() helper. Since this new helper >> checks the backlight-type itself, drop acpi_video_backlight_use_native(= ) >> checks *if* the registration is the only thing guarded by that check. >> >> 6. drivers/platform/x86/nvidia-wmi-ec-backlight.c to not return >> early from probe when acpi_video_get_backlight_type() returns >> the new nvidia_wmi_ec_and_native type and for that type make it >> registers its backlight with the flag to not register a sysfs class >> interface and then on success calls the new >> devm_backlight_aggregate_register_or_add(). >> >=20 > There still isn't anything tying a particular sysfs backlight interface > node to a specific display panel, right? Is there a plan to eventually > support this? How would this interact with that plan? I'm just a little > worried about designing ourselves into a corner that makes things harder > to untangle individual devices later if the need arises. Good point. I think it would be better if the GPU drivers themself=20 figure out if a given DRM connector belongs to the internal panel. They could then register with a notifier that notifies the WMI driver=20 whenever the "official" backlight interface was changed to update the EC= =20 state as needed. If only the Nvidia GPU is supposed to interact with this WMI device,=20 then we could implement this as a private interface inside nova/noveau.=20 Otherwise we might need to come up with a more generic API. Thanks, Armin Wolf >> Regards, >> >> Hans >> >=20