4

I have a Asus Zenboo UX303LN. There is a known issue with the brightness keys, which is no big deal for me but I would like the ambient light sensor to work. I didn't find much information on this issue and my device.

Can anybody tell me how to make it work? Test it? Or if there is no possibility yet to make it work.

meles
  • 866
  • 9
  • 27
  • https://github.com/danieleds/Asus-Zenbook-Ambient-Light-Sensor-Controller – RiddleMeThis Jun 12 '15 at 19:59
  • I'm trying it, but I can't get it working. The latest error is [ 286.377244] als-controller[13360]: segfault at 7f2412a42fd8 ip 00007f24145cac95 sp 00007f2412a42fd0 error 6 in libc-2.19.so[7f241454b000+1bb000] – meles Jun 12 '15 at 20:55
  • I solved the segfault but it is still not behaving as it should. But it seems to work with the UX303 aswell. – meles Jun 12 '15 at 21:24
  • 1
    I changed the code of the project suggested above and got it working. I will post a proper answer in the next days. My bug report with the patch is found here https://github.com/danieleds/Asus-Zenbook-Ambient-Light-Sensor-Controller/issues/18. – meles Jun 12 '15 at 22:18

2 Answers2

2

First install the Asus Zenbook Ambient Light Sensor Driver. You can do this using DKMS.

cd /usr/src
sudo wget https://github.com/danieleds/als/archive/master.tar.gz && \
  sudo tar xvf master.tar.gz
sudo dkms add -m als -v master
sudo dkms install -m als -v master
sudo echo als >>/etc/modules

After that install the Asus Zenbook Ambient Light Sensor Controller.

Pick a folder to install it in. I like to use /home/username/bin.

cd /home/username/bin
git clone https://github.com/danieleds/Asus-Zenbook-Ambient-Light-Sensor-Controller.git
cd Asus-Zenbook-Ambient-Light-Sensor-Controller/service

Then on 64 bit systems run:

qmake als-controller.pro -r -spec linux-g++-64

Or on 32 bit systems run:

qmake als-controller.pro -r -spec linux-g++

then run

make

The generated binary file, als-controller, is what will monitor the light sensor.

How to use

Launch als-controller with root privileges, for example: sudo ./als-controller. This will be the service that monitors the light sensor. Use the same program with user privileges, als-controller, to control the service. Some examples:

./als-controller -e     // Enable the sensor
./als-controller -d     // Disable the sensor
./als-controller -s     // Get sensor status (enabled/disabled)

For an ideal integration with your system, it is a good idea to start the service at boot (run als-controller as root), and then bind the script switch.sh (in the example folder) to a keyboard shortcut.

1

I've created another one implementation https://github.com/mikhail-m1/illuminanced, with luminance filtration and tunable settings, also it works with build in kernel driver. Tests on Ubuntu 16.4.

Mikhail
  • 11