[Pkg-sysvinit-devel] Backlight level save and restore as a init-script / upstart job for laptops

Nrbrtx nrbrtx at gmail.com
Thu Dec 25 10:29:15 UTC 2014


Dear Debian and Ubuntu developers!

Let me inform you about the problem.
The problem is well described on LaunchPad - see
http://bugs.launchpad.net/bugs/1270579 (21 users affected).

We have had some conversation on other list.

Here I can repeat myself.

I have tested many distros - Arch, OpenSuSe 13.1, Fedora 20, ALT Linux p7,
Sabayon, Mageia 4.
Many of them are based on systemd.
It does not matter what init system they use, but all of them have very
useful script (or binary program, I don't know) for saving and restoring
backlight level on laptop.

In these distros there is a script for save and restore backlight levels
for two video-cards (acpi_video0 and acpi_video1). During system boot it is
indicated as follows:

[ OK ] Started Load/Save Screen Backlight Brightness of acpi_video1.
[ OK ] Started Load/Save Screen Backlight Brightness of acpi_video0.

I have a draft version, which works normally on my VAIO F13Z1R laptop with
Ubuntu 12.04.4. It is in attachment.
You can use it unmodified or modify it for compatibility or something. I
made symlinks for it:

ln -s /etc/init.d/brightness /etc/rc0.d/S25backlight
ln -s /etc/init.d/brightness /etc/rcS.d/S25backlight
ln -s /etc/init.d/brightness /etc/rc6.d/S25backlight

For details you can read my comment on askubuntu (
http://askubuntu.com/a/227553/66509).

I think that having a script for saving and restoring backlight level is
very useful for laptop Ubuntu users.
So, please, add such init script to default Debian and Ubuntu installation.
Thank you!

With best regards,
Debian and Ubuntu user,
Norbert.



---------- Forwarded message ----------
From: Nrbrtx <nrbrtx at gmail.com>
Date: Thu, Dec 25, 2014 at 12:53 AM
Subject: Re: Backlight level save and restore as a init-script / upstart
job for laptops
To: Petter Reinholdtsen <pere at debian.org>
Cc: vorlon at debian.org, Scott James Remnant <scott at netsplit.com>,
james.hunt at ubuntu.com, devel at lists.alioth.debian.org, hmh at debian.org,
kel at otaku42.de, rleigh at debian.org, zigo at debian.org,
ubuntu-devel-discuss at lists.ubuntu.com


Dear Petter!

Thank you for reply.

Here is a list:

   - in Arch backlight brightness load and save are provided by systemd
   (see Arch wiki
   <https://wiki.archlinux.org/index.php/backlight#systemd-backlight_service>),
   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
   <http://pkgs.org/search//usr/lib/systemd/systemd-backlight?type=files>
   - 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
   <https://packages.debian.org/search?suite=jessie&arch=any&mode=path&searchon=contents&keywords=systemd-backlight>
   and Debian sid
   <https://packages.debian.org/search?suite=sid&arch=any&mode=path&searchon=contents&keywords=systemd-backlight>
   there is /usr/lib/systemd/systemd-backlight service
   - in Ubuntu Utopic
   <http://packages.ubuntu.com/search?searchon=contents&keywords=systemd-backlight&mode=filename&suite=utopic&arch=any>
   and Ubuntu Vivid
   <http://packages.ubuntu.com/search?searchon=contents&keywords=systemd-backlight&mode=filename&suite=vivid&arch=any>
   there is /usr/lib/systemd/systemd-backlight service

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

   - 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
<http://www.freedesktop.org/software/systemd/man/systemd-backlight@.service.html>,
but older systems does not have this functionality at all.
For older (but supported) systems one can use my script with symlinks (may
be with some files in /etc/pm/). I mean Debian 6, 7 and Ubuntu 12.04, 14.04.

If you have any suggestions and recommendations - I'm ready to hear.
What you and other developers think?

With best regards,
Norbert.

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.

On Tue, Dec 23, 2014 at 12:44 PM, Petter Reinholdtsen <pere at debian.org>
wrote:

> [Nrbrtx]
> > I have tested many distros - Arch, OpenSuSe 13.1, Fedora 20, ALT Linux
> p7,
> > Sabayon, Mageia 4.
> > Many of them are based on systemd.
> > It does not matter what init system they use, but all of them have very
> > useful script (or binary program, I don't know) for saving and restoring
> > backlight level on laptop.
> >
> > In these distros there is a script for save and restore backlight levels
> > for two video-cards (acpi_video0 and acpi_video1). During system boot it
> is
> > indicated as follows:
>
> While this seem like a useful feature, it can only be implemented once
> it is decided which package should take resposibility for it.  In which
> package is this handled byArch, OpenSuSe 13.1, Fedora 20, ALT Linux p7,
> Sabayon and Mageia 4?  Can you check, as you haveaccess to these
> already?  I do not.  Knowing this might give an idea where to fix it in
> Debian and Ubuntu. :)
>
> I do not expect to have time to work on this myself any time soon, but
> hope someone will. :)
>
> --
> Happy hacking
> Petter Reinholdtsen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20141225/72969539/attachment.html>


More information about the Pkg-sysvinit-devel mailing list