Debian Bug report logs - #266118
unclutter: Blinks pointer and causes 100% CPU usage

version graph

Package: unclutter; Maintainer for unclutter is Axel Beckert <abe@debian.org>; Source for unclutter is src:unclutter.

Reported by: Javier Kohen <jkohen@users.sourceforge.net>

Date: Mon, 16 Aug 2004 19:18:02 UTC

Severity: important

Tags: confirmed, patch

Merged with 384428, 627007

Found in versions 8-1, unclutter/8-14

Fixed in version unclutter/8-19

Done: Axel Beckert <abe@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#266118; Package unclutter. Full text and rfc822 format available.

Acknowledgement sent to Javier Kohen <jkohen@users.sourceforge.net>:
New Bug report received and forwarded. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Javier Kohen <jkohen@users.sourceforge.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: unclutter: Blinks pointer and causes 100% CPU usage
Date: Mon, 16 Aug 2004 15:09:33 -0400
[Message part 1 (text/plain, inline)]
Package: unclutter
Version: 8-1
Severity: normal

Hi,

I found out that if I leave the pointer on top of certain GTK+ controls
it starts blinking instead of being hidden, and the CPU usage according
to the GNOME system monitor applet is at 100% CPU. Those controls seem
to be GAIM's chat window's button bar, Totem's playback control button
bar and probably others. I'm also not sure whether this is a problem
with GTK+ exclusively.

In case it matters I'm using the GNOME Gorilla theme as bundled by
Debian.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8

Versions of packages unclutter depends on:
hi  libc6                     2.3.2.ds1-15   GNU C Library: Shared libraries an
hi  xlibs                     4.3.0.dfsg.1-5 X Window System client libraries m

-- no debconf information

-- 
Javier Kohen <jkohen@users.sourceforge.net>
ICQ: blashyrkh #2361802
Jabber: jkohen@jabber.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#266118; Package unclutter. Full text and rfc822 format available.

Acknowledgement sent to Andy Spiegl <reportbug.andy@spiegl.de>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #10 received at 266118@bugs.debian.org (full text, mbox):

From: Andy Spiegl <reportbug.andy@spiegl.de>
To: 266118@bugs.debian.org
Subject: unclutter: Blinks pointer and causes 100% CPU usage
Date: Wed, 14 Jun 2006 17:08:33 +0200
Hi,

I second this bug report!

It happens with just about all GTK+ programs, e.g. GIMP
But not at all positions of the mouse.  In the case of GIMP
it seems to be the text labels of the UI.  In order to reproduce
it open the print dialog and leave the mouse on top of the label
"Image Size" or "Zoom:" or "Printer Name" or "Paper Size"...

But it does not happen on top of "Scale by:" or "PPI:" or the text labels
of the buttons.  Pretty strange, eh?

Thanks,
 Andy.

-- 
 The pre-release of the alpha for the forthcoming beta of the
 pre-build of the next point release should be out tonight.  (Graeme Devine)



Forcibly Merged 266118 384428. Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Mon, 11 Jan 2010 21:54:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel@lists.debian-maintainers.org>:
Bug#266118; Package unclutter. (Wed, 30 Jun 2010 11:30:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to taobert@gmail.com:
Extra info received and forwarded to list. Copy sent to Daniel Baumann <daniel@lists.debian-maintainers.org>. (Wed, 30 Jun 2010 11:30:06 GMT) Full text and rfc822 format available.

Message #17 received at 266118@bugs.debian.org (full text, mbox):

From: Tao Nelson <taobert@gmail.com>
To: 266118@bugs.debian.org
Subject: unclutter: Blinks pointer and causes 100% CPU usage
Date: Wed, 30 Jun 2010 21:28:19 +1000
[Message part 1 (text/plain, inline)]
Hi there,

I'm also seeing this bug with evince, gimp and amule.

