Matthew Garrett
2022-Oct-27 09:52 UTC
[Nouveau] [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)
On Thu, Oct 27, 2022 at 11:39:38AM +0200, Hans de Goede wrote:> The *only* behavior which actually is new in 6.1 is the native GPU > drivers now doing the equivalent of: > > if (acpi_video_get_backlight_type() != acpi_backlight_native) > return; > > In their backlight register paths (i), which is causing the native > backlight to disappear on your custom laptop setup and on Chromebooks > (with the Chromebooks case being already solved I hope.).It's causing the backlight control to vanish on any machine that isn't ((acpi_video || vendor interface) || !acpi). Most machines that fall into that are either weird or Chromebooks or old, but there are machines that fall into that. (I wrote https://mjg59.livejournal.com/127103.html over 12 years ago, so please do assume that I'm familiar with the complexities here :) )> I agree this is a possible solution if this turns out to break more > systems and there is no other easy/clean way to fix those. But I would > greatly prefer to keep this change and stop the IMHO bad kernel behavior > of "registering multiple backlight-devices for a single panel and then > let userspace sort it out".If we're not able to make a correct policy decision in the kernel then punting it to userland seems like the right thing to do? The kernel absolutely *should* make the right decision where it has enough information to do so, but in this case the code that's making that decision doesn't have the full set of information.
Hans de Goede
2022-Oct-27 10:37 UTC
[Nouveau] [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)
Hi, On 10/27/22 11:52, Matthew Garrett wrote:> On Thu, Oct 27, 2022 at 11:39:38AM +0200, Hans de Goede wrote: > >> The *only* behavior which actually is new in 6.1 is the native GPU >> drivers now doing the equivalent of: >> >> if (acpi_video_get_backlight_type() != acpi_backlight_native) >> return; >> >> In their backlight register paths (i), which is causing the native >> backlight to disappear on your custom laptop setup and on Chromebooks >> (with the Chromebooks case being already solved I hope.). > > It's causing the backlight control to vanish on any machine that isn't > ((acpi_video || vendor interface) || !acpi). Most machines that fall > into that are either weird or Chromebooks or old, but there are machines > that fall into that.I acknowledge that their are machines that fall into this category, but I expect / hope there to be so few of them that we can just DMI quirk our way out if this. I believe the old group to be small because: 1. Generally speaking the "native" control method is usually not present on the really old (pre ACPI video spec) mobile GPUs. 2. On most old laptops I would still expect there to be a vendor interface too, and if both get registered standard desktop environments will prefer the vendor one, so then we need a native DMI quirk to disable the vendor interface anyways and we already have a bunch of those, so some laptops in this group are already covered by DMI quirks. And a fix for the Chromebook case is already in Linus' tree, which just leaves the weird case, of which there will hopefully be only a few. I do share your worry that this might break some machines, but the only way to really find out is to get this code out there I'm afraid. I have just written a blog post asking for people to check if their laptop might be affected; and to report various details to me of their laptop is affected: https://hansdegoede.dreamwidth.org/26548.html Lets wait and see how this goes. If I get (too) many reports then I will send a revert of the addition of the: if (acpi_video_get_backlight_type() != acpi_backlight_native) return; check to the i915 / radeon / amd / nouveau drivers. (And if I only get a couple of reports I will probably just submit DMI quirks for the affected models). Regards, Hans