[SRU regression] alt-grave not switching to next window unless 'grave' pressed twice

Bug #1035668 reported by Andreas Raster on 2012-08-11
This bug affects 29 people
Affects Status Importance Assigned to Milestone
Fix Released
Brandon Schaefer
unity (Ubuntu)
Brandon Schaefer

Bug Description

[Test Case]
1. Open two instances of gnome-terminal
2. Make sure one of them has focus
3. Press and hold alt+` for 1sec then release
   -> Verify that the last focused application is highlighted

[Regression Potential]
No regression potential.

Original description:

unity 5.12-0ubuntu1.1 ==> Bug is not present
unity 5.14-0ubuntu1 ==> Bug PRESENT
unity 6.2-0ubuntu1 ==> Bug is not present

1. open two instances of gnome-terminal
2. make sure on of them have the focus
3. press and hold alt+` for 1sec then release the keys

What happens:
Window switcher appears but on leaving the buttons you are again brought back to the same terminal window which had the focus.

What should happen:
The focus should change to next window with the need of pressing greave(') key twice.

Aso to NOTE: if you quickly press alt-` such that the switcher does not appear, the issue won't happen.

Video of the issue: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1035712/+attachment/3257213/+files/bug.webm

=====Original Report=====
With the latest update to 5.14.0-0ubuntu1 the application window switching shortcut is not working as expected. It should be similar to alt-tab, where just quickly pressing it once flips between the two most recent applications.

The window switching should behave the same way but for application windows, but instead pressing it quickly does nothing first because it only expands the window grid in the switcher, to actually switch to another window you have to press it at least twice.

In the previous version, 5.12, the window switching shortcut behaviour was correct (or as I expected it to be).
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.gpus.1: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/1'
.proc.driver.nvidia.registry: Binary: ""
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.49 Mon Apr 30 23:46:33 PDT 2012
 GCC version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,mousepoll,grid,place,snap,regex,gnomecompat,dbus,imgpng,session,workarounds,move,scale,resize,expo,wall,resizeinfo,unitymtgrabhandles,ezoom,unityshell]
CompositorRunning: compiz
DistUpgraded: 2012-04-05 18:09:37,535 DEBUG failed to SystemUnLock() (E:Not locked)
DistroCodename: precise
DistroRelease: Ubuntu 12.04
DistroVariant: ubuntu
EcryptfsInUse: Yes
 NVIDIA Corporation GF104 [GeForce GTX 460] [10de:0e22] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: eVga.com. Corp. Device [3842:1373]
 NVIDIA Corporation GF104 [GeForce GTX 460] [10de:0e22] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: eVga.com. Corp. Device [3842:1371]
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Enabled, In use)
NonfreeKernelModules: nvidia
Package: unity 5.14.0-0ubuntu1
PackageArchitecture: amd64
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-29-generic root=UUID=c0521a4d-86be-4a85-8fca-49c1b4470103 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Tags: precise running-unity precise running-unity precise running-unity possible-manual-nvidia-install ubuntu compiz-0.9
Uname: Linux 3.2.0-29-generic x86_64
UpgradeStatus: Upgraded to precise on 2012-04-05 (128 days ago)
UserGroups: adm admin audio cdrom dialout lpadmin plugdev sambashare video
dmi.bios.date: 02/20/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.6
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P45 Platinum (MS-7512)
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.6:bd02/20/2009:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7512:pvr1.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnP45Platinum(MS-7512):rvr1.0:cvnMICRO-STARINTERNATIONALCO.,LTD:ct3:cvr1.0:
dmi.product.name: MS-7512
dmi.product.version: 1.0
version.compiz: compiz 1:
version.ia32-libs: ia32-libs 20090808ubuntu36
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3.1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3.1
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1.2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Related branches

Peter Tillemans (pti-snamellit) wrote :

I cannot replicate the issue you're describing.

verified that I have the same version as you :

➜ ~ dpkg -l | grep ' unity '
dpkg -l | grep ' unity '
ii unity 5.14.0-0ubuntu Interface designed for efficiency of space a
➜ ~

I have chrome and emacs open

Alt-Tab --> emacs
Alt-Tab --> chrome
Alt-Tab --> emacs
Alt-Tab --> chrome

This seems to work as advertised, i.e 1 shortcut action per switch. The window switcher appears when I hit the Tab key with the next app hilited and dissappears when I release the Alt key. Then the focus switches to the other application.

So if I understood correctly in your case the window appears with the current hilited and you need to press an additional time on the tab to move it to the other application?

Peter Tillemans (pti-snamellit) wrote :

Can you also execute the following command, as it will automatically gather debugging information, in a terminal:

apport-collect 1035668

so more debug info is attached to the ticket.

Thanks for taking the time to report this bug.

Peter Tillemans (pti-snamellit) wrote :

This report looks a lot like this one, can you see if we're talking about the same issue : https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1035628


Andreas Raster (rakete) wrote :

Alt-tab works as expected, the shortcut for application window switching does not work! If you start ccsm and click the 'Ubuntu Unity Plugin', on the second tab named 'Switcher' you'll get two shortcut options:

Key to flip through windows in the switcher
Key to flip through windows in the switcher backwards

I have those bound to <Control>backslash (I replaced tilde/celsius with backslash in my keyboard layout) and <Shift><Control><Primary> (that works fine, even if it is all modifiers).

Those shortcuts used to behave exactly like alt-tab, but for application windows instead of whole applications.

So I have two terminals open and want to switch between them, then I could just press ctrl-backslash once and it switched. Now, after the upgrade, it just shows the switcher with the window grid expanded on the first press, but does not switch. I have to press ctrl-backslash twice to switch to the other application window.

Alt-tab works exactly as I expect it to work! But I can't use it to switch between windows quickly, it switches to the next application (just as I expect). So if I would want to switch between two terminals with alt-tab I would have to press once to switch to the next application, then switch backwards to go back to the terminal application group, then wait for the windows to expand and finally switch to the other terminal.

tags: added: apport-collected compiz-0.9 possible-manual-nvidia-install running-unity ubuntu
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

And that other bug report does not really sound similar. My problem is there all the time, I can't switch slowly and then it works as expected. It always happens. Regardless if I try to switch quickly or slowly.

Ha, actually I just tried and when I try to switch _very_ quickly it works sometimes correctly. But I have to be _really_ fast to accomplish that. A lot faster then I normally type.

Andreas Raster (rakete) wrote :

I just verified with a clean install in VirtualBox that the latest version has the same problem and that the version before that works as expected.

While doing that I noticed that it is somewhat less of a problem in the VM because everything runs so much slower in it. So I can actually visually see that when the window switcher comes up, it first starts with the windows in correct order and then a few milliseconds after it sorts them so that the currently focused window is selected instead of the next window.

Which means that if I release the shortcut keys quick enough, everything works correctly.

I think the changes to SwitcherController here:

are probably what is causing the problem. Although I think it is likely that these changes not directly cause, but some other side effect somewhere is the root cause that wasn't noticed before and now is.

Maybe std::sort(results.begin(), results.end(), CompareSwitcherItemsPriority); in Controller::Show is called twice for some reason? Or the reordering of lines in Controller::ShowView or Controller::ConstructView might be the problem (although I would wonder why those should be called more then once)?

Omer Akram (om26er) on 2012-08-12
description: updated
summary: - Application window switching does not work as expected. Need to press
- shortcut twice to switch.
+ [SRU regression] alt-grave not switching to next window unless 'grave'
+ pressed twice
description: updated
Changed in unity (Ubuntu):
importance: Undecided → High
status: New → Confirmed
no longer affects: unity (Ubuntu)
no longer affects: unity/5.0
Changed in unity:
milestone: none → 5.16.0
importance: Undecided → High
Changed in unity (Ubuntu Precise):
importance: Undecided → High
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu Precise):
status: New → Confirmed

Coming from bug 1035712. Here's a video of the issue: It flips the windows around.


description: updated
bitinerant (bitinerant) wrote :

This bug effects alt-tab as well in certain cases. Before I rebooted this morning, alt-tab once would switch to the prior window, even if it was the _same application_ (perfect behavior, in my opinion). Now, if the prior window was the same application, alt-tab returns focus to the same window unless I do it really quickly (quickly just like alt-tilde--see comment #30).

Sparhawk (sparhawkthesecond) wrote :

This "fix" in Unity 5.14 may have been the source of the regression. N.B. that the "fix" didn't correct the relevant bug anyway.

Also, as also noted in the duplicate to the current bug (at https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1035712 ), the switcher preview often flicks around. Call the top window A, and the second window B. Then, sometimes the switcher shows A selected at the top, sometimes it shows B selected at the top, and sometimes it shows B, then quickly swaps the position of A and B. Regardless of what the switcher shows, A is always selected after a single alt-`. If the second option is shown (i.e. B at the top), I can repress ` to swap selection to the next window, and this also swaps the position of A and B, as per the third option.

Also, prior to this regression, the alt-` stack was somewhat broken anyway, with a double alt-` selecting the original window. This is outlined here: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1020027

Omer Akram (om26er) on 2012-08-15
Changed in unity:
assignee: nobody → Brandon Schaefer (brandontschaefer)
Changed in unity (Ubuntu Precise):
assignee: nobody → Brandon Schaefer (brandontschaefer)
Changed in unity:
status: Confirmed → In Progress
Changed in unity (Ubuntu Precise):
status: Confirmed → In Progress
milestone: none → ubuntu-12.04.2
Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu Precise):
status: In Progress → Fix Committed
description: updated

Hello Andreas, or anyone else affected,

Accepted unity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity/5.16.0-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Sparhawk (sparhawkthesecond) wrote :

I attempted to follow the instructions on the linked page, but I'm getting an error.

$ sudo apt-get install unity/precise-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '5.16.0-0ubuntu1' (Ubuntu:12.04/precise-proposed [amd64]) for 'unity'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies.
 unity : Depends: libunity-core-5.0-5 (= 5.16.0-0ubuntu1) but 5.14.0-0ubuntu1 is to be installed
         Depends: unity-common (= 5.16.0-0ubuntu1) but 5.14.0-0ubuntu1 is to be installed
         Recommends: unity-lens-music but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Omer Akram (om26er) wrote :


Omer Akram (om26er) wrote :

sudo apt-get upgrade should do it.

Sparhawk (sparhawkthesecond) wrote :

No, it didn't. But perhaps it's not working because I followed *all* the instructions at https://wiki.ubuntu.com/Testing/EnableProposed , including "Selective upgrading from -proposed"? Would I then need to manually meet the dependencies?

muhalifsirin (alperense) wrote :

I am affected by this as well. It did not happen before, I think one of the updates last 30 days broke it.

Problem is speed. If I push alt+` in 1/16'th of a second, I go to next window. but that's impossible. If I keep my finger more than 1/16th of a second, I am back to my current window, then need to push ` key once more while pushing alt key.

Since I got used to unity's of switching windows before update broke this feature, my workflow is messed up now.

Andreas Raster (rakete) wrote :

I just tried it out, I added the proposed repository and upgraded. Currently running version 5.16.0-0ubuntu1. I can verify that for me the problem is gone now.

tags: added: verification-done
removed: verification-needed
Cathy Koller (cathy-koll) wrote :

Not sure what the bug fix will bring, but Alt+Grave should behave differently than Alt+Tab with regards to switching between two prevously viewed windows. Say Gedit has 3 windows open (Window-A and Window-B and Window-C). Alt+Tab will switch back and forth between last two focused windows, say Window-A and Window-C.

If Window-A has focus > press Alt+Tab = Window-C gets focus.
If Window-C has focus > press Alt+Tab = Window-A gets focus.

If Alt+Grave is pressed, focus should go from currently focused window to next same-applicaion-window. So say Window-A has focus. Pressing Alt+Grave will give Window-B focus. Pressing Alt+Grave again will give Window-C focus. Pressing Alt+Grave again will give Window-A focus. This makes a lot more sense than having Alt+Grave work the same way that Alt+Tab does. Alt+grave just cycles between all available windows of the same application, but Alt+Tab goes back and forth between last 2 focused windows and also allows access to all application windows.

Eddie Dunn (eddie-dunn) wrote :

Enabling the precise-proposed repo and running
$ sudo apt-get update; sudo apt-get install unity/precise-proposed

 fixed it for me. I finally got rid of this very, very annoying behavior. Thanks!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 5.16.0-0ubuntu1

unity (5.16.0-0ubuntu1) precise-proposed; urgency=low

  [ Łukasz 'sil2100' Zemczak ]
  * debian/control:
    - Update libgeis-dev and libgrail-dev dependencies in debian/control
  * New upstream release.
    - launcher is not refreshed after user session switch (LP: #1016430)
    - Dragging windows around is slow/sluggish/laggy when multiple monitors
      are enabled (LP: #874619)
    - Dragging icons to reorder -away from launcher causes the dragged icon
      image edges to fade away(cut off) (LP: #1026247)
    - Arrow for indicating lenses points empty space on alt+F2 (LP: #998752)
    - Tooltips backgrounds are not refreshed (no active blur) (LP: #967112)
    - [regression] Unity panel transparency (active blur) not updating properly
      (LP: #865006)
    - [Regression] Hideous low-res icon when using the HUD with autohide
      enabled. (LP: #1035951)
    - Launcher dragged icon is not redrawn when the mouse pointer is not moved
      (LP: #1032700)
    - Black background around after dash is restored (LP: #992516)
    - Refreshing active blur makes the dash painfully slow (LP: #874230)
    - [SRU regression] alt-grave not switching to next window unless 'grave'
      pressed twice (LP: #1035668)
    - [SRU Regression] Unity 5.14 + Nux 2.14: Launcher tooltips are
      incomplete/missing (LP: #1034164)
    - [nvidia] unity crashed in
      nux::GraphicsEngine::QRP_GLSL_1Tex (glDrawArrays) (LP: #1031554)
    - compiz crashed with SIGSEGV in
      (LP: #1020075)
    - Much slower OpenGL frame rates with unityshell loaded, than plain compiz
      (LP: #988079)
    - Compiz won't start if "unredirect fullscreen windows" is enabled
      (LP: #980663)
    - [regression] Unity launcher on-screen corruption on resume from suspend
      with nVidia proprietary driver (LP: #915265)
    - Desktop, Launcher and menu bar still visible when screen locked
      (LP: #886605)
    - Unity is visible on top of fullscreen apps (LP: #734908)
    - [nvidia] compiz crashed with SIGSEGV in
      nux::BasePainter::PaintBackground (LP: #982626)
    - Update dependency on the renamed libgeis

  [ Didier Roche ]
  * debian/control:
    - build-dep on latest nux as libgeis-dev and libutouch-geis-dev are
      conflicting (LP: #1047385)
 -- Lukasz 'sil2100' Zemczak <email address hidden> Tue, 11 Sep 2012 10:53:17 +0200

Changed in unity (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Changed in unity:
status: Fix Committed → Fix Released
Hassan Williamson (hazrpg) wrote :

Bug affects me too... here are my details:

$ unity --version; apt-cache policy unity; lsb_release -a; uname -a;
unity 5.16.0
  Installed: 5.16.0-0ubuntu1
  Candidate: 5.16.0-0ubuntu1
  Version table:
 *** 5.16.0-0ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.10.0-0ubuntu6 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux penguin 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:48:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

To post a comment you must log in.