The recommendation (on https://bugs.launchpad.net/ubuntu/+source/unclutter/+bug/385034)
that unclutter be run with -noevents, stops the blinking and cpu usage,
but also stops fvwm from cycling through windows with Alt-Tab.

The attached patch solves the problem satisfactorily for me,
but, not being an X programmer, i don't really understand what FocusOut is for.

The patch is against unclutter-8 
(from http://ftp.de.debian.org/debian/pool/main/u/unclutter/unclutter_8.orig.tar.gz)


bye
TAO.


[unclutter_8.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel@lists.debian-maintainers.org>:
Bug#266118; Package unclutter. (Wed, 30 Mar 2011 18:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francesco Paolo Lovergine <frankie@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Baumann <daniel@lists.debian-maintainers.org>. (Wed, 30 Mar 2011 18:51:03 GMT) Full text and rfc822 format available.

Message #22 received at 266118@bugs.debian.org (full text, mbox):

From: Francesco Paolo Lovergine <frankie@debian.org>
To: Debian Bug Tracking System <266118@bugs.debian.org>
Subject: Re: Blinks pointer and causes 100% CPU usage
Date: Wed, 30 Mar 2011 20:23:05 +0200
Package: unclutter
Version: 8-14
Followup-For: Bug #266118

You can add current evince 2.30.3 to the list of programs which have
problems interacting with unclutter. It works so slow during
pdf slide presentations that it becomes almost unusable.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-1-686 (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages unclutter depends on:
ii  debconf [debconf-2.0]         1.5.38     Debian configuration management sy
ii  libc6                         2.11.2-11  Embedded GNU C Library: Shared lib
ii  libx11-6                      2:1.4.2-1  X11 client-side library

unclutter recommends no packages.

unclutter suggests no packages.

-- debconf information:
  unclutter/autostart: true




Forcibly Merged 266118 384428 627007. Request was from Josselin Mouette <joss@debian.org> to control@bugs.debian.org. (Thu, 19 May 2011 17:45:05 GMT) Full text and rfc822 format available.

Information stored :
Bug#266118; Package unclutter. (Thu, 26 May 2011 05:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Elliott Mitchell <ehem@m5p.com>:
Extra info received and filed, but not forwarded. (Thu, 26 May 2011 05:45:03 GMT) Full text and rfc822 format available.

Message #29 received at 266118-quiet@bugs.debian.org (full text, mbox):

From: Elliott Mitchell <ehem@m5p.com>
To: 627007@bugs.debian.org, 266118-quiet@bugs.debian.org
Cc: daniel@lists.debian-maintainers.org, joss@debian.org
Subject: Re: Bug#627007: Severe "Processor Leak" when Pointer is on GTK/GDK Window
Date: Wed, 25 May 2011 22:23:12 -0700 (PDT)
Debugging GUI programs within X can be entertaining. Particularly when it
is a library used by many tools. Also interesting to build a debuging
version og GTK/GDK. Grabbing a handy program to try tracking this bug
down...

(not yet complete)

From the unclutter side:
The obvious starting point is line 376 of unclutter.c. This is where
the synthesized event controlled by the "-noevents" flag is done. Setting
the flag is claimed to make the problem disappear.

Looking at the code, event type is EnterNotify. Good enough to start
looking from the GTK/GDK side of things. There is a troubling comment on
line 411, "check if a second unclutter is running cos they thrash", this
sounds suspiciously like what is occuring in this circumstance. I'm
wondering whether the test could be enhanced to detect thrashing due to
GTK/GDK, this does not absolve GTK/GDK of guilt though.


From the GTK/GDK side:
The obvious starting point is to look for handling of EnterNotify events.
I located this in file gdk/x11/gdkevents-x11.c, function
gdk_event_translate(). Working with GDB, I see the following repeating
sequence of X events:

ClientMessage
FocusOut
FocusIn
LeaveNotify
EnterNotify
ClientMessage
FocusOut
FocusIn
EnterNotify

The ClientMessage, FocusOut and FocusIn events appear irrelevant. They
pretty well form a header before the LeaveNotify and EnterNotify events.
I believe the EnterNotify event following the LeaveNotify to be the
genuine one from the X-server; for the EnterNotify event, the detail
field is NotifyAncestor (line 1350). On line 1297 this sets
toplevel->has_pointer to TRUE (however, toplevel->has_pointer is already
TRUE), as a result of line 1366 event->crossing.focus is also set to
TRUE.

The EnterNotify event without the LeaveNotify appears to be the synthetic
one from unclutter that is the immediate cause of problems. Here the
detail field is NotifyInferior (line 1347). On line 1366
event->crossing.focus is set to FALSE.

I have not yet traced where GTK/GDK's half of this fight occurs. It seems
reasonably likely GTK's interpretation of GDK's event->crossing.focus
value is in error. I am troubled by the comments on lines 1294 & 1391,
the problem could well be caused by the attempt to simulate the presence
of a WM.


Currently I am not ready to convict either unclutter or GTK/GDK. As
noted, I do see a spot where this might be worked around in unclutter,
but this does not mean the fault is with unclutter. I am still rather
troubled this is strictly confined to GTK/GDK (programs using Qt or any
other toolkit don't cause problems), this tends to make me suspect
GTK/GDK are the ones misinterpretting X standards, not unclutter.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM@gremlin.m5p.com PGP F6B23DE0         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0






Information stored :
Bug#266118; Package unclutter. (Thu, 16 Jun 2011 00:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Elliott Mitchell <ehem@m5p.com>:
Extra info received and filed, but not forwarded. (Thu, 16 Jun 2011 00:33:05 GMT) Full text and rfc822 format available.

Message #34 received at 266118-quiet@bugs.debian.org (full text, mbox):

From: Elliott Mitchell <ehem@m5p.com>
To: 627007@bugs.debian.org, 266118-quiet@bugs.debian.org
Cc: daniel@lists.debian-maintainers.org, joss@debian.org
Subject: Re: Bug#627007: Severe "Processor Leak" when Pointer is on GTK/GDK Window
Date: Wed, 15 Jun 2011 17:28:49 -0700 (PDT)
Just found what looks suspiciously like a proverbial smoking gun on the
GTK/GDK side of things. Rather contrary to my previous suspicions,
disabling handling FocusOut, FocusIn, LeaveNotify and EnterNotify events
failed to improve the situation. So, finally went in and tried adding
"return_val=FALSEl; break;" right after the ClientMessage case in
gdk/x11/gdkevents.c, just after line 2007. Suddenly the problem
disappears and things seem to continue working.

The problem of course is this *really* isn't the right place for a
problem like this to show up. I (or someone else) will have to figure out
what the heck in GTK/GDK is causing this.




Looking at the patch in Tao Nelson's message on bug #266118. No, I'm
pretty sure that *doesn't* solve the problem. It may work around it, by
causing unclutter to go through its main loop again and inserting a
delay, but that merely means the fight slows down to the point you don't
notice it, I'm pretty sure it doesn't /solve/ it.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM@gremlin.m5p.com PGP F6B23DE0         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0






Information stored :
Bug#266118; Package unclutter. (Wed, 20 Jul 2011 23:15:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Elliott Mitchell <ehem@m5p.com>:
Extra info received and filed, but not forwarded. (Wed, 20 Jul 2011 23:15:13 GMT) Full text and rfc822 format available.

Message #39 received at 266118-quiet@bugs.debian.org (full text, mbox):

From: Elliott Mitchell <ehem@m5p.com>
To: 627007@bugs.debian.org, 266118-quiet@bugs.debian.org
Cc: daniel@lists.debian-maintainers.org, joss@debian.org, control@bugs.debian.org
Subject: Re: Bug#627007: Severe "Processor Leak" when Pointer is on GTK/GDK Window
Date: Wed, 20 Jul 2011 16:11:42 -0700 (PDT)
tags 384428 -unreproducible
severity 266118 important
quit

Been an antertaining adventure trying to track this down. Wonderful
finding things like _gdk_x11_set_input_focus_safe(), which amounts to a
reinplementation of XSetInputFocus(). Even the simplest developer should
have found XSetErrorHandler() in half a second, which would have fixed
that issue. In fact it's rather a Bad Sign(tm) when you find a source
file includes Xlibint.h, which is reserved for Xlib internals. I'm forced
to wonder, perhaps the GDK developers would prefer the Xcb library over
the X11 library?


Anyway, the underlying problem of bug #266118. I tracked this to the
function gdk_wm_protocols_filter() in the file gdkevents-x11.c. The
problematic window manager message is WM_TAKE_FOCUS. This, plus the
setting of the InputHint flag corresponds with X's "locally active" input
model.

This is not a portion of X I'm particularly strong with, so my
conclusions could be wrong. What appears to be happening is whenever GDK
receives the WM_TAKE_FOCUS message it is always immediately calling
_gdk_x11_set_input_focus_safe()^WXSetInputFocus() to set the focus to
it's top-level window, even before it receives the FocusIn event.

Comparing with other libraries, I note Qt also makes use of
WM_TAKE_FOCUS, but does not display this problem. I get the feeling GDK
is misinterpreting how the locally active focus model is supposed to
work. It looks like GDK is always moving focus to its top level window,
never anywhere else; if so, this could readily be accomplished with
passive focus.


At this point, I'm pretty inclined to believe this is a problem with GDK
and unclutter just happens to be the lucky program to tweak it. I'm
working on getting a debug build of QtGui done so I can make a better
comparison to verify this, I suspect that will only confirm this
conclusion.

On the flip side, despite likely not being at fault, unclutter really
could do with some detection for this sort of condition. I imagine this
could reappear with something else in the future; or it might well get
fixed and then get regressed. I'm also astonished a bug like this could
remain in Debian for *7 years*!


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM@gremlin.m5p.com PGP F6B23DE0         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0






Removed tag(s) unreproducible. Request was from Elliott Mitchell <ehem@m5p.com> to control@bugs.debian.org. (Wed, 20 Jul 2011 23:39:07 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'normal' Request was from Elliott Mitchell <ehem@m5p.com> to control@bugs.debian.org. (Wed, 20 Jul 2011 23:39:08 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Sun, 31 Mar 2013 12:33:07 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Mon, 29 Apr 2013 23:57:04 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Tue, 30 Apr 2013 00:39:04 GMT) Full text and rfc822 format available.

Reply sent to Axel Beckert <abe@debian.org>:
You have taken responsibility. (Thu, 02 May 2013 00:36:08 GMT) Full text and rfc822 format available.

Notification sent to Javier Kohen <jkohen@users.sourceforge.net>:
Bug acknowledged by developer. (Thu, 02 May 2013 00:36:08 GMT) Full text and rfc822 format available.

Message #54 received at 266118-close@bugs.debian.org (full text, mbox):

From: Axel Beckert <abe@debian.org>
To: 266118-close@bugs.debian.org
Subject: Bug#266118: fixed in unclutter 8-19
Date: Thu, 02 May 2013 00:32:52 +0000
Source: unclutter
Source-Version: 8-19

We believe that the bug you reported is fixed in the latest version of
unclutter, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 266118@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Axel Beckert <abe@debian.org> (supplier of updated unclutter package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 02 May 2013 02:15:08 +0200
Source: unclutter
Binary: unclutter
Architecture: source amd64
Version: 8-19
Distribution: unstable
Urgency: low
Maintainer: Axel Beckert <abe@debian.org>
Changed-By: Axel Beckert <abe@debian.org>
Description: 
 unclutter  - hides the mouse cursor in X after a period of inactivity
Closes: 266118
Changes: 
 unclutter (8-19) unstable; urgency=low
 .
   * Add patch by Tao Nelson to fix blinking pointer and 100% CPU usage
     with GTK applications. (Closes: #266118) Thanks Tao!
   * Bump debhelper compatibility to 9 to ease hardening build flags
     + Update versioned debhelper build-dependency to >= 9~.
   * Add patch to properly pass $LDFLAGS (fixes lintian warning
     hardening-no-relro) and $CFLAGS (fixes blhc warning)
   * Add patch to fix lintian warning hyphen-used-as-minus-sign.
   * Bump Standards-Version to 3.9.4 (no changes)
   * Fix grammar in README.source.
Checksums-Sha1: 
 c4bc21e2585cd65f3eaeaa6c0305627f8f592c90 1248 unclutter_8-19.dsc
 16a88373c8ea4ff6e9442b7f0361d3a5b36b8953 14134 unclutter_8-19.debian.tar.gz
 94882190e9b0fd2d15f60e2f34d3f94dc45e839d 17948 unclutter_8-19_amd64.deb
Checksums-Sha256: 
 eb586ab16304998c0b29193155bc0add4f5d0b291a7dcda8876c6ae7cd4eb61b 1248 unclutter_8-19.dsc
 6e31d1f30d8490ad387f7380f989e0574b6525895616a4c3724534ac0890f4e8 14134 unclutter_8-19.debian.tar.gz
 d01a4a1982e3a300405d121baa21f35a99c09047523484dd34a1931f98fbb0d7 17948 unclutter_8-19_amd64.deb
Files: 
 a649e845e0163a004ccbe32cdb9dc4e7 1248 x11 optional unclutter_8-19.dsc
 b67447d490f936ed187ffc9adf72b270 14134 x11 optional unclutter_8-19.debian.tar.gz
 2a0c8b83e02b25d7597c08bfa09028a0 17948 x11 optional unclutter_8-19_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlGBsFEACgkQwJ4diZWTDt6+UwCfY1dJRsimJqshE8qJdMHru2Zt
j7kAnRoFeOn185HnpTUQen0sqgB7PGhp
=WY8C
-----END PGP SIGNATURE-----




Reply sent to Axel Beckert <abe@debian.org>:
You have taken responsibility. (Thu, 02 May 2013 00:36:08 GMT) Full text and rfc822 format available.

Notification sent to Marc-Jano Knopp <pub_br_debian.org@marc-jano.de>:
Bug acknowledged by developer. (Thu, 02 May 2013 00:36:08 GMT) Full text and rfc822 format available.

Reply sent to Axel Beckert <abe@debian.org>:
You have taken responsibility. (Thu, 02 May 2013 00:36:09 GMT) Full text and rfc822 format available.

Notification sent to Elliott Mitchell <ehem@m5p.com>:
Bug acknowledged by developer. (Thu, 02 May 2013 00:36:09 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 09 Jun 2013 07:27:40 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 04:38:56 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.