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.
And from David:
Can be solved by writing an addon implementing this interface
I did that in one day for my Macbook Pro... [...]
ALS can be turned on/off in software using the 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:
Name: Ambient Light Sensor Status and Control
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
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
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]
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]
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.
on Jun 30, 2016 at 08:31:11.
(provided by the Example extension).