FS#21092 - [xorg] Something steals (grabs) X server pointer

Attached to Project: Arch Linux
Opened by Tomas Mudrunka (harvie) - Tuesday, 05 October 2010, 18:09 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Tuesday, 31 May 2011, 20:25 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
This started to occur about week ago.
I am using latest gnome and latest xserver and sometimes i can't use mouse to witch windows or i can use mouse only in some applications while i can't use it in others. Also sometimes i can't switch windows using alt+tab (sometimes i can workaround it by using shortcut to display desktop and then use alt+tab, but it does not work everytime). sometimes i can click only to windows, but not to gnome panel (or-vice versa). executing commands using alt+f2 works almost at everytime. sometimes i can only navigate through desktop icons using keyboard arrows or activate gnome-panel menu using alt+f1, but i am prevented from doing anything else. this is very annoying (because only thing i can do is ctrl+alt+f1 and killing gnome/gdm from vc1 and therefore i loose everything that i have opened/unsaved in that desktop session). When i tried to lock screen Xscreensaver said "Couldn't grab pointer" when screen was locked (well i was still able to unlock it, but it didn't solved anything).

Steps to reproduce:
be using archlinux desktop with gdm,gnome,pidgin and some web browser for a while (i don't know what triggers this, since it does not happens all the time, sometimes i use the same set of applications without an issue).

Does somebody experience the same? Does somebody knows some workaround (eg. few lines of C code, that can "ungrab" X pointer from captivity)?
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Tuesday, 31 May 2011, 20:25 GMT
Reason for closing:  None
Additional comments about closing:  Nothing to do.
Comment by Tomas Mudrunka (harvie) - Tuesday, 05 October 2010, 18:11 GMT
probably useless idea: sometimes flashplayer grabs keyboard (but you have to click in the applet), maybe now they started to grab even mouse and even without clicking. i am not sure, but i think it happens even when browser is not launched.
Comment by Tomas Mudrunka (harvie) - Tuesday, 05 October 2010, 18:17 GMT
I found only xungrabpointer and it seems to me that it can't be used to force pointer to be ungrabbed/released from other process.

man 3 xgrabpointer
int XUngrabPointer(Display *display, Time time);

The XUngrabPointer function releases the pointer and any queued events if this client has actively grabbed the pointer from XGrabPointer, XGrabButton, or from a normal button press.
Comment by Jan de Groot (JGC) - Wednesday, 06 October 2010, 06:40 GMT
When your mousepointer is stuck, you only need to kill the process that grabs it, not the whole desktop. Sometimes this can happen with interrupted drag&drop events. I've seen this a few times with epiphany before, killing epiphany will release the pointer in that case.
Comment by Tomas Mudrunka (harvie) - Wednesday, 06 October 2010, 10:48 GMT
JGC: Well i see. but i am not sure if it works when i send SIGKILL instead of SIGTERM. I have an idea... i can create LD_PRELOAD library that will prevent epiphany from grabbing pointer...

BTW i have experinced the same problem even with firefox.

is there some way to detect which process grabbed the pointer so i will not need to try killing all processes in future?
Comment by Jan de Groot (JGC) - Wednesday, 06 October 2010, 10:58 GMT
By disabling mouse pointer grabbing, you can't drag&drop anymore, so that's something you should realize.
You could be correct about the flash plugin, which also explains why both firefox and epiphany (and probably any other browser) is affected by this.
Comment by Tomas Mudrunka (harvie) - Wednesday, 06 October 2010, 11:53 GMT
JGC: it does not matter. if you are prevented from drag&drop it's still better than if you are prevented from both - drag&droping and clicking.
in firefox we have luck and we can preload the flashplayer only while leaving firefox untouched as it runs in separate processes. eg.: by looking for "flashplayer.so" in argv.
Comment by Tomas Mudrunka (harvie) - Thursday, 07 October 2010, 13:38 GMT
it is not caused by specific app.
it works after downgrade from:

[extra]
Server=http://arm.konnichi.com/2010/07/01/extra/os/i686
Comment by Tomas Mudrunka (harvie) - Tuesday, 22 February 2011, 03:28 GMT
Still not fixed (i have to use old version of xorg)
Comment by Ramana Kumar (xrchz) - Thursday, 26 May 2011, 22:33 GMT
I have experienced mouse-grabbing issues with the "resize grip" in the bottom right corner of various GTK3 apps (which I wish would just go away!) when using Xmonad. Specifically, the cursor still moves, but none of the buttons do anything any more, and the window manager stops noticing where the cursor is (for changing focus etc.). This might be a possibility for your unknown cause...
Comment by Tomas Mudrunka (harvie) - Friday, 27 May 2011, 14:31 GMT
Right now i am running latest xorg without xorg.conf and everything works as expected ;) So we can close the bug (if there's nobody with similar porblems)

Loading...