Laptop display stays dimmed after unblanking screen under wayland
Debian unstable, gnome-settings-daemon-3.38.1-1, Wayland session
On a ThinkPad X220, I have GNOME set to dim the screen when inactive, with blank screen enabled.
When the screen is blanked after inactivity (display turns off), interacting with the laptop turns on the screen but does not return the brightness level to its previous state. (It stays dimmed and the brightness slider does not match the brightness level of the display.)
The user would have to adjust the brightness each time the laptop screen is blanked or connect the laptop to power, to free the display from the dimmed state.
This is reproducible when using GNOME under Wayland and on battery power with "Dim Screen When Inactive" enabled. This does not happen when plugged in. I have not been able to reproduce this bug when running a gnome session under Xorg.
I have found that commenting out manager->pre_dim_brightness = -1;
in line 1671 of plugins/power/gsd-power-manager.c helps, but it takes the display 15 seconds to resume to pre_dim_brightness. Is this due to async handling?
I also can't reproduce this bug on a late 2008 MacBook, so not all laptops may be affected. (Maybe due to power management differences?)