Switching from my X session to tty* sets actual_screen backlight to 0 even though brightness is not changed and is equal to max_brightness. Writing again the value of max_brightness to brightness immediately raises the screen backlight to the right value. On boot, the brightness is correct until an X session is started. The cause is 6dda730e55f412a6dfb181cae6784822ba463847 (drm/i915: respect the VBT minimum backlight brightness), reverting it fixes the problem. lspci: 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
The problem seems to be that when the panel is disabled, the actual brightness is set to 0, but right after that is set to backlight.min along with backlight.level, probably because of intel_backlight_device_update_status(). When the panel is enabled, backlight.level is compared against 0 in intel_panel_enable_backlight(), so the actual brightness is not changed since the current level is not 0, but backlight.min.
1) Please attach dmesg with drm.debug=0xe module param set all the way from boot to the problem. 2) Please try this patch: diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 59b028f0b1e8..ad2bbf1ae090 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -946,7 +946,8 @@ void intel_panel_enable_backlight(struct intel_connector *connector) WARN_ON(panel->backlight.max == 0); - if (panel->backlight.level == 0) { + if (panel->backlight.level == 0 || + panel->backlight.level < panel->backlight.min) { panel->backlight.level = panel->backlight.max; if (panel->backlight.device) panel->backlight.device->props.brightness =
Created attachment 148021 [details] dmesg with drm.debug=0xe 1) 29.866760 is when I switched back to my X session, the bug happens right before that. 2) It doesn't work. The following works: diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 59b028f..10f6ecd 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -946,7 +946,8 @@ void intel_panel_enable_backlight(struct intel_connector *connector) WARN_ON(panel->backlight.max == 0); - if (panel->backlight.level == 0) { + if (panel->backlight.level == 0 || + panel->backlight.level <= panel->backlight.min) { panel->backlight.level = panel->backlight.max; if (panel->backlight.device) panel->backlight.device->props.brightness =
I'm currently using 3.18-rc1 and one of the changes fixed the problem (I didn't try 3.17). Closing this.