[systemd-devel] systemd-backlight and backlight level 0

Josh Triplett josh at joshtriplett.org
Wed Mar 5 14:28:55 PST 2014


On Wed, Mar 05, 2014 at 10:21:17PM +0100, David Herrmann wrote:
> On Wed, Mar 5, 2014 at 8:31 PM, Josh Triplett <josh at joshtriplett.org> wrote:
> > On Wed, Mar 05, 2014 at 07:10:51PM +0100, Lennart Poettering wrote:
> >> On Wed, 05.03.14 09:46, Josh Triplett (josh at joshtriplett.org) wrote:
> >> > systemd-backlight saves backlight levels on shutdown, and restores them
> >> > on startup.  However, on some systems, backlight level 0 actually turns
> >> > the backlight *off*; this can potentially make the system unusable.
> >> > Complicating matters, on most systems, nothing pays attention to the
> >> > brightness adjustment keys in text mode.
> >> >
> >> > I'd suggest one or both of the following two changes, to avoid a painful
> >> > failure mode:
> >> >
> >> > - systemd-backlight should avoid saving/restoring a backlight level of
> >> >   0, and have a minimum backlight level.  (Possibly overridable via
> >> >   configuration, for people who *really* want to restore backlight level
> >> >   0.)
> >>
> >> To deal with situations like this there's systemd.restore_state=0 on the
> >> kernel cmdline, see kernel-command-line(7).
> >
> > Yeah, I've seen that one; however, having to reboot the system and
> > change the kernel command line to unbreak it seems less ideal than
> > having the system avoid broken states to begin with.
> 
> I'd expect this to be set on the "recovery boot" option. At I know
> some distros always provide two boot entries and to me this seems like
> the right place to set it.

Not a bad idea, but rather than requiring the addition of an extra
option (or potentially more than one, if other parts of systemd might
want to be more conservative on recovery as well), how about having
systemd-backlight treat "single" as "systemd.restore_state=0"?

- Josh Triplett


More information about the systemd-devel mailing list