zabbly / linux

Linux kernel builds
Other
217 stars 7 forks source link

Monitor regression after 6.10.6 #26

Closed paddylandau closed 3 weeks ago

paddylandau commented 1 month ago

When Ubuntu's kernel was updated from 6.2.0 first to 6.5.0 and then to 6.8.0, it introduced new bugs:

I was delighted when I was pointed to Zabbly, and your 6.10.6 kernel solved both of those problems!

Alas, the first problem (lost brightness control) has returned with Zabbly 6.10.7, 6.10.8, and 6.10.10.

I don't know what information you need to be able to diagnose this. Here's the monitor information:

$ sudo lshw -numeric -C display
  *-display
       description: VGA compatible controller
       product: CometLake-S GT2 [UHD Graphics 630] [8086:9BC5]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
       resources: irq:145 memory:c1000000-c1ffffff memory:d0000000-dfffffff ioport:3000(size=64) memory:c0000-dffff

To clarify, 6.2.0 worked correctly, and 6.5.0 and later lost the screen brightness control.

Zabbly's 6.10.6 worked, and 6.10.7 and later lost the screen brightness control.

Please let me know what else you need.

Thank you

stgraber commented 1 month ago

Is this a DELL system?

stgraber commented 1 month ago

There are 3 backlight related changes between 6.10.6 and 6.10.7 which are supposed to be limited to DELL systems.

commit 4f7a1d0869a85f6dc3be42e132941bf4c6399e96
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Aug 14 21:01:58 2024 +0200

    platform/x86: dell-uart-backlight: Use acpi_video_get_backlight_type()

    commit b5f0943001339c4d324a1af10470ce0bdd79f966 upstream.

    The dell-uart-backlight driver supports backlight control on Dell All In
    One (AIO) models using a backlight controller board connected to an UART.

    In DSDT this uart port will be defined as:

       Name (_HID, "DELL0501")
       Name (_CID, EisaId ("PNP0501")

    Now the first AIO has turned up which has not only the DSDT bits for this,
    but also an actual controller attached to the UART, yet it is not using
    this controller for backlight control.

    Use the acpi_video_get_backlight_type() function from the ACPI video-detect
    code to check if the dell-uart-backlight driver should actually be used.
    This allows reusing the existing ACPI video-detect infra to override
    the backlight control method on the commandline or with DMI quirks.

    Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver")
    Cc: All applicable <stable@vger.kernel.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Link: https://patch.msgid.link/20240814190159.15650-3-hdegoede@redhat.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5a04cc4450f4793760b1a7ced8f05f0f5f64e0a9
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Aug 14 21:01:59 2024 +0200

    ACPI: video: Add backlight=native quirk for Dell OptiPlex 7760 AIO

    commit 5c7bb62cb8f53de71d8ab3d619be22740da0b837 upstream.

    Dell All In One (AIO) models released after 2017 may use a backlight
    controller board connected to an UART.

    In DSDT this uart port will be defined as:

       Name (_HID, "DELL0501")
       Name (_CID, EisaId ("PNP0501")

    The Dell OptiPlex 7760 AIO has an ACPI device for one if its UARTs with
    the above _HID + _CID. Loading the dell-uart-backlight driver shows that
    there actually is a backlight controller board attached to the UART,
    which reports a firmware version of "G&MX01-V15".

    But the backlight controller board does not actually control the backlight
    brightness and the GPU's native backlight control method does work.

    Add a quirk to use the GPU's native backlight control method on this model.

    Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver")
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2303936
    Cc: All applicable <stable@vger.kernel.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Link: https://patch.msgid.link/20240814190159.15650-4-hdegoede@redhat.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 69e3826f3dbfcc395171ec410a49bd347de4cd7e
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Aug 14 21:01:57 2024 +0200

    ACPI: video: Add Dell UART backlight controller detection

    commit cd8e468efb4fb2742e06328a75b282c35c1abf8d upstream.

    Dell All In One (AIO) models released after 2017 use a backlight
    controller board connected to an UART.

    In DSDT this uart port will be defined as:

       Name (_HID, "DELL0501")
       Name (_CID, EisaId ("PNP0501")

    Commit 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver")
    has added support for this, but I neglected to tie this into
    acpi_video_get_backlight_type().

    Now the first AIO has turned up which has not only the DSDT bits for this,
    but also an actual controller attached to the UART, yet it is not using
    this controller for backlight control.

    Add support to acpi_video_get_backlight_type() for a new dell_uart
    backlight type. So that the existing infra to override the backlight
    control method on the commandline or with DMI quirks can be used.

    Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver")
    Cc: All applicable <stable@vger.kernel.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Link: https://patch.msgid.link/20240814190159.15650-2-hdegoede@redhat.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
paddylandau commented 1 month ago

@stgraber — Yes, it is! Specifically, a Dell OptiPlex 5480 AIO All-In-One.

I'm not a programmer, so is there any way that I can test the code that you posted?

stgraber commented 1 month ago

Those changes listed above are likely the cause of your issue rather than a fix for it as they are backlight related changes going from 6.10.6 to 6.10.7.

The author of this series is Hans de Goede <hdegoede@redhat.com>. It may be worth you e-mailing him, letting him know that 6.10.6 worked properly but 6.10.7 doesn't anymore, give him details on the exact machine being used and he may have an idea of a further quirk needed to get this behaving on your system without regressing others.

paddylandau commented 1 month ago

Thank you, Stéphane, I'll do that. And, I'll refer to this bug report in the Ubuntu Launchpad bug report.

jwrdegoede commented 1 month ago

I have submitted a fix for this upstream:

https://lore.kernel.org/linux-acpi/20240918153849.37221-1-hdegoede@redhat.com/

stgraber commented 1 month ago

Excellent, thanks @jwrdegoede!