"iio-sensor-proxy" is deactivating

I have a Lenovo IdeaPad Flex 3 2-in-1 laptop/tablet.

I am trying to get monitor-sensor to work so that I can install a version of the screen autorotation script that has been discussed elsewhere. The problem is that the iio-sensor-proxy service is not working.

My system specs:

dave@Daves-IdeaPad:~$ neofetch --off
OS: Ubuntu MATE 22.04.3 LTS x86_64 
Host: 82G4 IdeaPad Flex 3 11ADA05 
Kernel: 6.2.0-26-generic 
Uptime: 4 days, 21 hours, 1 min 
Packages: 2121 (dpkg), 20 (snap) 
Shell: bash 5.1.16 
Resolution: 1920x1080 
DE: MATE 1.26.0 
WM: Metacity (Marco) 
Theme: Yaru-blue [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: mate-terminal 
Terminal Font: Monospace 11 
CPU: AMD Athlon Silver 3050e with Radeon Graphics (4) @ 1.400GHz 
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series 
Memory: 1691MiB / 3291MiB

When I run monitor-sensors, it hangs waiting for iio-sensor-proxy:

dave@Daves-IdeaPad:~$ monitor-sensor
    Waiting for iio-sensor-proxy to appear

(After 2 minutes I pressed Ctrl-C to kill it.)

The system reports that iio-sensor-proxy is installed:

dave@Daves-IdeaPad:~$ apt search iio-sensor-proxy
Sorting... Done
Full Text Search... Done
iio-sensor-proxy/jammy,now 3.3-0ubuntu6 amd64 [installed,automatic]
  IIO sensors to D-Bus proxy


Thinking that the service wasn't running, I tried starting it:

dave@Daves-IdeaPad:~$ sudo systemctl start iio-sensor-proxy
[sudo] password for dave: 

No error was reported, but when I checked the status, it shows the service was started and then deactivated:

dave@Daves-IdeaPad:~$ systemctl status iio-sensor-proxy
○ iio-sensor-proxy.service - IIO Sensor Proxy service
     Loaded: loaded (/lib/systemd/system/iio-sensor-proxy.service; static)
     Active: inactive (dead)

Aug 22 12:25:13 Daves-IdeaPad systemd[1]: Starting IIO Sensor Proxy service...
Aug 22 12:25:13 Daves-IdeaPad systemd[1]: Started IIO Sensor Proxy service.
Aug 22 12:25:13 Daves-IdeaPad systemd[1]: iio-sensor-proxy.service: Deactivated successfully.

Any ideas on what is going wrong?


I had the same issue with Ubuntu MATE 22.04 on my Lenovo Flex5i. I used the scripts in this article to work around the issue. Note that when I tried Ubuntu Cinnamon 23.04, the sensor worked. Also note that 23.04 has a more recent kernel and that is more likely the change that fixed the issue than the desktop environment.


Thank you, goinglinux.

I read the scripts article you linked, and I think I'll do something like that if I can't get the sensors working.

You mentioned that 23.04 has a more recent kernel than 22.04, so I checked the release notes for 23.04, and they call out kernel version 6.2. My current point release, 22.04.03 is using the same kernel as in the 23.04 release notes: 6.2.0-26-generic X86_64.

Could you please check your current kernel version for 23.04 and tell me if it has perhaps been upgraded to 6.4? The reason I ask is that the release notes for 6.4 say that it has added support for some Lenovo 2-in-1's, and you posted that your Flex5i started working when you tried 23.04.

Thanks again. :slightly_smiling_face:

1 Like

I know it's a bit 'apples and oranges' but I just checked. My Ubuntu MATE 22.04.03 LTS Dell XPS 13 shows Kernel Linux 5.15.0-82-generic x86_64. I have Ubuntu (not MATE) 23.04 in a VM. It shows Kernel Linux 6.2.0-24-generic. I don't have access to my Ubuntu Cinnamon Flex 5i right now, but I have Ubuntu Cinnamon 23.04 in a VM that shows Kernel Linux 6.2.0-31-generic.


Thanks, goinglinux. (Great website, BTW.)

That makes sense. From what I've seen on the web, standard Ubuntu runs Gnome, and Gnome and Cinnamon both seem to have better support for touchscreen operation.

I'm not yet ready to give up on Mate. I'm developing a script to allow a passive stylus to simulate a mouse right-click, with promising results so far. Barring any unforseen difficulties, I'l combine that script with variants of yours for switching between tablet and laptop mode, and for rotating the screen. If all works well, I'll publish the results here for others to use.

1 Like