Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For the past week or so, the standard "Shut down" dialog appears at random, with no apparent cause.
I upgraded from 12.04 to 12.10 and it still continues. It's unbelievably irritating.


It can appear when I'm just typing into a text document, hours after the computer booted, or it can happen three seconds after I log in and haven't had a chance to interact with the desktop.

If I press "Cancel" the dialog may reappear within a few seconds, or a few hours. Sometimes the laptop just powers off instantly a few seconds after pressing "Cancel".

When this dialog appears, I don't see anything weird in /var/log/*log and I don't see any suspicious processes running.

I have managed to capture this by monitoring the dbus session bus, when the dialog appears:

method call sender=:1.6 -> dest=org.gnome.SessionManager serial=285 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Shutdown
method return sender=:1.0 -> dest=:1.6 reply_serial=285

But that gives me no clue as to who is requesting a shut down.

The physical power button (on this Thinkpad T420s) is not mapped to the shutdown prompt, and pressing it does nothing.

I've also seen this random shutdown behaviour if I boot the laptop, then kill lightdm so that no X server is running. At some point, the computer may sporadically say it's going down for shutdown. Then it does.

Any ideas what this could be, or how I can debug further?

This also happens with a Ubuntu 10.04 live CD and a 12.04 live USB drive.
However, I swapped out my SSD and put in the original HDD and I was able to install and run Windows 7 for a while without problems.

So, since this problem appeared recently and occurs on multiple OS versions, I'd guess it's potentially a hardware problem. But given that I can't see what (haven't seen any phantom key presses in showkey) is wrong, and because Windows works, I don't really have a good case for calling in my Thinkpad warranty...

share|improve this question
The culprit for the no-warning shutdowns could be laptop-mode-tools, which could be initiating a last-resort shutdown due to low battery. Although that's really not likely. If you want you could try disabling laptop mode tools and see if it still happens. You will consume more power. – thirtythreeforty Oct 27 '12 at 21:33
@gh403: Sounds plausible, but as far as I can see I don't have that installed? The problem happens either on AC power or on battery, and still happens when I remove my second battery. – Christopher Oct 27 '12 at 21:43
Ok then, I guess it's not laptop mode then! You could try installing laptop mode tools and see if that helps. I doubt it though. My only other guess would be a weird event from the laptop that's triggering an ACPI shutdown event. I really don't know how to troubleshoot this, but maybe this'll give you some ammo for Google. – thirtythreeforty Oct 27 '12 at 22:07

I believe this is caused by a hardware fault.

Using the acpi_listen tool, I was able to see that a button/power PWRF event was being generated when the shutdown dialog appeared. This is what would happen if you hold down the physical power button for a couple of seconds.

The laptop shutting off entirely now and then is equivalent to holding down the power button for five seconds or so.

I was able to reproduce this in other Ubuntu versions, but also eventually under Windows 7.

So I guess there's some sort of malfunction in the keyboard controller or similar, which causes phantom power button events to be sent.

Currently, I'm using a USB keyboard and for a couple of hours, no shutdown events have occurred. So it appears to be triggered when using the built-in keyboard to type.

Mystery solved. Hopefully Lenovo see it the same way...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.