[RESOLVED] Even lower screen brightness?

Even if it is a hardware problem it would be great to have a native software solution from Framework. The lowest brightness on the laptop is higher than my monitor at 50% brightness. I avoid using the laptop past 19:00 because of that.

Marking something as solved without a solution is quite upsetting.

2 Likes

I tested this again, and while sending a PWM signal of 0 to the GPU does not completely turn off the display, it is still considerably less bright than by default.

You can test this with the following patch

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
index ad9aca790dd7..42f1f476ec67 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
@@ -521,12 +521,18 @@ bool edp_set_backlight_level(const struct dc_link *link,
                uint32_t backlight_pwm_u16_16,
                uint32_t frame_ramp)
 {
+       static bool force_real_zero;
        struct dc  *dc = link->ctx->dc;
 
        DC_LOGGER_INIT(link->ctx->logger);
        DC_LOG_BACKLIGHT("New Backlight level: %d (0x%X)\n",
                        backlight_pwm_u16_16, backlight_pwm_u16_16);
 
+       if (force_real_zero && backlight_pwm_u16_16 < 5000)
+               backlight_pwm_u16_16 = 0;
+       force_real_zero = !force_real_zero;
+
+
        if (dc_is_embedded_signal(link->connector_signal)) {
                struct pipe_ctx *pipe_ctx = get_pipe_from_link(link);

And then repeatedly do echo 0 > /sys/class/backlight/amdgpu_bl1/brightness and observe the different brightness levels.

For a “permanent” “fix” use this:

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 7099ff9cf8c5..6e463e5860e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -383,6 +383,9 @@ static int amdgpu_atif_query_backlight_caps(struct amdgpu_atif *atif)
                        characteristics.min_input_signal;
        atif->backlight_caps.max_input_signal =
                        characteristics.max_input_signal;
+
+       /* Framework Firmware returns "12" by default. */
+       atif->backlight_caps.min_input_signal = 0;
 out:
        kfree(info);
        return err;

This is just some constant in the Firmware which should be easily changable for Framework.
(I don’t see a way to easily override this as a user)

Only tested on a matte panel.

5 Likes

Can confirm that using that kernel driver patch to force override the minimum value provided by the firmware makes it much better. With that, it’s now much more inline with expectations.

Left: framework 16
Right: thinkpad e595

with patch:

without patch:

4 Likes

I would like to experiment with this patch. Could you or @Thomas_Weissschuh point me in the direction of how to compile (?) the modified amdgpu driver and configure my system to use it? What are the keywords I should search for?

I am running Fedora 39.

@gaben

This should work: Building a Custom Kernel :: Fedora Docs

But further than that I have no clue about Fedora.

I sent a quirk to the kernel: [PATCH] drm/amd: force min_input_signal to 0 on Framework AMD 13/16 - Thomas Weißschuh
Let’s see if it can be made to work out of the box.

5 Likes

Shouldn’t this just be enabled for the default matte panel? And not for the glossy panel and the new, recently launched panel?

Aside from that, I suppose a Framework firmware patch would be the best long-term solution?

Depends on what it does on those panels.
Somebody would need to test it.

Yes.