1

I have recently noticed that when I press key bindings like super, ALT + TAB and etc. It activates my host OS instead of my guest OS.

So when I try to go to the applications menu on my guest by pressing super it just goes to the applications menu on my host instead, same with ALT + TAB.

This happens with all my VMs and even in if I run a new VM with Ubuntu installer in a VM with all default settings.

System details:

OS Name: Ubuntu 22.10

GNOME Version: 43.20

Windowing System: Wayland

Graphics: NVIDIA GeForce GTX 1660 / NVIDIA GeForce GTX 1660

VM software details:

virt-manager version: 4.1.0

QEMU Version: 1:7.0+dfsg-7ubuntu2

1 Answers1

1

This is a bug in GNOME shell (Ubuntu bug 1998017). It has been fixed upstream, but the fix hasn't made its way into Ubuntu yet.

As a workaround, I was starting virt-manager from the command line using X instead of Wayland (WAYLAND_DISPLAY= virt-manager).

But just today, I discovered that you can actually patch this yourself fairly easily since it's a javascript file. Basically, it boiled down to this:

  1. mkdir -p ~/.gnome-shell-custom-overlays/ui
  2. echo 'export G_RESOURCE_OVERLAYS="/org/gnome/shell=$HOME/.gnome-shell-custom-overlays"' >> ~/.profile
  3. gresource extract /usr/lib/gnome-shell/libgnome-shell.so /org/gnome/shell/ui/inhibitShortcutsDialog.js > ~/.gnome-shell-custom-overlays/ui/inhibitShortcutsDialog.js
  4. $EDITOR ~/.gnome-shell-custom-overlays/ui/inhibitShortcutsDialog.js # manually patch

You can see the patch to apply here. In theory I would think you can log out and back in to see the results, but I went ahead and rebooted just to be sure. I've only been running with this patch for a few hours, but so far so good.

I plan to comment out the line in .profile any time GNOME Shell is updated. Then repeat steps 3 and 4. If the patch is still needed, uncomment the line in .profile to continue using the patch. If it's no longer needed, then clean everything up and return to the Ubuntu version without the patch.