Showing posts with label brightness. Show all posts
Showing posts with label brightness. Show all posts

Saturday, October 24, 2015

Fix Brightness Getting Reset (To A Very Low Value Or Maximum) On Reboot In Ubuntu

If your laptop's brightness is not saved and is set to a very low value or to maximum, each time you reboot and / or when you log out, read on for a fix / workaround.

Ubuntu brightness

In both Ubuntu 14.04 and 14.10, my laptop's brightness is not saved between sessions and is reset to a very low value after every reboot or logout. I found a workaround (that works for both this issue as well as another issue which is basically the opposite: the brightness is set to maximum after restarting Ubuntu), but it was a bit confusing so I thought I'd improve the steps and share it with you.

Basically, the fix / workaround is to automatically set a custom brightness value each time you boot into Ubuntu. Let's proceed.

1. The first thing you need to do is to find out which ACPI interface (acpi_video) controls the brightness. This can be done by looking into your Xorg log file to see which acpi_video was loaded. To do this via command line, simply use the following command:
grep acpi_video /var/log/Xorg.0.log
The command above should display an output similar to this:
[     7.385] (--) intel(0): Found backlight control interface acpi_videoX (type 'firmware') for output LVDS1
where "acpi_videoX" is "acpi_video0" or "acpi_video1". This is the acpi_video that controls the brightness, so remember it for the next steps.

If the command above doesn't display any output and you have a folder called "intel_backlight" under "/sys/class/backlight/", then use "intel_backlight" as the ACPI interface for the next steps.

2. Next, set (via keyboard Fn + brightness keys) your laptop's brightness to the level you want Ubuntu to use after when it starts.

3. Now we'll have to get the actual brightness value you set under step 2. To do this, run the following command:
cat /sys/class/backlight/acpi_videoX/brightness
where "acpi_videoX" is the ACPI interface which controls your laptop's brightness, which you find out under step 1.

Remember this value for the next step.

4. The next step is to create a file (as root) called fixbrightness.conf in your /etc/init/ directory - I'll use Gedit below:
gksu gedit /etc/init/fixbrightness.conf

And in this file, paste this:
description "Sets brightness after graphics device is loaded"

start on graphics-device-added
task
exec /bin/echo BRIGHTNESS_VALUE > /sys/class/backlight/acpi_videoX/brightness
here, you need to:
  • replace BRIGHTNESS_VALUE with the brightness value you got under step 3;
  • replace acpi_videoX with the ACPI Interface that controls your laptop's brightness, which you found out under step 1.

Then save the file.

5. Reboot and the low or maximum brightness issue after reboot / logout should be fixed.


via AskUbuntu but I tried to improve the instructions
Read more »

Saturday, October 17, 2015

WildGuppy Adjusts Your Laptop's Brightness Automatically Using The Camera As a Light Sensor

Improper screen brightness can cause your eyes to tire faster and a bright screen at night can make it difficult to fall asleep. WildGuppy tries to overcome this by adjusting your laptop's brightness automatically based on the ambient light, using the laptop camera as a light sensor.


WildGuppy can be used either via command line or by using an Ubuntu AppIndicator. From its settings you can define the time interval for webcam samples, set the maximum and minimum brightness levels or manually set the brightness.

Note that once you set the brightness manually, the webcam sampling process stops.

This tool will probably remind you of Calise, which has more features but is pretty hard to setup for regular users while WildGuppy is very easy to use.


Install WildGuppy in Ubuntu


WildGuppy is available in a PPA for Ubuntu / Linux Mint users. Add the PPA and install it using the following commands:
sudo add-apt-repository ppa:fantasyleague0629/wildguppy
sudo apt-get update
sudo apt-get install wildguppy

Once installed, you can launch WildGuppy (AppIndicator) from the menu / Dash. If you want to use the command line version, type "wildguppy" in a terminal.

To get WildGuppy to adjust your laptop's brightness automatically based on ambient light, select "Start" from the AppIndicator menu. 

If you want WildGuppy to start automatically when you log in, use the commands below:
wget http://dl.dropboxusercontent.com/s/bcnzhxv6mrmipdd/wildguppy-gtk.desktop -O ~/.config/autostart/wildguppy-gtk.desktop

To download the source code, report bugs and so on, see WildGuppy @ GitHub.
Read more »