Ubuntu 18.04: Slow shutdown

After a clean install of Ubuntu 18.04 LTS, I am experiencing very slow shutdowns , When I press esc the following are shown .

"A stop job is running for IIO sensor Proxy service (s /1min 32s)"

Gradually the time is increased. Are there any other people experiencing this ? What could be the reason behind this ?


Solution 1:

Your long shutdowns are caused by a possible unresponsive ambient light sensor D-Bus proxy. You can find some information on the GNOME website here. If you can live without needing an accelerator or ambient light sensor on your computer, just uninstall it using sudo apt-get remove --auto-remove iio-sensor-proxy. If this is a laptop like a Lenovo Yoga, where an accelerator might be used to see if the device should be in "tablet mode" this might have been automatically installed while Ubuntu was looking for drivers. Another option, if you still want to use the accelerator, is to kill the task after a certain amount of time. To do that i would try timeout KILL_TIME ~/FILE.