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

After I close a program, part of the window remains open. The affected part of the screen remains as it was when the window was open, and it stays on top of other windows. It's not a redraw issue per se -- xrefresh doesn't help since it repaints the bad window.

This phantom window does not appear in the 'task bar' or Alt+Tab switcher, but it's not just a screen artifact either. When I run my mouse over it the cursor changes, so it's still being treated in some ways like a window (though it can't be selected or changed and it doesn't have a full titlebar).

Any ideas how I can change this? This problem happens, unfortunately, with some regularity to me, maybe every other week. As I leave my computer on for extended periods to do extended calculations this is more than a small inconvenience, since it blocks part of the display for several weeks until the work is complete and I can restart.

share|improve this question
Please, tell us Ubuntu version, desktop environment, graphics card model. – Eric Carvalho Mar 7 '13 at 3:16
@EricCarvalho: Ubuntu 12.04.2 with GNOME Shell 3.4.1. I don't have a graphics card installed, I'm using the onboard video on an Asus M3A78-T. – Charles Mar 7 '13 at 4:05
up vote 5 down vote accepted

I found the answer, which I record here for others who may have the same issue.

First I used xprop to find what window was causing the problem. (xkill was ineffective here.) It turned out to be gtk-window-decorator.

Then I killed it by its pid (given by xprop or ps). Finally, I restarted it (using Alt + F2 so it would not be bound to the terminal) to get the title bars and other decorations.

share|improve this answer

Best thing to so is run the "ps -A" command to see the processes that are running. Make sure you are not running any critical programs and exit as many programs as possible as that will show less processes in the "ps -A" command.

Then you proceed to kill each of the processes one at a time until the phantom windows disappears. Take a note of the programs before you kill them. This is incase you kill a process that scrambles you computer (memory, you can always reboot). Which means you restart and start again next time the window appears.

It's an iterative process but will help you to fault find.

Once you find the offending program remove it or set its attribute so it cannot execute.

Also google the processes that you see which gives you an idea of what is normal process and ones that you find no reference to which might be the culprit.

share|improve this answer
I can't risk a restart, since I would lose several weeks' worth of computation. But maybe I will try this next time I have the problem occur. Of course it's not obvious that this will work -- what if I close everything in ps -A and the artifact persists? – Charles Mar 7 '13 at 3:58
If its not a process it can then only be the video driver. Sometimes apps have debug windows that they forget to turn off which is my gut feel. So doing a google on the processes is your best bet. You might find that the process you google is known to do that and you will have your answer – Meer Borg Mar 7 '13 at 4:05
Thank you for the help -- I found the problem, which was gtk-window-decorator gone awry. This problem has been happening for months, I'm very glad to have a solution now. – Charles Mar 7 '13 at 4:28

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.