IIO: Difference between revisions
imported>Samueldr Inits page |
imported>Jtojnar m spelling of GNOME |
||
Line 19: | Line 19: | ||
== Software notes == | == Software notes == | ||
It is unverified, but | It is unverified, but GNOME should automatically make use of the data when enabled to handle the rotation and automatic brightness of the display. | ||
== Hardware notes == | == Hardware notes == |
Latest revision as of 02:35, 18 January 2020
IIO stands for the Industrial I/O subsystem of the Linux Kernel. It generally provides an interface to sensors like Accelerometers and Light sensors.
NixOS
The services using the subsystem can be enabled using this configuration in configuration.nix:
{ config }:
{
hardware.sensor.iio.enable = true;
}
This will enable iio-sensor-proxy.
To test, monitor-sensor
can be used, it will print out the current values of the sensors as they change, periodically. In the event nothing is detected after enabling, rebooting may help.
Software notes
It is unverified, but GNOME should automatically make use of the data when enabled to handle the rotation and automatic brightness of the display.
Hardware notes
Accelerometers
Sometimes, the accelerometers in different devices will be oriented in a way that it specific to that hardware, this is not a problem, but it is an issue to be considered. The Accelerometer orientation section on the iio-sensor-proxy
project page explains how to fix this properly for your device. The NixOS specific note is that instead of creating an hwdb
file, you would add services.udev.extraHwdb
to your configuration.nix file.
{ config }:
{
services.udev.extraHwdb = ''
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
'';
}