metacity causing Xorg to hammer the CPU with a focus-request having timestamp of 0

Bug #605829 reported by Mirco Müller
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Metacity
New
Medium
metacity (Ubuntu)
Invalid
Medium
Unassigned
Lucid
Invalid
Undecided
Unassigned
Maverick
Invalid
Medium
Unassigned
unclutter (Ubuntu)
New
Undecided
Unassigned
Lucid
Won't Fix
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: metacity

When starting metacity from a terminal-window with "metacity --replace" I see Xorg hammering the CPU (top shows Xorg at ~75% of CPU) and in the terminal tons of:

"Window manager warning: Got a request to focus 0x4801bae (mirco@X61:) with a timestamp of 0. This shouldn't happen!"

When I move the mouse-cursor out of this very terminal-window this hammering of the CPU stops.
---
Architecture: i386
DistroRelease: Ubuntu 10.10
Package: metacity 1:2.30.1-2ubuntu2
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-8.13-generic 2.6.35-rc5
Tags: maverick
Uname: Linux 2.6.35-8-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Mirco Müller (macslow) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Changed in metacity (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-10.10
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I'm seeing this as well, starting in 10.10.
One question - is it metacity's problem or gnome-terminal/vte/gtk ?
(I run with metacity as my default window manager, so don't do the --replace, I just noticed the errors in the .xsession-errors and they seem to correspond to a rapidly flickering mouse cursor over terminals).

Window manager warning: Got a request to focus 0x20008cd (dg@major: ) with a timestamp of 0. This shouldn't happen!

is the error I get; now the 'dg@major: ' is the title of my terminals and I'm assuming your 'mirco@X61:' are as well.

Dave

Changed in metacity (Ubuntu):
status: New → Confirmed
Revision history for this message
Mirco Müller (macslow) wrote :

'mirco@X61' is indeed the title of my terminal-window. I'm not 100% sure if metacity is cause or effect here.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I've just checked, it's not just terminal windows in mine, so it might well be metacity or a library

Dave

Changed in metacity:
status: Unknown → New
Revision history for this message
Havoc Pennington (hp-litl) wrote :

basically you need to figure out who is sending a _NET_ACTIVE_WINDOW request (e.g. done by gtk_window_present, gtk_window_present_with_time, wnck_window_activate) with a timestamp of 0 (also known as CurrentTime, or GDK_CURRENT_TIME). Then that app needs to be fixed.

Though it sounds like more may be going on, I don't know why this would result in the infinite loop. Unless it's some app "fighting" the WM by setting focus in response to focus changing.

Narrowing it down to only in mouse focus mode, only when running a devil's pie, only when running window list applet, that type of thing might be helpful. See if you can reproduce in failsafe session with only metacity+terminal running.

Revision history for this message
Ioannis Papaioannou (ipaio) wrote :

I have 2 very similar setups of 10.4. One laptop with i915 driver and a desktop with nvidia driver and dual screen (xinerama). Both setups have (almost) identical set of panels and gnome applets. The only difference is an extra panel with "window list" applet in the second screen on the desktop box. My laptop runs smoothly and this bug is non existed. On the desktop box, I have to set focus mode to "click" or else .xsession-errors floods with above warnings and cpu load goes up.

AFAIK, it only affects gnome-terminal when using sloppy focus. Other apps seem unaffected.

Revision history for this message
Ioannis Papaioannou (ipaio) wrote :

I was wrong, other apps are affected. Focusing on editable textboxs on other gnome apps seems to trigger the bug.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

The cause of this seems to be 'unclutter' which got installed during the upgrade.
(Thanks to Forrest who spotted this causing completely different chaos in another bug #61105)

Mirco, Giannis: Can you confirm if you kill the unclutter process that's running that this problem stops?

Dave

Revision history for this message
Christian Reis (kiko) wrote :

I confirm that unclutter is what is causing the messages to be spewed into my .xsession-errors, eating up CPU and causing focus problems between windows when using focus-follows-mouse. Killing it fixes the problem.

I'm a bit curious as to why this was installed in 10.10 -- some dependency recommendation probably pulled it in, and given gnome-session already blanks the cursor when typing anyway I think we should get rid of it (yes, I know unclutter works for all applications, but to speak frankly, it's too big a hammer for the problem).

Christian Reis (kiko)
Changed in metacity (Ubuntu Maverick):
status: Confirmed → Invalid
Changed in metacity (Ubuntu Lucid):
status: New → Invalid
Revision history for this message
Ioannis Papaioannou (ipaio) wrote :

Confirming that removing unclutter fixed the problem.

Changed in metacity:
importance: Unknown → Medium
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Maverick has long since stopped to receive any updates. Marking the Maverick task for this ticket as "Won't Fix".

Changed in unclutter (Ubuntu Maverick):
status: New → Won't Fix
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in unclutter (Ubuntu Lucid):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.