Power button shuts down computer if a Qt application is running

Bug #1426851 reported by Neptilo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Ubuntu 14.04, the usual behavior of the power button is bringing a dialog with options (Lock, Suspend, Restart, Shutdown) and waiting for the user's choice.

When a Qt application is running, for instance Qt Creator or Texmaker, (but not VLC, Clementine or Skype) and the power button is pressed, it instantly closes that Qt app (http://qt-project.org/forums/viewthread/47632/), brings the shut down dialog and then shuts down the computer without waiting for the user’s choice.

I first asked about this on this forum: http://qt-project.org/forums/viewthread/53243/#222409
and reported it at Qt Creator, thinking it was the only application causing it, where they told me to report it to Canonical: https://bugreports.qt.io/browse/QTCREATORBUG-14030

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1426851/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Brian Murray (brian-murray) wrote :

I was unable to recreate this on Vivid. After launching qtcreator, I held down the power button and while qtcreator did close itself, I was presented with the lock / suspend / restart / shutdown dialog and it did *NOT* automatically shutdown on me.

Changed in ubuntu:
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I see the same behaviour that Brian here, qtcreator closes and the power dialog is displayed but not action is validated

Revision history for this message
Sebastien Bacher (seb128) wrote :

The "close the application" is not specific to qtcreator, other qt5 code does the same, likely a qtdeclarative thing. Unsure what's going on with the session closing for you though, it's only doing it when qt code is focussed? having a xev log could be useful

affects: ubuntu → qtdeclarative-opensource-src (Ubuntu)
Changed in qtdeclarative-opensource-src (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

unassigning as well, it's not something obvious/that most users see, not likely to be worked on by our team in the near futur either

affects: qtdeclarative-opensource-src (Ubuntu) → qtbase-opensource-src (Ubuntu)
Revision history for this message
Neptilo (neptilo) wrote :

Sebastien, not sure what you mean by "when qt code is focussed". If you mean when a Qt window is focussed, I think the answer is no. It is doing it when a Qt application is running, whether it has a window focussed or not.

I don't know what a xev log is. I'm going to look it up and send the result when I find how to do it.

Revision history for this message
Neptilo (neptilo) wrote :

OK, xev is actually pretty easy to use. Here is my log: http://pastebin.com/Gef6zmeY

I first tried (several times) launching Texmaker and press the power button but the problem didn't happen.

What seemed to make a difference is creating a new document after launching it. Then I started xev, then pressed the power button and the computer shut down.

Maybe this is happening when there are unsaved changes to a document in the Qt application. Can you recreate the bug after creating a new document without saving it?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

The same behavior on 14.04 and 15.04 - if QT app is open, all windows for it are closed, like Keepassx, skype, WPS office asks whether to save the contents of documents (this kinda seems like pressing Alt+F4).

14.10, which was troublesome to use for me so I don't use it, didn't have this problem.

I'm running Dell, XPS 15 L521X model, can't verify on any other computer.

tags: added: rls-w-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is getting a big old. Let's use bug 1847974.

Revision history for this message
Neptilo (neptilo) wrote :

@vanvugt This is not the same bug though. In my case, it is the computer that shut down, not just apps.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.