# Enabling iio-sensor-proxy

**URL:** https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063
**Category:** Help
**Created:** [July 10, 2020, 11:14am UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063 "2020-07-10T11:14:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mroman42](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mroman42/32/2732_2.png) [@mroman42](https://discourse.nixos.org/u/mroman42)
#### Post date: [July 10, 2020, 11:14am UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/1 "2020-07-10T11:14:17Z")

</div>

I am trying to install `iio-sensor-proxy to` to use screen autorotation in Gnome3. Following the [wiki](https://nixos.wiki/wiki/IIO), I have added:

```auto
  hardware.sensor.iio.enable = true;

```

to `configuration.nix`. This seems to be insufficient to get the command `iio-sensor-proxy`, so I also added `iio-sensor-proxy` to `environment.systemPackages`. I have also tried to install it using `nix-env -iA nixos.iio-sensor-proxy`. I would expect the service to be enabled after restarting, but `monitor-sensor` just outputs

```auto
Waiting for iio-sensor-proxy to appear.

```

When I call `iio-sensor-proxy` after having installed it with `nix-env`, it just exits without any output.

Am I missing something?

Using NixOs 20.03.2425.9a3e34ae601 (Markhor).

---

<div class="post-metadata">

### Author: ![mroman42](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mroman42/32/2732_2.png) [@mroman42](https://discourse.nixos.org/u/mroman42)
#### Post date: [July 10, 2020, 11:25am UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/2 "2020-07-10T11:25:28Z")

</div>

I have the suspicion that this has to do with the old GitHub repo for iio-sensor-proxy not being there anymore. My knowledge of Nix is quite limited but I will try to make the derivation point to the new repository.

---

<div class="post-metadata">

### Author: ![peterhoeg](https://discourse.nixos.org/user_avatar/discourse.nixos.org/peterhoeg/32/137_2.png) [@peterhoeg](https://discourse.nixos.org/u/peterhoeg)
#### Post date: [July 10, 2020, 12:05pm UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/3 "2020-07-10T12:05:15Z")

</div>

I use KDE and not Gnome, but there all it takes is setting the option you mention:

`hardware.sensor.iio.enable = true;`

Adding it to systemPackages doesn’t do anything else but give you the detect bin (and the other binaries) in your path.

---

<div class="post-metadata">

### Author: ![mroman42](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mroman42/32/2732_2.png) [@mroman42](https://discourse.nixos.org/u/mroman42)
#### Post date: [July 10, 2020, 9:41pm UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/4 "2020-07-10T21:41:10Z")

</div>

Thank you, having confirmation that it should work was indeed useful. The problem was somewhere else completely: new generations were not appearing on the GRUB menu and the same old generation was loading again and again each time I restarted to test iio-sensor-proxy. So, it was quite a stupid error having nothing to do with iio-sensor-proxy nor gnome (should I change the title to make this more useful to others?).

---

<div class="post-metadata">

### Author: ![bittner](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bittner/32/17267_2.png) [@bittner](https://discourse.nixos.org/u/bittner)
#### Post date: [April 16, 2025, 11:52am UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/5 "2025-04-16T11:52:20Z")

</div>

Can you confirm that this makes the **rotation lock** option show up in GNOME’s system menu and/or the GNOME settings?

### Sensors seem to work

When I run `monitor-sensor` the output suggests that the orientation change is detected:

```console
$ monitor-sensor
    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal, tilt: tilted-down)
=== No ambient light sensor
=== No proximity sensor
=== No compass
    Tilt changed: vertical
    Tilt changed: tilted-down
    Accelerometer orientation changed: left-down
    Tilt changed: vertical
    Accelerometer orientation changed: normal

```

But neither does the screen orientation change nor does GOME’s system menu in the top right corner suggest it has taken notice of the feature. 😟

### Rotation lock missing from GNOME settings

Also, the GNOME settings don’t show any trace of the orientation lock or similar. And shouldn’t `gsettings` have a `org.gnome.settings-daemon.plugins.orientation` schema for the orientation feature? This is missing here, currently. 🥹

```console
$ gsettings list-children org.gnome.settings-daemon.plugins
color org.gnome.settings-daemon.plugins.color
housekeeping org.gnome.settings-daemon.plugins.housekeeping
media-keys org.gnome.settings-daemon.plugins.media-keys
power org.gnome.settings-daemon.plugins.power
xsettings org.gnome.settings-daemon.plugins.xsettings

```

Any ideas?

---

<div class="post-metadata">

### Author: ![bittner](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bittner/32/17267_2.png) [@bittner](https://discourse.nixos.org/u/bittner)
#### Post date: [April 16, 2025, 12:07pm UTC](https://discourse.nixos.org/t/enabling-iio-sensor-proxy/8063/6 "2025-04-16T12:07:09Z")

</div>

Oh, wow! – GNOME is so smart! 😂 ❤

The rotation lock feature is _hidden_ when your laptop is in “laptop mode” (note: I have a ThinkPad X1 Yoga convertible).

As soon as you _fold_ your device, the orientation change feature is only activated!! … and the rotation lock option appears in the system menu. ❤ 😍

So, it’s all good. NixOS and GNOME rock!!
