Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

kwin occasionally hangs, which looks like the system not responding to mouse clicks or key presses - although the mouse pointer still moves when you move the mouse!

share|improve this question

5 Answers 5

As described in the official Kwin documentation, a good way to go would be to try this either on a running terminal application or on a virtual console (i.e.: Ctrl+Alt+F1), :

DISPLAY=:0 kwin --replace
share|improve this answer
    
+1, possibly the same effect as my solution (does kwin respond properly to sigint?), and certainly not worse. Also, a single command, so better. –  Sparhawk Oct 11 '13 at 1:34
    
Don't you want to run it in the background? –  Piotr Dobrogost Feb 22 at 21:26

Similar to Robin Green's answer, but this does not require a terminal window to be open already. Instead, specify the display in which to start kwin from tty1. Hence,

Press Ctrl+Alt+F1 to access a terminal. Log in.

Type killall kwin. Then, type in DISPLAY=:0 kwin.

Press Ctrl+Alt+F7 to change back to your primary display.

share|improve this answer
    
Shouldn't kwin be run in the background? –  Piotr Dobrogost Apr 29 at 19:09
    
@PiotrDobrogost If you like. It's running from tty1, which I wouldn't really use anyway, so I don't find backgrounding kwin necessary. –  Sparhawk Apr 29 at 22:53
up vote 1 down vote accepted

Press Ctrl+Alt+F1. Log in. Type killall kwin.

Press Ctrl+Alt+F7.

Quit all open applications until a terminal becomes visible. Hover the mouse over the terminal application. Type kwin &.

What's that, no terminal application open? Tough - you'll just have to reboot.

share|improve this answer
    
I just added an answer that starts kwin from tty1, but I wonder if there is another way (that doesn't require a terminal window to be open already). Presumably you are getting keyboard input back after killing kwin, so after switching back to tty7, can you not just press alt-f2 an run kwin from there? –  Sparhawk Dec 27 '12 at 1:32
    
Also, my two suggestions mean that you don't have to leave a terminal window open. –  Sparhawk Dec 27 '12 at 1:34

This actually works. It is a nasty bug but at least I can recover now.

In my case, there is no need to go back to the console login using ctrl+alt+f2 but using alt+f2 I can simply type killall plasma-desktop plasma-desktop and then using alt+f2 again,

I can run plasma-desktop. Could also be used in a script of course. This way I get back my mouse and I will not lose any work.

share|improve this answer
1  
I think that is a slightly different bug, because as I said, I could not use the keyboard at all except to switch to a virtual console. I do mean literally kwin, not plasma-desktop. –  Robin Green Nov 18 '12 at 17:23

Just do:

killall plasma-desktop
plasma-desktop &

you could have it all in a bash script in case you need it more times,

recoverkde.sh:

killall plasma-desktop
plasma-desktop &
share|improve this answer
1  
And how am I supposed to execute these commands if kwin won't let me do anything on the X display? –  Robin Green Nov 7 '12 at 9:47

Your Answer

 
discard

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.