Bug 184645

Summary: KDE stops responding to keyboard after restarting the sound system
Product: [Plasma] kwin Reporter: Unknown <null>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andresbajotierra, aseigo, mail, mkyral
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Unknown 2009-02-17 14:10:22 UTC
Version:           ismeretlen (using 4.2.00 (KDE 4.2.0) "release 97", KDE:KDE4:Factory:Desktop / openSUSE_11.1)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.27.7-9-default

When I restart ALSA (/etc/init.d/alsasound restart), my whole KDE system stops responding to keyboard. Mouse is working correctly, but I cannot do anything either with my external keyboard or with the laptop's built-in.
The VT switching is ok (Ctrl+Alt+Fn).

Restarting eg. Apache does not cause this symptom.

I tried to kill Opera, KMail, Plasma and some other KDE processes but none of them helped.

I don't know how to debug this, but if you give me some hint, I'll try it.

My sound card:
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

Default output devices:
a) HDA Intel (STAC92XX Analog)
   1. ALSA: x-phonon
   2. ALSA: plughw
   3. OSS: /dev/dsp
   4. OSS: /dev/audio
b) PulseAudio
Comment 1 Dario Andres 2009-02-18 22:34:53 UTC
Weird.
Can you create a new user account only for testing if it happens also in a clean account? 
Thanks
Comment 2 Unknown 2009-02-19 19:03:21 UTC
I used the plasma screensaver (because of my machine returned from sleep). Amarok played a track and it stopped producing sound after a ~1 minute (but playing continued).
Sound were not working anymore.

Then I created a brand new account and logged in. Log-in tune and everything were ok (I tried it with mplayer).
After I restarted the ALSA sound service and nothing special happened there.

Logged out and I got back to my previus locked session. Password input was ok but after there were no response to keyboard...

It is like an invisible wall is in front of my screen.
Clicking on X (close button) or some items on the tray are ok, but when I try to click on a tab in Opera or on the "Log out" button in the start menu, I get a "move" cursor (http://www.echoecho.com/css_move.gif )(which probably acts in the same way because clicking is not detected).
Comment 3 Unknown 2009-02-26 15:27:25 UTC
I made an other observation: I stopped NetworkManager (/etc/init.d/network stop) and configured the network (with ifconfig up, dhclient and route) then stopped the network with 'ifconfig eth0 down'.
And after that: all the same as above, no response.
Comment 4 Unknown 2009-04-01 02:06:11 UTC
Ok, I figured out what causes this _in some cases_.

When I have a new mail, Kontact pops up a Plasma notification. After that my screen is locked down (see Bug 186400).

But sometimes this locking is just a "half success", because I can't do anything with my keyboard, but the mouse is fully functionable, and I see my desktop.


`kde4-config --version`
Qt: 4.5.0
KDE: 4.2.68 (KDE 4.2.68 (KDE 4.3 >= 20090327)) "release 1.2"
kde4-config: 1.0
Comment 5 Dario Andres 2009-04-01 19:07:06 UTC
Mh, this is a strange one. 
If the freeze is hardware related (restarting sound system/ network) this may be related to Solid (KDE hardware lib). If it's only sound related it may be a Phonon bug (KDE multimedia system).
The strange cursor and the "freeze" could be related to some strange window/dialog, which blocks the input. 

What Phonon backend do you have? If you change it, does a Plasma notification (from KMail or another app) blocks the PC the same way?

Thanks
Comment 6 Unknown 2009-05-03 13:34:22 UTC
I tried to reproduce it with the current KDE version (/etc/init.d/alsasound restart). This doesn't trigger the bug now.

But when I use Eclipse Platform this occurs randomly yet (last time when I hit Alt+Tab froze the keyboard). When I tried to close Eclipse it asked me whether I would like to save my modifications and I could only click on the "Yes" button after I killed kwin (on tty0).
Comment 7 Unknown 2009-05-04 20:31:06 UTC
I found what triggers this bug now: Alt+Tab. After an hour massive Alt+Tabbing once my screen locked like a fully transparent foil was on that and I could move it with mouse. Only the very-top part (v, ^, x) of a window reacts to a click.

When I kill kwin this "foil" disappears, but there isn't any reactions to the keyboard (maybe because the lack of window manager). Restarting kwin causes this foil appearing again.
Comment 8 Aaron J. Seigo 2009-05-04 21:02:50 UTC
ah, the "kwin eats my keyboard" bug; i run into that one from time to time myself. restarting kwin fixes it indeed; it seems something in kwin grabs the keyboard and then doesn't let it go.
Comment 9 Martin Flöser 2009-05-04 21:11:54 UTC
could this be a duplicate of bug #188499 ?

As Aaron says it seems to happen sometimes and if it isn't that bug I'm sure to find another one in our list, which could fit ;-)
Comment 10 Unknown 2009-05-04 21:30:13 UTC
Oh, and one more observation:
In this "foil mode" when I use mouse wheel on the desktop it doesn't switch between desktops rather than it shows me some kind of "activities" (I don't remember exactly) with my desktop top-left, a brand-new desktop (with no plasmoids on that and with the default air background) top-right and two empty desktops (with gray-white chequered pattern) bottom. Below the two desktops above there is a magnifier and a "setting-like" icon.

Which mode is it? Can it help to determine "where" kwin is in that state?
Comment 11 Unknown 2009-07-08 17:06:29 UTC
Maye I found out how you can get back your keyboard.

First of all you have to minimize all of your windows then open the context menu on your desktop and choose "Command...".
Open its preferences dialog and go to the "User Interface" tab. Now switch to the other one. Click OK and you have your keyboard back. At least it worked for me this time.

This bug is still present on KDE 4.3 RC 1.
Comment 12 Marian Kyral 2009-11-10 06:54:41 UTC
Still in 4.3.3. It usually happen when I'm doing a lot of copy/paste (Ctrl+C, Ctrl+V). Looks like I'm pressing some strange combination instead. I had to restart kwin to have keyboard work again.
Comment 13 Thomas Lübking 2009-11-10 17:27:59 UTC
Sounds as if a modifier got stuck, therefore:
Any idea what "strange" combination this might be? (I.e. do you think the ctrl key got stuck?)
Comment 14 Unknown 2009-11-10 18:23:46 UTC
CTRL button often gets stuck, and I think it's an X Server bug.
Eg. pressing CTRL, releasing it and then using mouse wheel in the browser results in zooming.
Comment 15 Marcel Schaal 2009-11-12 13:50:01 UTC
hi.

there's another kwin/keyboard freeze bug (https://bugs.kde.org/show_bug.cgi?id=203804). it's triggered in a different way mostly penetrating alt+tab randomly.  but the restults is somehow the same. how to debug it?
Comment 16 Unknown 2009-12-04 23:49:08 UTC
They tend to say, you can also get rid of this bug temporarily when you right click on the topmost bar of a window, making the context menu appear. I could not not test it, though.
Comment 17 Unknown 2010-06-10 19:23:02 UTC

*** This bug has been marked as a duplicate of bug 171685 ***