Make minimum screen brightness always be 1

With some drivers, a value of 0 disables the screen backlight completely, which is almost certainly not what the user wanted. The Battery & Brightness widget has logic to handle this and instead make 1 the minimum brightness for screens. But Powerdevil does not, and as a result, the behaviors differ between adjusting the brightness using the widget and using the keyboard's "brightness down" key. This is inconsistent and weird.

This commit unifies the behaviors by adding logic to Powerdevil to match what the widget does.

Arguably this is working around a driver bug, but insisting that all graphics driver bugs be fixed is not practical due to their diversity and frequent regressions. And the Battery & Brightness widget already has such a workaround to prevent users whose graphics drivers don't work as they should from experiencing this issue, so not doing the same here is inconsistent.

BUG: 430439 FIXED-IN: 6.0

@broulik @teams/usability @justinzobel

Edited by Nate Graham

Merge request reports