Alt+Tab - switching applications delay. slow

Bug #299330 reported by Egg Yok on 2008-11-18
This bug affects 28 people
Affects Status Importance Assigned to Milestone
Fix Released
metacity (Ubuntu)

Bug Description

After hitting Alt+Tab it takes about .5 second before the application switch applet will be displayed.
on windows XP this application switching window comes up instantly. In Ubuntu I would consider it annoyingly slow

My config. Ubuntu 8.10, plain Gnome

Another issue, it that Shift+Alt+Tab does not navigate the applications in reverse order, the way it works in XP. That would be nice if it's fixed too. Thank you!!

Hello, I can't reproduce this bug.
It's works fine for me with compiz and metacity. I'm using ubuntu 8.10
the applet is dispayed inmediately
Shift+Alt+Tab works in reverse

Egg Yok (eggyok) wrote :

well, technically it's not a bug, only an area for improvement
no delay and shift-alt-tab works in compiz, that's true

the delay i'm reporting about is with plain GTK.
The hardware is IBM T43 with ATI video card

Lupine (thelupine) wrote :

We are closing this bug report because it there has been no activity for an extended period of time. Please reopen it if the bug is still valid or reproducible, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Also, since what you submitted is a Feature Request to improve Ubuntu, you are invited to post your idea in Ubuntu Brainstorm at where it can be discussed, voted by the community and reviewed by developers. Thanks for taking the time to share your opinion!

nsilva (nicolassilva) wrote :

I believe this bug should be re-open, I'm using Ubuntu Jaunty 9.04. If I use the desktop effect under normal, it become annoying switcing back and forth between windows, I agree with Cristian, Ubuntu trys to show the applet switching between windows and it is just annoying and slow. If you switch you Desktop Effects to None, you get rid of that annoyance.

My system settings:

Thinkpad X60
Graphics: Intel GMA950
X Version 11 xorg-server 1.6.0

badawi (danielbadawi) wrote :

same problem here with 9.04
but, with me, the problem appears after some days without reboot or shutdown.

John McCabe-Dansted (gmatht) wrote :

I some times get this if I have a large number of windows open. I disabled visual effects. Problem went away. It said "could not enable visual effects" when I tried to re-enable visual effects. I closed some windows, including one which was frozen, and then it allowed me to re-enable desktop effects. Problem became less serious.

Ubuntu 9.04 64 bit on Dual Core 2 with ATI Radeon 4650 RV730 PRO [Radeon HD 4650], latest flgrx drivers. This machine has not problems with e.g. Wobbly Windows.

 Time to do 10 Alt-tabs:
Extra effects: ~10 seconds
Normal effects: ~9.4 seconds
No(ne) effects: Less than ~3.5 seconds
Extra effects afterwards: 4-7 seconds

Glxinfo reports:
direct rendering: Yes
server glx vendor string: ATI

I have added UseFastTLS to my Xorg to fix a crasher bug in Wine:
Section "Device"
        Identifier "Configured Video Device"
        Driver "fglrx"
        Option "UseFastTLS" "2"

You can benchmark to speed of Alt-tabs with the following line:
time for i in 0 1 2 3 4 5 6 7 8 9 ; do xvkbd -text '\A\[Tab]' ; done

John McCabe-Dansted (gmatht) wrote :

OK, to reproduce, run something like:
for i in `yes | head -n 40` ; do (gwenview /usr/share/evolution/2.26/images/world_map-960.png &) ;done

Then I get ~10 seconds for 10 alt-tabs. Typing
   killall gwenview
makes the problem go away again.

This bug/problem is of hard reproduction. I have two computers here, exactly the same specs, and one has a slow Alt+Tab window switching, and the other one has no problems in this operation. I did some tests with Compiz and the problem just don't seem to be with the desktop effects. I also disabled all the resources I could imagine to cause this problem, and no success.

Well, switching through opened windows it's being really painful for me, and I really hope that you guys can find out what's happening.

Anders Sandblad (arune) wrote :

I have the same problem since upgrading to Ubuntu 9.04. The problem apears when I have more then about 5-6 windows in the same workspace, but not always.

