From: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=237768 ---8<--- HAL doesn't seem to support Dell's Ambient Light Sensor. It can be used, in hardware, by pressing Fn+Left arrow (auto brightness), and it will adjust the display brightness automatically. ---8<--- And from David: Can be solved by writing an addon implementing this interface http://people.freedesktop.org/~david/hal-spec/hal-spec.html#device-properties-light-sensor I did that in one day for my Macbook Pro... [...]
ALS can be turned on/off in software using the token interface: Token interface: 0x0187 - ALS OFF The panel brightness is controlled by the Fn+Up-arrow and Fn+Down-arrow keys and by the brightness fields in BIOS setup. They can be manipulated by OS-level applications as well. 0x0188 - ALS ON Ambient Light Sensor (ALS) in certain notebook computers, controls the brightness of the notebook's LCD panel according to the amount of light in the surrounding environment. You can use the libsmbios activateCmosToken binary to test this. I dont recommend using this binary from your API as this binary cmdline interface will probably change because it doesnt follow my coding style guidelines and is in the unsupported/ dir. You can use this as an example, though.
You can do more fine-grained control of ALS using the SMI interface. I dont know exactly how this interface works, the docs I have are not very verbose. Here is what I have: SMI Interface: cbClass: 17 cbSelect: 10 Name: Ambient Light Sensor Status and Control On entry: cbARG1, byte 0: Function to perform: 0 Get ALS Status 1 Control ALS 2 Get Brightness Table If cbARG1, byte 0 is 1 (Control ALS): cbARG2, byte 0: Command 0 Disable ALS 1 Enable ALS cbARG2, byte 1: ALS low limit to set cbARG2, byte 2: ALS high limit to set On return: cbRES1: Return code 0 Completed successfully -1 Completed with error -2 Function not supported If cbARG1 byte 0 was 0 (Get ALS Status): cbRES2, byte 0: Current ALS Status 0 Disabled 1 Enabled cbRES3, byte 0: Current ALS low limit cbRES3, byte 1: Current ALS high limit cbRES3, byte 2: Absolute ALS low limit cbRES3, byte 3: Absolute ALS high limit If cbARG1 byte 0 was 2 (Get Brightness Table): cbRES2: Bytes 3..0 of the brightness table cbRES3: Bytes 7..4 of the brightness table You can use the libsmbios smi::doSimpleCallingInterfaceSmi() API to make the SMI calls above. See the dellWirelessCtl or dellLedCtl binaries for examples.
Hello, I own a Latitude E6400, it has an ambient light sensor too. I can help you to test something actually I see that libsmbios does not have "native" support for this in the utility dellLcdBrightness. I mailed the authors but still didn't receive any answer. I *could* try to code something, but I can't find the source of dellLcdBrightness. Can you help me?
Created attachment 23435 [details] dellAlsCtl.c Compile with: gcc -I /usr/include/smbios_c/ -l smbios_c dellAlsCtl.c -o dellAlsCtl This is my try. there is no support for BIOS password yet. Anyway it works. I implemented only the ALS status get/set, not other things.
Created attachment 23436 [details] dellAlsCtl.c better version
I have a question: what is "Als low/high limit"??
HAL is in maintenance mode - no new features are added. All future development focuses on udisks, upower and other parts of the stack. See Software/DeviceKit for more information.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.