Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

Commit 76a6533

Browse files
committed
Moved to gitlab.freedesktop.org
1 parent 4dda433 commit 76a6533

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1
-6467
lines changed

.gitignore

-2
This file was deleted.

AUTHORS

Whitespace-only changes.

ChangeLog

Whitespace-only changes.

Makefile.am

-8
This file was deleted.

Makefile.decl

-54
This file was deleted.

NEWS

-116
This file was deleted.

README

-1
This file was deleted.

README.md

+1-115
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,4 @@
11
iio-sensor-proxy
22
================
33

4-
IIO sensors to D-Bus proxy
5-
6-
See https://developer.gnome.org/iio-sensor-proxy/1.0/ for
7-
developer information.
8-
9-
Installation
10-
------------
11-
```
12-
./configure --prefix=/usr --sysconfdir=/etc
13-
make
14-
make install
15-
```
16-
It requires libgudev and systemd (>= 233 for the accelerometer quirks).
17-
18-
Usage
19-
-----
20-
21-
With a GNOME 3.18 (or newer) based system, orientation changes will
22-
automatically be applied when rotating the panel, ambient light will be used
23-
to change the screen brightness, and GeoClue will be able to read the compass
24-
data to show the direction in Maps.
25-
26-
Note that nothing in iio-sensor-proxy is GNOME specific, or relies on GNOME.
27-
GNOME and GeoClue use the data provided by iio-sensor-proxy, other desktop
28-
environments are more than welcome to use this as a basis for their own
29-
integration.
30-
31-
Debugging
32-
---------
33-
34-
Note that a number of kernel bugs will prevent it from working correctly on
35-
some machines so please make sure to use the latest upstream kernel (kernel
36-
crashes on the Surface Pro, sensor failing to work after suspend on the Yoga
37-
Pro, etc.).
38-
39-
You can verify that sensors are detected by running `udevadm info --export-db`
40-
and checking for an output resembling this one:
41-
```
42-
P: /devices/platform/80860F41:04/i2c-12/i2c-BMA250E:00/iio:device0
43-
N: iio:device0
44-
E: DEVNAME=/dev/iio:device0
45-
E: DEVPATH=/devices/platform/80860F41:04/i2c-12/i2c-BMA250E:00/iio:device0
46-
E: DEVTYPE=iio_device
47-
E: MAJOR=249
48-
E: MINOR=0
49-
E: SUBSYSTEM=iio
50-
E: SYSTEMD_WANTS=iio-sensor-proxy.service
51-
E: TAGS=:systemd:
52-
E: USEC_INITIALIZED=7750292
53-
```
54-
55-
You can now check whether a sensor is detected by running:
56-
```
57-
gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
58-
```
59-
60-
After that, use `monitor-sensor` to see changes in the ambient light sensor
61-
or the accelerometer. Note that compass changes are only available to GeoClue
62-
but if you need to ensure that GeoClue is getting correct data you can run:
63-
`su -s /bin/sh geoclue -c monitor-sensor`
64-
65-
If that doesn't work, please file an issue, make sure any running iio-sensor-proxy
66-
has been stopped:
67-
`systemctl stop iio-sensor-proxy.service`
68-
and attach the output of:
69-
`G_MESSAGES_DEBUG=all /usr/sbin/iio-sensor-proxy`
70-
running as ```root```.
71-
72-
Accelerometer orientation
73-
-------------------------
74-
75-
When the accelerometer is not mounted the same way as the screen, we need
76-
to modify the readings from the accelerometer to make sure that the computed
77-
orientation matches the screen one.
78-
79-
`iio-sensor-proxy` reads this information from the device's
80-
`ACCEL_MOUNT_MATRIX` udev property. See [60-sensor.hwdb](https://github.com/systemd/systemd/blob/master/hwdb.d/60-sensor.hwdb)
81-
for details.
82-
83-
Compass testing
84-
---------------
85-
86-
Only the GeoClue daemon (as the geoclue user) is allowed to access the `net.hadess.SensorProxy.Compass`
87-
interface, the results of which it will propagate to clients along with positional information.
88-
89-
If your device does not contain a compass, you can run tests with:
90-
- If your device does not contain a real compass:
91-
- Add FAKE_COMPASS=1 to the environment of `iio-sensor-proxy.service` if your device does not contain a real one
92-
- Run the daemon manually with `systemctl start iio-sensor-proxy.service`
93-
- Verify that iio-sensor-proxy is running with `systemctl` or `ps`
94-
- As root, get a shell as the `geoclue` user with `su -s /bin/bash geoclue`
95-
- Run, as the `geoclue` user, `monitor-sensor`
96-
97-
Known problems
98-
--------------
99-
100-
Every Linux kernel from 4.3 up to version 4.12 had a bug that made
101-
made iio-sensor-proxy fail to see any events coming from sensors until the
102-
sensor was power-cycled (unplugged and replugged, or suspended and resumed).
103-
104-
The bug was finally fixed in [this commit](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1664eaacec31035450132c46ed2915fd2b2049a)
105-
in the upstream kernel and backported to stable releases. If you experience
106-
unresponsive sensors, ask your distributor to make sure this patch was
107-
applied to the version you're using.
108-
109-
The IIO sensors regressed again not long afterwards, which got fixed in
110-
[this commit](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f92253024d9d947a4f454654840ce479e251376).
111-
Again, make sure that your kernel contains this fix.
112-
113-
References
114-
----------
115-
116-
- [sensorfw](https://git.merproject.org/mer-core/sensorfw/tree/master)
117-
- [android-iio-sensors-hal](https://github.com/01org/android-iio-sensors-hal)
118-
- [Sensor orientation on MSDN](https://msdn.microsoft.com/en-us/windows/uwp/devices-sensors/sensor-orientation)
4+
Moved to https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/

autogen.sh

-38
This file was deleted.

0 commit comments

Comments
 (0)