Glxinfo reports:
direct rendering: Yes
server glx vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) G45/G43 GEM 20090326 2009Q1 RC2 x86/MMX/SSE2

I'm running Ludovico Cavedon patched mesa from here to get a virtual screen size bigger then 2048, so I'm running dual screen.

I'm not sure if this has some relatated issue.
I'm also have slow alt+tab problem.

Today, I uninstalled cairo-dock and the problem gone away.
Now I use AWN dock and it's ok.

I'll continue tracking the problem and any news I'll post here.

(sorry for my english)

On Mon, Jul 13, 2009 at 1:55 PM, Anders Runeson <email address hidden> wrote:

> I have the same problem since upgrading to Ubuntu 9.04. The problem
> apears when I have more then about 5-6 windows in the same workspace,
> but not always.
> Glxinfo reports:
> direct rendering: Yes
> server glx vendor string: Tungsten Graphics, Inc
> OpenGL renderer string: Mesa DRI Intel(R) G45/G43 GEM 20090326 2009Q1 RC2
> x86/MMX/SSE2
> I'm running Ludovico Cavedon patched mesa from here
><>to get a virtual screen
> size bigger then 2048, so I'm running dual screen.
> --
> Alt+Tab - switching applications delay. slow
> You received this bug notification because you are a direct subscriber
> of the bug.

Kip Warner (kip) wrote :

I have disabled desktop effects and completely uninstalled compiz, but am having the same problem. I am running Jaunty on a quad-core am64.

Richard Hansen (rhansen) wrote :

Given the number of people that this is affecting, I'm changing the status to confirmed. (This issue also affects me.)

Changed in ubuntu:
status: Invalid → Confirmed
Finog (finog) wrote :

I find the the Alt+Tab slowness crops up when one of the windows I'm flipping between is maximized. Additionally, the whole screen flicks black during the process.

Ben Hearsum (bhearsum) wrote :

I'm hitting this bug, too. I've noticed that the new window gets focus immediately, but the title bar does not look focused for 500ms or so.

@Finog, that's a good point. I just tested, and switching between Firefox and another application is quicker when one is not maximized.

Dave-B (david-balch) wrote :

For me, with compiz enabled, there's variably between ~0.3 and 1.5 seconds delay before the switcher with previews appears.
It seems like more windows to be switched through results in a longer delay.

Without compiz (and no previews) the switcher appears immediately.

On Karmic with 128MB nVidia Corporation NV43GL [Quadro FX 550], using nVidia driver 185.18.36

Dave-B (david-balch) wrote :

FWIW, this essentially makes ALT+TAB with Compiz unusable for me. I have to take a hand off the keyboard to focus the other window with the mouse instead.

Possibly related: When typing monitor break kicks in with a break, there's a delay of 3 seconds between input being frozen and the countdown appearing (the counter appears saying 2:57).

Anders Sandblad (arune) wrote :

Since upgrading to Karmic this issue has not occured for me. I'll test some more and come back if the issue comes back.

urlwolf (quesada) wrote :

I have this same problem. Very annoying.

Todd Chaffee (tc-toddbiz) wrote :

I see this bug too. Jaunty 9.04. Very annoying. Slows down my work flow.

radmege (radmege) wrote :

ALT+TAB (hold alt and keep tapping tab) with visual effects turned on is ridiculously slow when I have a window (such as emacs) maximized. It can take 1-2 seconds for the task-switch pane just to appear. This is very annoying and kills productivity. Once the task switching window appears, switching between tasks is instant.

You are using Ubuntu 9.10 - the Karmic Koala - released in October 2009 and supported until April 2011.

radmege (radmege) wrote :

Just like to add that I found this problem appears ONLY WHEN FIREFOX IS OPEN in that workspace. My guess is that firefox is taking a very long time to render itself into a thumbnail image for the task switcher to display. If I close firefox or jump to a workspace that doesn't have firefox in it, task switching is instant.

Ben Hearsum (bhearsum) wrote :

One thing that I've found helps is to lower the fade in to something near zero. This has more or less eliminated the problem for me.

