123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
- <title>Light by haikarainen</title>
-
- <link rel="stylesheet" href="stylesheets/styles.css">
- <link rel="stylesheet" href="stylesheets/github-light.css">
- <meta name="viewport" content="width=device-width">
- <!--[if lt IE 9]>
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- </head>
- <body>
- <div class="wrapper">
- <header>
- <h1>Light</h1>
- <p>GNU/Linux application to control backlights</p>
-
- <p class="view"><a href="https://github.com/haikarainen/light">View the Project on GitHub <small>haikarainen/light</small></a></p>
-
-
- <ul>
- <li><a href="https://github.com/haikarainen/light/zipball/master">Download <strong>ZIP File</strong></a></li>
- <li><a href="https://github.com/haikarainen/light/tarball/master">Download <strong>TAR Ball</strong></a></li>
- <li><a href="https://github.com/haikarainen/light">View On <strong>GitHub</strong></a></li>
- </ul>
- </header>
- <section>
- <h1>
- <a id="light" class="anchor" href="#light" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Light</h1>
-
- <p>Copyright (C) 2012 - 2014, Fredrik Haikarainen
- This is free software, see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE</p>
-
- <h2>
- <a id="description" class="anchor" href="#description" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Description</h2>
-
- <p>Light is a program to control backlight controllers under GNU/Linux, it is the successor of lightscript, which was a bash script with the same purpose, and tries to maintain the same functionality.</p>
-
- <h2>
- <a id="features" class="anchor" href="#features" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Features</h2>
-
- <ul>
- <li>Works excellent where other software have been proven unusable or problematic, thanks to how it operates internally and the fact that it does not rely on X.</li>
- <li>Can automatically figure out the best controller to use, making full use of underlying hardware.</li>
- <li>Possibility to set a minimum brightness value, as some controllers set the screen to be pitch black at a vaĺue of 0 (or higher).</li>
- </ul>
-
- <h2>
- <a id="installation" class="anchor" href="#installation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Installation</h2>
-
- <h3>
- <a id="arch-linux" class="anchor" href="#arch-linux" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Arch Linux</h3>
-
- <p>If you run Arch Linux, there exists 2 packages;</p>
-
- <ul>
- <li>
- <a href="https://aur.archlinux.org/packages/light-git">light-git</a> - For the absolutely latest version</li>
- <li>
- <a href="https://aur.archlinux.org/packages/light">light</a> - For the latest tagged release</li>
- </ul>
-
- <p>I recommend you go with light-git as you might miss important features and bugfixes if you do not.</p>
-
- <h3>
- <a id="manual" class="anchor" href="#manual" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Manual</h3>
- <p>We recommended downloading a versioned tarball from the relases page
- on GitHub. Download and untar the archive:
- </p>
- <pre>
- tar xf light-x.yy.tar.gz
- cd light-x.yy/
- ./configure && make
- sudo make install
- </pre>
- <p>However, should you want to try the latest GitHub source you first
- need to clone the repository and run the autogen.sh script. This
- requires automake and autoconf to be installed on your system.</p>
- <pre>
- ./autogen.sh
- ./configure && make
- sudo make install
- </pre>
- <p>The configure script and Makefile.in files are not part of GIT
- because they are generated at release time with make release.</p>
-
- <p><strong>Optional:</strong> If you want to use udev rules instead of suid to manage sysfs permissions, you may skip the <code>make install</code> step and instead add something like the following to <code>/etc/udev/rules.d/90-backlight.rules</code> after copying your binaries:</p>
-
- <pre><code>ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
- ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
- </code></pre>
-
- <h2>
- <a id="usage" class="anchor" href="#usage" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Usage</h2>
-
- <p>This application usually has 4 different criteria on flags to use, which are operation modes, value mode, target and controller mode. Flags from these different modes can never be used in conjunction, but all of them do not always have to be specified (although it is recommended to do so for verbosity).</p>
-
- <p><strong>Note:</strong> This application will only print errors if you are using it incorrectly. If something goes wrong, and you can't figure out why, try setting the verbosity flag with -v:</p>
-
- <ul>
- <li>0: No debug output</li>
- <li>1: Errors</li>
- <li>2: Errors, warnings</li>
- <li>3: Errors, warnings, notices</li>
- </ul>
-
- <h3>
- <a id="operation-modes" class="anchor" href="#operation-modes" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Operation modes</h3>
-
- <p>The operation modes describe <strong>what</strong> you want to do.</p>
-
- <ul>
- <li>-G: Which <strong>reads/gets</strong> brightness/data from controllers/files</li>
- <li>-S: Which <strong>writes/sets</strong> brightness/data to controllers/files</li>
- <li>-A: Which does like -S but instead <strong>adds</strong> the value</li>
- <li>-U: Which does like -S but instead '<strong>subtracts</strong> the value</li>
- <li>-O: Save the current brightness for later use (usually used on shutdown)</li>
- <li>-I: Restore the previously saved brightness (usually used on boot)</li>
- <li>-L: List the available controllers</li>
- </ul>
-
- <p>When used by themselves operate on the brightness of a controller that is selected automatically. S, A and U needs another argument -- except for the main 4 criteria -- which is the value to set/add/subtract. This can be specified either in percent or in raw values, but remember to specify the value mode (read below) if you want to write raw values.</p>
-
- <h3>
- <a id="value-modes" class="anchor" href="#value-modes" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Value modes</h3>
-
- <p>The value mode specify in what unit you want to read or write values in. The default one (if not specified) is in percent, the other one is raw mode and should always be used when you need very precise values (or only have a controller with a very small amount of brightness levels).</p>
-
- <ul>
- <li>-p: Percent</li>
- <li>-r: Raw mode</li>
- </ul>
-
- <p>Remember, this is the unit that will be used when you set, get, add or subtract brightness values.</p>
-
- <h3>
- <a id="target" class="anchor" href="#target" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Target</h3>
-
- <p>As you can not only handle the <strong>brightness</strong> of controllers, you may also specify a target to read/write from/to:</p>
-
- <ul>
- <li>-b: Current brightness of selected controller</li>
- <li>-m: Maximum brightness of selected controller</li>
- <li>-c: Minimum brightness (cap) of selected controller</li>
- </ul>
-
- <p>The minimum brightness is a feature implemented as some controllers make the screen go pitch black at 0%, if you have a controller like that, it is recommended to set this value (in either percent or in raw mode). These values will be saved in raw mode though, so if you specify it in percent it might not be too accurate depending on your controller.</p>
-
- <h3>
- <a id="controller-modes" class="anchor" href="#controller-modes" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Controller modes</h3>
-
- <p>Finally, you can either use the built-in controller selection to get the controller with the maximum precision, or you can specify one manually with the -s flag. The -a flag will force automatic mode and is default. Use -L to get a list of controllers to use with the -s flag (to specify which controller to use).</p>
-
- <h3>
- <a id="examples" class="anchor" href="#examples" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Examples</h3>
-
- <p>Get the current brightness in percent</p>
-
- <p><code>light -G</code></p>
-
- <p>Increase brightness by 5 percent</p>
-
- <p><code>light -A 5</code></p>
-
- <p>Set the minimum cap to 2 in raw value on the acpi_video0 controller:</p>
-
- <p><code>light -Scrs "acpi_video0" 2</code></p>
- </section>
- <footer>
- <p>This project is maintained by <a href="https://github.com/haikarainen">haikarainen</a></p>
- <p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
- </footer>
- </div>
- <script src="javascripts/scale.fix.js"></script>
-
- </body>
- </html>
|