Display backlight level save and restore as a init-script / upstart job for laptops

Nrbrtx nrbrtx at gmail.com
Sat Jan 10 18:24:52 UTC 2015

Dear Ubuntu and Debian developers!

I understand that you are very busy, but laptop users have problems
with saving and restoring display backlight level in Debian and Ubuntu.

Systemd-based distros (Fedora, OpenSuSe, Arch, Sabayon, Mageia) have this
functionality out the box (they have systemd-backlight at .service
but sysvinit and upstart not.

Here is a list:

   - in Arch backlight brightness load and save are provided by systemd
   (see Arch wiki
   it is in systemd
   <https://www.archlinux.org/packages/core/x86_64/systemd/> package.
   - in OpenSUSE 13.1, OpenSUSE 13.2, CentOS 7, Fedora 20, Fedora 21,
   Mageia 4 - systemd package
   - Sabayon has /usr/lib/systemd/systemd-backlight service
   - ALT Linux p7 has systemd, but does not have /usr/lib/systemd/systemd-
   backlight service
   - in Debian Jessie
   and Debian sid
   there is /usr/lib/systemd/systemd-backlight service
   - in Ubuntu Utopic
   and Ubuntu Vivid
   there is /usr/lib/systemd/systemd-backlight service

There is no backlight load/save functionality in (neither upstart nor

   - Ubuntu Lucid
   - Ubuntu Precise
   - Ubuntu Trusty
   - Debian Wheezy
   - Debian Squeeze

So it seems that modern distros have backlight load/save functionality via
systemd-backlight service
but older systems does not have this functionality at all.

This problem is well-described on launchpad (see bug 1270579
<http://bugs.launchpad.net/bugs/1270579> ) and on
AskUbuntu (see my comment
on it). Around 160 users are affected.

Steps to reproduce:
1. User boots laptop (cold boot, not wake from suspend)
2. User sets comfortable backlight level
3. User ends his/her work by shutting down the laptop (not suspend, so
backlight level is not saved)
4. Go to 1 (another cold boot with resetted backlight level).

I prepared draft version for saving and restoring display backlight level
on laptops - it is saved on launchpad (upstart_brightness.tar.gz archive
, see comment #18 on launchpad
and may be installed to the system manually with
     sudo tar -zxvf upstart_brightness.tar.gz -C /

My script was tested on Ubuntu 12.04 and Ubuntu 14.04 - see reports on
and forum.ubuntu.ru <http://forum.ubuntu.ru/index.php?topic=255145.0;all>
on laptops with discrete, integrated and hybrid graphics card.

Please reply to this message if you are interested in such init-script.

Thank you!

With best regards,
Debian and Ubuntu user,

P.S. I found interesting projects for the same purpose - first is named
Light and hosted on GitHub <https://github.com/haikarainen/light>
(previously known as LightScript
<http://haikarainen.dotgeek.org/lightscript/>), second is named Relight
<http://xyne.archlinux.ca/projects/relight/>. But I think that init-script
approach is better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20150110/a43ab431/attachment.html>

More information about the Ubuntu-devel-discuss mailing list