russ_armst (russ-armst) wrote :

I was affected by the same symptoms but I'm not using Compiz. The culprit was Metacity Compositing which I disabled with the command:

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false

Problem solved (for me), hope that helps someone.

vanadium (ftack) wrote :

This bug affects me as well for a couple of years now. What I see sometimes happening, is that the switcher is drawn in first instance with a windows title bar (without text). The "title" bar quickly disappears, and the switcher then extends downwards by the height of the title bar.

What helps to return to a correct behavior for a short while is to disable visual effects, then re-enable them using "System - Preferences - Appearance". tabbing remains quite slow, but not unworkable so. This concerns a Dell Latitude 810 with a [Radeon Mobility X600] graphics card.

gaga (ytki4ever) wrote :

Those who have ATI video cards should try That helped me a lot (Radeon 9600pro)

Josh Bowman (bowmanjj) wrote :

This bug affects me as well. I have Ubuntu 9.10 and an ATI Radeon X1600. Alt+Tab is very slow even with just two windows open, even if they're not overlapping or anything. If I quickly hit Alt+Tab and release it right away, it can take two to three seconds for focus to change to the other window.

Lain_13 (lain-halfbit) wrote :

On Ubuntu 10.04 (currently beta) that bug affected me before I enabled compiz (normal effects in appearance configuration).
After that bug gone away.
Without compiz all system freezes on Alt-Tab for 3-6 seconds.

VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics

Like lain_13, the bug started to affect me today on 10.04.

Metacity with compositing has really really slow switching. I cannot enable compiz (it tells me that it cannot found the driver)

Josh Bowman (bowmanjj) wrote :

Since I wrote comment #26, I have upgraded to Ubuntu 10.04 (development). This bug still affects me in the ways I described previously.

Changed in metacity:
status: Unknown → Confirmed
junee (giugni) wrote :

problem solved for me after applying what russ_armst wrote on 2010-02-07: #23 ...thanks:)
compositing needs a lot of computing power...
what you loose by turning it off is described here:

Bernard Brosseau (bbrosseau) wrote :

I'm having this bug in Lucid. Compiz doesn't work with dual screen on my computer so I have to use metacity instead. Of course, turning compositing off is out of option.
I think the delay is caused by the time it takes to create the thumbnails in the alt-tab window. I'm using a crap eeepc so it can take several seconds, if I just had a way to turn them thumbnails off I would be very grateful.

russ_armst wrote on 2010-02-07 #23
Thank's a lot russ_armst, deactivating compositing_manager worked, what a relief! This thing has been bothering me way too much, stealing a lot of work-time.
The circumstances for this annoyance 'seems' to be quite different but the annoyance per se is the same. Other so called 'solutions' don't seem to really work for anyone else than the one who presents it.

Ryan Stewart (rds6235) wrote :

I'm seeing this issue in 64-bit Karmic using Compiz.

Ryan Stewart (rds6235) wrote :

I accidentally submitted an incomplete comment there... I have this issue in 64-bit Karmic with Compiz.

Compiz users: make sure you check your settings! In the config manager, go to the Static Application Switcher->Behavior tab, and make sure "Popup Window Delay" is set to 0. I think the default value is non-zero.

Even after doing that, though, I still have just enough of a delay to be moderately annoying.

Changed in metacity:
importance: Unknown → Wishlist
Ben Hearsum (bhearsum) wrote :

This is fixed for me in 10.10.

JP (vectorpoem) wrote :

The original bug report mentions a latency of 0.5 seconds, so note that this is NOT a hugely obvious bug - nevertheless it is one of the most important things to be responsive on the entire desktop. UI responsiveness is usually measured in milliseconds, a full second is an eternity for a keystroke response.

I too see this bug in Ubuntu 10.10 using an Nvidia 240 GT (driver version 260.19.06), with metacity compositing enabled. Latency is near-zero when compositing is disabled. Latency encountered when using Compiz should probably not be discussed in this bug report; compiz is a totally separate code path with unique issues.

