Context menu makes window focus stuck with MX Master 3 on GNOME Wayland

This question was originally posted on SE but as it does not seem to get any traction on there, I decided to resort to my “peers” on here :slight_smile:

I am running Fedora Work Station 41 on GNOME and Wayland (kernel 6.12.7-200, but had this issue since first install @ 6.12.4-something). I am using a Logitech MX Master 3 Wireless mouse with the provided dongle. I also have Solaar installed.

If I right click on a “system window control” (this wording may be incorrect - maybe gtk window??) and it opens the context menu, I cannot click on any other window or interact with anything else, using this mouse, until I either close the context menu by clicking inside the same window (as where I clicked to open the context menu) or if I choose an option from the menu. In other words, the focus is stuck on the parent window owning the right click menu, but only for the Logitech Mouse… I also have a USB Corsair mouse connected with which this problem does not reproduce. I tried installing solaar to get full control and drivers for the mouse, but no change.

This works on X11, not on wayland. I have tried searching for hours for a solution, but found nothing. I found some similar issues for other mice, but those were for X11 and editing xorg.conf. On X11 I have no issue.

Anyone have any ideas? For example here, I can only click inside the terminal or choose an action. Clicking on the window in the background or on my second monitor will not close the context menu, nor change the window focus. As I said, this works fine with a regular USB mouse. The issue also does not reproduce on “third party” context menus, such as google chrome right click. I am mainly seeing the issue with my terminal emulator (gnome terminal) and the default (nautilus) file manager context menus.

Hi and welcome to :fedora: !

While this issue is obviously hardware specific, given that you’ve pointed out that it doesn’t happen with other mice, from your description it seems to be reproducible on gtk4 (nautilus) and legacy gtk (gnome-terminal) apps only. In order to confirm this supposition, you could test the issue with other gtk and non-gtk apps.

I see you’ve mentioned the nvidia tag. There were some graphical issues on certain F41 systems in the GTK+Wayland+nVidia combination, in which case this workaround was a fix. You could test it yourself, given that it’s easily reversible.

From your description it seems that this was an F41 fresh install, yet you are using gnome-terminal, which is not shipped anymore beginning with F41, but the new ptyxis terminal instead. Is this correct, and you’ve installed gnome-terminal after the OS installation?

Please also post the output of inxi -Fzxx.

Hi! Thanks for the reply, I tried with gnome calculator and it reproduces. Note that it is not necessarily always a right click context menu, rather here it is some other type of context menu (dropdown).


Same thing with gnome camera and “Disk Usage Analyzer”. Interestingly enough, “Disks” has no issue (Gnome Disk Utility).
Non-GTK apps like Chrome, Spotify, Discord does not have the issue.

inxi output

❯ inxi -Fzxx
System:
  Kernel: 6.12.7-200.fc41.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.43.1-5.fc41
  Desktop: GNOME v: 47.2 tk: GTK v: 3.24.43 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 41 (Workstation Edition)
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-PRO v: Rev X.0x
    serial: <superuser required> part-nu: SKU UEFI: American Megatrends v: 5013
    date: 03/22/2024
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 50% (should be ignored) status: N/A
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2
    rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB
  Speed (MHz): avg: 550 min/max: 550/4426 boost: enabled cores: 1: 550
    2: 550 3: 550 4: 550 5: 550 6: 550 7: 550 8: 550 9: 550 10: 550 11: 550
    12: 550 13: 550 14: 550 15: 550 16: 550 bogomips: 115206
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3060] vendor: ASUSTeK driver: nvidia
    v: 565.77 arch: Ampere pcie: speed: 2.5 GT/s lanes: 16 ports: active: none
    off: DP-1,DP-2 empty: DP-3,HDMI-A-1 bus-ID: 08:00.0 chip-ID: 10de:2487
  Device-2: Microsoft LifeCam HD-3000 driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-2.1:5
    chip-ID: 045e:0779
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: gnome-shell driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: DP-1 model: Samsung LC24RG50 res: 1920x1080 dpi: 92
    diag: 613mm (24.1")
  Monitor-2: DP-2 model: Samsung LC24RG50 res: 1920x1080 dpi: 92
    diag: 613mm (24.1")
  API: OpenGL v: 4.6.0 vendor: nvidia v: 565.77 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
    display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 08:00.1 chip-ID: 10de:228b
  Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio
    vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 0a:00.4 chip-ID: 1022:1487
  Device-3: Microsoft LifeCam HD-3000 driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-2.1:5
    chip-ID: 045e:0779
  Device-4: SteelSeries ApS Arctis Nova 5
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 bus-ID: 1-2.4:8 chip-ID: 1038:2232
  API: ALSA v: k6.12.7-200.fc41.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    pcie: speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 8086:1539
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 2.29 TiB used: 738.29 GiB (31.6%)
  ID-1: /dev/nvme0n1 vendor: A-Data model: SX8200PNP size: 476.94 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 32.9 C
  ID-2: /dev/sda vendor: Seagate model: ST2000DM001-1CH164 size: 1.82 TiB
    speed: 6.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 174.61 GiB used: 71.75 GiB (41.1%) fs: btrfs
    dev: /dev/nvme0n1p6
  ID-2: /boot size: 973.4 MiB used: 465.7 MiB (47.8%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-3: /boot/efi size: 95 MiB used: 50.1 MiB (52.7%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 174.61 GiB used: 71.75 GiB (41.1%) fs: btrfs
    dev: /dev/nvme0n1p6
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 607.2 MiB (7.4%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 38.0 C mobo: 36.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.52 GiB used: 6.47 GiB (41.7%)
  Processes: 654 Power: uptime: 8h 23m wakeups: 0 Init: systemd v: 256
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 16
    Compilers: gcc: 14.2.1 Shell: Zsh v: 5.9 running-in: gnome-terminal
    inxi: 3.3.36

Lastly, yes, you are correct. I manually installed gnome-terminal myself. Personal preference (got used to it in earlier versions of Fedora on my other machine).

I will try the workaround next :slight_smile:

@tqcharm I tried the workaround you linked but it made no difference :frowning:

(I did reboot too)

❯ sudo cat /etc/profile.d/gsk_renderer.sh
export GSK_RENDERER=ngl

GNOME Disk Utility is a legacy GTK app, but so is GNOME Terminal on the other hand, so no relevant consistency here.

While the chances are low that it will make any difference, you could nevertheless try with GSK_RENDERER=gl as well.

Should you not receive a solution here, you could raise the issue with GNOME, probably against Mutter.

Unfortunately it did not help either :confused: That being said, I noticed that the part that is working in GNOME Disk Utility actually also works in GNOME Terminal - sorry! I got confused because in (non legacy) GTK apps, this context menu does cause the issue


However, in non-legacy GTK apps, it seemingly works, even in GNOME Terminal. The part that does not work in terminal is the right click context menu, which perhaps somehow does not belong to the application itself…?

Issue:

No issue:

To repeat, the “no issue” menu is causing the issue on non-legacy GTK apps (seemingly - eg. nautilus [first pic]).

Does this help, or should I open an issue?

I am cross-posting a report with a strange behavior by a similar mouse from the same MX series, perhaps the two issues are somehow related.

I opened an issue against Mutter on Gitlab.

1 Like

It got closed as there is already an open one apparently. This one is the one to follow for those interested: Opening the three dots (application menu) in GTK applications renders clicks in other windows void until one returns to the original window and clicks outside of the menu when using mouse with keyboard capabilities (#3414) · Issues · GNOME / mutter · GitLab