Hot answers tagged

13

For Ubuntu 16.04+ using systemd (the default). systemd-inhibit --why="Wait for this script to finish" bash script.sh === Test: $ systemctl poweroff Operation inhibited by "bash script.sh" (PID 23912 "systemd-inhibit", user rinzwind), reason is "Wait for this script to finish". Please retry operation after closing inhibitors and logging out other users. ...


5

From man 8 shutdown: Once TIME has elapsed, shutdown sends a request to the init(8) daemon to bring the system down into the appropriate runlevel. This is performed by emitting the runlevel(7) event, which includes the new runlevel in the RUNLEVEL environment variable as well as the previous runlevel (obtained from the environment ...


4

It turns out this is now a documented problem with the MacbookPro 11,4 and 11,5 within the latest mainline linux kernel (I think up until 4.6 at the time of writing this). There is a work-around that requires patching/compiling a custom kernel. It's located at Comment #172 of https://bugzilla.kernel.org/show_bug.cgi?id=103211. Specifically, diff --git a/...


3

HOW TO DO IT WITH SYSTEMD (EASILY) If you find this thread after June 2016, Ubuntu and its derivatives including Mint will be using systemd to control system initialization and shutdown. I had problems with the old approach so researched the systemd way. With systemd you create one or two files to call your scripts using the templates below, and execute a ...


3

Ubuntu's session indicator relies on dbus calls, for example the equivalent command in terminal would be this: qdbus com.canonical.Unity /com/canonical/Unity/Session com.canonical.Unity.Session.Shutdown As for whether or not some of the machines don't shutdown, I would assume either a bug or dbus calls are being blocked by something


2

This seems to be a regression of this bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/729827 So, the workaround (provided you dont need assistive technologies) would be: sudo mv /usr/lib/at-spi2-core/at-spi2-registryd /usr/lib/at-spi2-core/at-spi2-registryd.old but maybe you also want to reopen it on launchpad.


2

You may use sleep command. It accepts postfix m to numbers, which stands for minutes. I.e. you can execute sleep 60m && someCommand Now, here's a little problem that sudo after a time limit requires to enter the password again, and if you'd execute sudo sleep 60m && sudo somecommand, the someCommand wouldn't do in time. To workaround it, ...


2

Is it possible that shutting down and then unplugging my external hard drive could have broken a path? No. And if it did it would not kill the contents of the disk. I have noticed that Ubuntu shuts down almost instantly ... We do not probe for an update as Windows does. whereas Windows takes much longer and often pauses on closing 1 application ...


1

It certainly sounds like the battery is dead. If the laptop won't power on at all until the AC is plugged in I'd blame the battery.


1

Ubuntu 16.04 had a lot of problem with external GPU (nVidia or ATI) and with Intel Power States of 6th generation Intel processors. I have your same problem and installing kernel Linux 4.6 (instead of 4.4) I have solved my problem. Enter these commands on your terminal (for 64bit PCs): cd /tmp/ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-...


1

I had the same problem too. As I looking on the Internet, I found a similar problem where have a solution for not XU4: http://mylinuxexplore.blogspot.hu/2011/11/solved-ubuntu-doesnt-shutdown-properly.html Unfortunately that solution may working with GRUB only (the XU4 has different method to boot the OS). While I used Ubuntu 15.10 I had a problems with ...


1

As suggested this is my comment as the answer. I've found a workaround: running lightdm-gtk-greeter-settings gives you the opportunity to remove the Power Menu entirely.


1

I seem to have solved this by chance when I updated the drivers listed on Drivers & Downloads on Dell Support Page . There was a BIOS update there.


1

How to Do it with Systemd (it's easier) Now that the Ubuntu variants and Mint have moved to systemd I found my old solutions based on the above to be less satisfactory. I searched around the web to find out how to do it with systemd and ended up combining others' wisdom and documenting it as a blog post at blogspot.com.au containing the following tutorial....



Only top voted, non community-wiki answers of a minimum length are eligible