Naive observation suggests that the WM is waiting for the window thumbnails to render before it draws the alt-tab window for the first time. It's vastly preferable for the alt-tab window to appear immediately, with whatever representation of the windows it can provide (icon + name) until the window thumbnail is ready to display. Aside from more complex code, are there any reasons this shouldn't be the intended behavior?

Bernard Brosseau (bbrosseau) wrote :

Hi, to confirm, I'm still having the issue since a year ago, even on the latest ubuntu.
I observe 3 or 4 seconds (more with more open windows) before the alt-tab window appears. During this time, the system is not responsive, and thus I lost the habit of using alt-tab, using the mouse to switch app focus....
This only happens when using compositing with metacity.
While we could expect that compositing should not be used with metacity (software rendering), compiz has issues with multi-monitors, and compositing is necessary for several media applications.
As stated in the previous message, changing the order of the alt-tab treatment would be best. A simpler fix would be to be able to modify thumbnails options, such as turning it off.

Olafur Egilsson (olafure) wrote :

This is still a problem in Ubuntu 10.10.
Went away after applying russ_armst's advice.

scv_ (apyszczuk) wrote :

I didn't read all of these posts, but in my case I found a solution. I have a NVIDIA card, and in Ubuntu Additional Drivers I have two options:
 * NVIDIA accelerated graphics driver (version 173)
 * NVIDIA accelerated graphics driver (version current) [Recommended]

Besides that I was using first option in previous releases of Ubuntu there were no problems with ALT-TAB but in 11.04 ALT-TAB was very slow. I changed graphic driver to the second option, and now it's very fast.
Maybe some of you with this trouble can change a graphic driver? It helped me.


Kenji Matsuoka (kenjim) wrote :

Thank you Russ - after upgrading to 11.04 this has annoyed me. Your fix saved the day!

Dmitry Diskin (diskin) wrote :

But what if I do not use compiz, and use metacity compositing instead? Any chance it will work fast?

Pigeonman (aaron-smaco) wrote :

I too have an annoying 0.2sec delay whenever i did alt-tab switching.... and i found a solution!

It's actually configurable... for some reason compiz defaults an "alt-tab" delay of 0.2sec. You need to change that from 0.2sec to 0sec.

I'm on 11.04 btw.

Go to Control Center -> CompizConfig Settings Manager
Click "Static Application Switcher"
Click "Behavior" tab
Change "Popup Window Delay" from 0.20000 to 0.

Voila! Now pressing alt-tab brings up the switcher INSTANTLY.

Kip Warner (kip) wrote :

Thanks Pigeonman, that was helpful.

Denis Konstantinov (linvinus) wrote :

For those who use metacity with enabled compositing_manager, simple patch which deactivates windows previews in alt+tab
So alt+tab works same fast as without compositing_manager.

Index: metacity-2.30.3/src/core/screen.c
--- metacity-2.30.3.orig/src/core/screen.c 2011-08-30 22:55:19.000000000 +0400
+++ metacity-2.30.3/src/core/screen.c 2011-08-30 23:02:19.000000000 +0400
@@ -1285,7 +1285,6 @@
       entries[i].key = (MetaTabEntryKey) window->xwindow;
       entries[i].title = window->title;

- win_pixbuf = get_window_pixbuf (window, &width, &height);
       if (win_pixbuf == NULL)
         entries[i].icon = g_object_ref (window->icon);

Fausto Piovesan (faustop) wrote :

The duplicate flag is wrong, this bug is about alt-tab being slow in Metacity Compositing (upstream bug: while the alleged duplicate is a bug on Compiz.

The one line patch on comment #46 fixes the problem completely and should be applied to Metacity as soon as possible.

Shimi Chen (shimi-chen) on 2012-05-26
affects: ubuntu → metacity (Ubuntu)

Note that the bug has been fixed upstream.

Changed in metacity:
status: Confirmed → Fix Released
Changed in metacity (Ubuntu):
status: Confirmed → Fix Released

8 years later, I still see this bug occasionally in Unity 7.4.0 on Ubuntu 16.04.1.

KSysGuard shows XOrg eating up 5% - 20% CPU in bursts, then dropping down to 3%.

The only workaround is to reboot. Uptime was 9 days.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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