Giter Site home page Giter Site logo

wesgarner / asus-zenbook-ambient-light-sensor-controller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danieleds/asus-zenbook-ambient-light-sensor-controller

0.0 1.0 0.0 381 KB

A daemon that adjusts screen and keyboard backlight using the Zenbook's light sensor

License: Apache License 2.0

Shell 1.64% QMake 0.67% C++ 78.72% C 18.97%

asus-zenbook-ambient-light-sensor-controller's Introduction

Asus Zenbook Ambient Light Sensor Controller

Tested with:

  • UX32VD
    • Ubuntu 15.04 + Linux 3.19.0
    • Ubuntu 14.10 + Linux 3.16.0
    • Ubuntu 14.04 + Linux 3.13.0
    • Ubuntu 13.10 + Linux 3.11.0
    • Ubuntu 13.04 + Linux 3.8.0
  • UX31A
    • Ubuntu 14.04
    • Ubuntu 13.10

How to install

Required packages: libbsd-dev, qt4-qmake / qt5-qmake, g++

  1. Install the ALS Driver:
  2. Download the source code from here.
  3. Extract the archive, move into the directory, and compile with make.
  4. Insert the module into your current kernel with sudo insmod als.ko
  5. Build this controller:
  6. cd service
  7. qmake als-controller.pro -r -spec linux-g++-64, or qmake als-controller.pro -r -spec linux-g++ if you're on a 32-bit system.
  8. make

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

How to use

  1. Launch als-controller with root privileges, for example: sudo ./als-controller. This will be the service that monitors the light sensor.

  2. 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)
    

Example

After compiling and running als-controller, try running switch.sh from the "example" folder. For an ideal integration with your system, the suggested idea is to start the service at boot, and then bind some script similar to switch.sh to a key combination on your keyboard.

Troubleshooting

If als-controller isn't working, a possible cause is that the driver can't see the sensor. Try setting the boot option acpi_osi='!Windows 2012' (e.g. at the end of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub) and then reboot.

In addition, you can check als-controller logs with cat /var/log/syslog | grep als-controller.

Thanks

asus-zenbook-ambient-light-sensor-controller's People

Contributors

danieleds avatar displacer avatar igorsantos07 avatar mgorny avatar mrueg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.