Applications do not receive focus in Wayland sessions

Bug #1826176 reported by Silvio Bierman
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
Mutter
Fix Released
Unknown
gnome-shell (Ubuntu)
Fix Released
Medium
Unassigned
Disco
Fix Released
Undecided
Unassigned
mutter (Ubuntu)
Fix Released
Medium
Unassigned
Disco
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

On a fresh install of Ubuntu 19.04 applications that are started from the dash inside a Wayland session often do not receive focus.
The behavior is inconsistent. Some applications (like the terminal) always properly get the focus. Some like GEdit en Chromium mostly do not receive focus until suddenly they do. It seems to depend on other applications that are already open and may have the focus but I could not discover the exact pattern.

Once clicked or Alt-tabbed into the applications work as expected. But when you simply start typing after opening, for example, GEdit the keystrokes may go to an application window that has just been obscured buy the newly opened one.

This bug is similar to bug 1817924 but that one apparently is limited to X sessions.

[ QA ]

No further verification as this is a fix coming with a GNOME micro release update that is covered by this exception https://wiki.ubuntu.com/StableReleaseUpdates/GNOME

----

ProblemType: BugDistroRelease: Ubuntu 19.04
Package: gnome-shell 3.32.0+git20190410-1ubuntu1
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 24 11:43:33 2019
DisplayManager: gdm3
InstallationDate: Installed on 2019-04-24 (0 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Silvio Bierman (sbierman) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, could you also send the issue upstream on https://gitlab.gnome.org/GNOME/gnome-shell ?

Changed in gnome-shell (Ubuntu):
importance: Undecided → Low
Revision history for this message
Silvio Bierman (sbierman) wrote :

OK, I just filed issue #1211.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just in case, please try uninstalling your extensions:

b'org.gnome.shell' b'enabled-extensions' b"['<email address hidden>', '<email address hidden>', 'gnomeGlobalAppMenu@lestcape', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', 'desktop-icons@csoriano', '<email address hidden>', '<email address hidden>', 'output-audio-devices@muflone']"

since we find a large number of bugs are caused by extensions.

Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in gnome-shell:
status: Unknown → Fix Released
Changed in mutter:
status: Unknown → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixed upstream(?) assuming the upstream bug links are correct.

tags: added: fixed-in-3.32.1 fixed-upstream
summary: - Applications started from the dash often do not receive focus
+ Applications do not receive focus in Wayland sessions
Changed in gnome-shell (Ubuntu):
importance: Low → Medium
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
Changed in mutter (Ubuntu):
status: Confirmed → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package gnome-shell - 3.32.1-1ubuntu1

---------------
gnome-shell (3.32.1-1ubuntu1) eoan; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * Merge with debian
    - Update to 3.32.1 upstream version (LP: #1826936)
    - Fixes Icon disappears from favorites (LP: #1822846)
    - Fix applications aren't focused in Wayland session (LP: #1826176)
    remaining changes:
    + Replace gnome-backgrounds dep with ubuntu-wallpapers and Suggests
      gnome-themes-standard-data, gnome-backgrounds
    + Add some Recommends:
      - ubuntu-session (| gnome-session) to have the ubuntu session available
      - xserver-xorg-legacy
      - yaru-theme-gnome-shell for the default ubuntu theming
    + Update debian/gbp.conf with Ubuntu settings
    + gnome-shell-common.install: Install Ubuntu mode
    + gnome-shell-common.prerm: Remove deprecated ubuntu theme alternative
    + ubuntu/desktop_detect.patch:
      - add caching for desktop detection to avoid querying the current
        desktop env variable as iterate through the list each time. For the
        time of the Shell process, we can expect this env variable to stay
        stable.
    + ubuntu/smarter_alt_tab.patch:
      - quick alt-tab (without showing up the switcher) switch only between
        the last window of the last 2 applications to be focused instead of
        raising all windows of those apps.
    + ubuntu/lightdm-user-switching.patch:
      - Allow user switching when using LightDM.
    + ubuntu/lock_on_suspend.patch
      - Respect Ubuntu's lock-on-suspend setting.
    + ubuntu/gdm.patch
      - as gdm is system-wide and not session-wide, ensure gdm has an ubuntu
        styling by default, not impacting the gnome user session though.
    + ubuntu/background_login.patch
      - Change default background color as we modified the default GDM color
        for our ubuntu session. Change it as well here, still applying the
        background noise loading.
    + ubuntu/gdm_alternatives.patch
      - Add support for GDM3 theme alternatives
    + ubuntu/block_mode_extension_update.patch
      - Don't allow ubuntu mode extension to update
    + optional-hot-corner.patch
      - enable patch proposed by upstream developer already in package (but
        not in series) to add a settings for optional hot corner activation.
    + volume-Add-back-sound-feedback-on-scroll.patch
      - Fix regression causing missing feedback on volume slider scroll
    + main-show-an-error-message-on-gnome-shell-crash.patch,
      global-make-possible-to-set-debug-flags-dynamically.patch,
      main-increase-the-granularity-of-backtraces-in-SHELL_DEBU.patch,
      main-add-backtrace-crashes-all-and-backtrace-all.patch,
      sessionMode-add-support-for-debugFlags-parameter.patch:
      - Improve debug JS tracing for crash reports
    + st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch,
      st-scroll-view-Remove-scrollbars-references-on-dispose.patch:
      - Fix crash on theme changes
    + ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch:
      - stop searches when requested from UI
    + magnifier-Show-cursor-when-magnifier-is-enabled-and-scale.patch:...

Read more...

Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.32.1-2ubuntu1

---------------
mutter (3.32.1-2ubuntu1) eoan; urgency=medium

  * Merge with debian
    - Update to 3.32.1 upstream version (LP: #1826936)
    - Fix applications aren't focused in Wayland session (LP: #1826176)
    - Fix crash on hotplugging a dock with a monitor (LP: #1826182)
    Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr
  * d/p/x11-Add-support-for-fractional-scaling-using-Randr.patch:
    - Fixed crash on calculation of global scale (LP: #1826933)

mutter (3.32.1-2) experimental; urgency=medium

  * Cherry-pick patches from upstream gnome-3-32 branch:
    - compositor-Destroy-window-actors-list-on-destruction.patch,
      compositor-Disconnect-from-stage-signals-on-destruction.patch: Fix crash
      when exiting. (LP: #1813716)
    - 0-initialize a struct we'll be memcmp()ing.
  * Reorder patch series so upstream patches come first (no conflicts, no
    refreshing required).

mutter (3.32.1-1) experimental; urgency=medium

  * New upstream release
  * debian/patches: disable mousekeys with Numlock ON to match the
    documentation (cherry picked from the 3.32 branch)

mutter (3.32.0+git20190410-2) experimental; urgency=medium

  [ Gunnar Hjalmarsson ]
  * Add gnome-control-center-data to Build-Depends. This package provides
    gnome-keybindings.{its,loc}. These are needed if the translation template
    is regenerated at build-time to translate the key bindings defined in
    data/50-*.xml. (LP: #1823722)

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 01 May 2019 11:08:08 +0100

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Silvio, or anyone else affected,

Accepted mutter into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.32.1-2ubuntu1~19.04.1 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 on 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 add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mutter (Ubuntu Disco):
status: New → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Silvio, or anyone else affected,

Accepted gnome-shell into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-shell/3.32.1-1ubuntu1~19.04.1 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 on 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 add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-shell (Ubuntu Disco):
status: New → Fix Committed
Revision history for this message
Silvio Bierman (sbierman) wrote :

Hello Łukasz,

Thanks for this. I have updated to this version yesterday evening and have been working with it for about 10 hours now.

First of all I can confirm that as far as I can tell the problem has been fully resolved. All applications that I start from either the (docked via plugin) dash, the applications overview or from desktop icons (plugin again) properly receive focus. And I have not experienced any problems working with this version up till now.

I will report back here if I see anything unexpected.

Revision history for this message
Ppaalanen (ppaalanen) wrote :

Ubuntu 19.04 with all updates installed, using Ubuntu on Wayland desktop session.

I believe I reproduced the issue:
- click sidebar to launch Firefox (Firefox gets keyboard focus without further actions; ok)
- click sidebar to launch Files (keyboard focus remains on Firefox which is below Files; fail)

Using Terminal instead of Files fails the same way.

Firefox is an X11 application, the rest are Wayland applications, so to me it seems the issue is specifically about not moving focus from an old X11 window to a new Wayland window. I cannot get it to fail otherwise, and the failure seems to be reliable for me.

After upgrading to: libmutter-4-0: 3.32.1-2ubuntu1~19.04.1

I can no longer reproduce the issue I described above.

I would propose to change the tag from verification-needed-disco to verification-done-disco.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Tagged per above.

tags: added: verification-done-disco
removed: verification-needed-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.32.1-2ubuntu1~19.04.1

---------------
mutter (3.32.1-2ubuntu1~19.04.1) disco; urgency=medium

  * Backport from eoan to disco
  * Update VCS metadata

mutter (3.32.1-2ubuntu1) eoan; urgency=medium

  * Merge with debian
    - Update to 3.32.1 upstream version (LP: #1826936)
    - Fix applications aren't focused in Wayland session (LP: #1826176)
    - Fix crash on hotplugging a dock with a monitor (LP: #1826182)
    Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr
  * d/p/x11-Add-support-for-fractional-scaling-using-Randr.patch:
    - Fixed crash on calculation of global scale (LP: #1826933)

mutter (3.32.1-2) experimental; urgency=medium

  * Cherry-pick patches from upstream gnome-3-32 branch:
    - compositor-Destroy-window-actors-list-on-destruction.patch,
      compositor-Disconnect-from-stage-signals-on-destruction.patch: Fix crash
      when exiting. (LP: #1813716)
    - 0-initialize a struct we'll be memcmp()ing.
  * Reorder patch series so upstream patches come first (no conflicts, no
    refreshing required).

mutter (3.32.1-1) experimental; urgency=medium

  * New upstream release
  * debian/patches: disable mousekeys with Numlock ON to match the
    documentation (cherry picked from the 3.32 branch)

mutter (3.32.0+git20190410-2) experimental; urgency=medium

  [ Gunnar Hjalmarsson ]
  * Add gnome-control-center-data to Build-Depends. This package provides
    gnome-keybindings.{its,loc}. These are needed if the translation template
    is regenerated at build-time to translate the key bindings defined in
    data/50-*.xml. (LP: #1823722)

 -- Iain Lane <email address hidden> Wed, 01 May 2019 11:32:50 +0100

Changed in mutter (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for mutter 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 regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package gnome-shell - 3.32.1-1ubuntu1~19.04.1

---------------
gnome-shell (3.32.1-1ubuntu1~19.04.1) disco; urgency=medium

  * Backport from eoan to disco
  * Update VCS metadata

gnome-shell (3.32.1-1ubuntu1) eoan; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * Merge with debian
    - Update to 3.32.1 upstream version (LP: #1826936)
    - Fixes Icon disappears from favorites (LP: #1822846)
    - Fix applications aren't focused in Wayland session (LP: #1826176)
    remaining changes:
    + Replace gnome-backgrounds dep with ubuntu-wallpapers and Suggests
      gnome-themes-standard-data, gnome-backgrounds
    + Add some Recommends:
      - ubuntu-session (| gnome-session) to have the ubuntu session available
      - xserver-xorg-legacy
      - yaru-theme-gnome-shell for the default ubuntu theming
    + Update debian/gbp.conf with Ubuntu settings
    + gnome-shell-common.install: Install Ubuntu mode
    + gnome-shell-common.prerm: Remove deprecated ubuntu theme alternative
    + ubuntu/desktop_detect.patch:
      - add caching for desktop detection to avoid querying the current
        desktop env variable as iterate through the list each time. For the
        time of the Shell process, we can expect this env variable to stay
        stable.
    + ubuntu/smarter_alt_tab.patch:
      - quick alt-tab (without showing up the switcher) switch only between
        the last window of the last 2 applications to be focused instead of
        raising all windows of those apps.
    + ubuntu/lightdm-user-switching.patch:
      - Allow user switching when using LightDM.
    + ubuntu/lock_on_suspend.patch
      - Respect Ubuntu's lock-on-suspend setting.
    + ubuntu/gdm.patch
      - as gdm is system-wide and not session-wide, ensure gdm has an ubuntu
        styling by default, not impacting the gnome user session though.
    + ubuntu/background_login.patch
      - Change default background color as we modified the default GDM color
        for our ubuntu session. Change it as well here, still applying the
        background noise loading.
    + ubuntu/gdm_alternatives.patch
      - Add support for GDM3 theme alternatives
    + ubuntu/block_mode_extension_update.patch
      - Don't allow ubuntu mode extension to update
    + optional-hot-corner.patch
      - enable patch proposed by upstream developer already in package (but
        not in series) to add a settings for optional hot corner activation.
    + volume-Add-back-sound-feedback-on-scroll.patch
      - Fix regression causing missing feedback on volume slider scroll
    + main-show-an-error-message-on-gnome-shell-crash.patch,
      global-make-possible-to-set-debug-flags-dynamically.patch,
      main-increase-the-granularity-of-backtraces-in-SHELL_DEBU.patch,
      main-add-backtrace-crashes-all-and-backtrace-all.patch,
      sessionMode-add-support-for-debugFlags-parameter.patch:
      - Improve debug JS tracing for crash reports
    + st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch,
      st-scroll-view-Remove-scrollbars-references-on-dispose.patch:
      - Fix crash on theme changes
    + ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-...

Read more...

Changed in gnome-shell (Ubuntu Disco):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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