Power button shuts down computer if a Qt application is running
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | qtbase-opensource-src (Ubuntu) |
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://
I first asked about this on this forum: http://
and reported it at Qt Creator, thinking it was the only application causing it, where they told me to report it to Canonical: https:/
| Brian Murray (brian-murray) wrote : | #2 |
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) |
| Sebastien Bacher (seb128) wrote : | #3 |
Thanks, I see the same behaviour that Brian here, qtcreator closes and the power dialog is displayed but not action is validated
| Sebastien Bacher (seb128) wrote : | #4 |
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 |
| Sebastien Bacher (seb128) wrote : | #5 |
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) |
| Neptilo (neptilo) wrote : | #6 |
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.
| Neptilo (neptilo) wrote : | #7 |
OK, xev is actually pretty easy to use. Here is my log: http://
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?
| Launchpad Janitor (janitor) wrote : | #8 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in qtbase-opensource-src (Ubuntu): | |
| status: | New → Confirmed |
| Eduards Bezverhijs (mjasnik) wrote : | #9 |
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 |


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/ FindRightPackag e. 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.]