Open Bug 1787939 Opened 2 years ago Updated 2 years ago

[Flatpak] Firefox menu and all context menu are not opening in Steam Deck game mode

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 105
defect

Tracking

()

UNCONFIRMED

People

(Reporter: keedav, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Steps to reproduce:

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

I can reproduce it with the following steps, in a completely new profile:

  1. Install Firefox from Flathub via the KDE Discover app (from both stable and beta repo)
  2. Add Firefox to Steam by right clicking its icon -> Add to Steam
  3. Return to Gaming mode
  4. Launch Firefox from your Library
  5. Click on the Firefox menu hamburger button
  6. Additionally try to click on the Firefox Pocket button, or right click on one of the tabs
  7. Hover your mouse cursor over an item where a tooltip should be shown (ex. a tab)

Actual results:

Each time I click on the Firefox menu button, the screen flashes briefly, the mouse cursor jumps to the top left corner of the screen, but the Firefox menu is not opening. Also, no other menus are appearing either, no right click context menu, no overflow menu.

It is not invisible, I cannot select the menu items even if I click on the place it would have opened to.

The same things happens if you hover over anything where a tooltip should appear. The screen flashes briefly, but the tooltip is not visible.

Everything is working perfectly in desktop mode.

Expected results:

The Firefox menu, context menus, and tooltips should work in game mode.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I have the same issue.

There's a report on this bug on github too, in the gamescope repo. My understanding is gamescope is used by SteamDeck's gaming mode (step 3 in the bug report) to provide a session/scope for applications to render into.

The issue may be in gamescope or Firefox. It seems to only appear when both are used together. I would guess it's a gamescope issue, but it's entirely possible Firefox is doing something unusual/incorrect/buggy since, to my knowledge, this is the only application that exhibits this bug. Suggested workarounds on forums are to use another browser, which is less than ideal, but suggests other context menus/etc are rendering just fine.

See here: https://github.com/Plagman/gamescope/issues/607

If this is likely a gamescope bug, it may be useful to shed some light on how Firefox renders tooltips, menus and context menus, in order to find other apps similarly affected in gamescope, or help diagnose the bug in gamescope.

Another theory: I just found an old open bug on here with a similar description stating that the context menus don't work in Wayland. The Steam Deck uses Wayland in gaming mode (with gamescope).

https://bugzilla.mozilla.org/show_bug.cgi?id=1729718

And perhaps at the core, there is a long-standing issue relating to Wayland support here:

https://bugzilla.mozilla.org/show_bug.cgi?id=635134

Can you attach about:support contents from the problematic Firefox instance? Should be easy to check whether it's using wayland, X11, or XWayland.

Attached file requested about:support contents (deleted) —
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4) > Can you attach `about:support` contents from the problematic Firefox instance? Should be easy to check whether it's using wayland, X11, or XWayland.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Can you attach about:support contents from the problematic Firefox instance? Should be easy to check whether it's using wayland, X11, or XWayland.

looking at about:support when running Firefox in both game mode, in the desktop running as a game in a game mode (used a script to add KDE as a game) and in desktop mode itself :

  • Gamemode:
    Window Protocol: x11
    Desktop Environment: unknown
  • Desktop running as a game:
    Window Protocol: wayland
    Desktop Environment: kde
  • Desktop mode:
    Window Protocol: x11
    Desktop Environment: kde

(only the first mode suffers from this bug (the desktop as game has its own problems that don't appear to be related))

about:support is quite a lot of info, so let me know if any specific fields are useful. At a guess, the following would be relevant:

Version: 107.0
Build ID: 20221110173214
Distribution ID: mozilla-flatpak
Window Protocol: x11
Desktop Environment: unknown

Environment Variables:
MOZ_ENABLE_WAYLAND 1

Blocks: flatpak
Priority: -- → P3
Hi everyone, I open gamescope in desktop mode.
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a06ceb3f0)

You can trigger this error everytime a context menu is created

gamescope -- ./bin/firefox/firefoxTracing is enabled
wlserver: [backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device 'AMD Custom GPU 0405 (RADV VANGOGH)': queue family 1
vulkan: physical device supports DRM format modifiers
vulkan: supported DRM formats for sampling usage:
vulkan: 0x34325241
vulkan: 0x34325258
vulkan: 0x3231564E
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:18] Starting headless backend
wlserver: [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
wlserver: [xwayland/server.c:92] Starting Xwayland on :1
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x55883f2e83f0 (res 0x55883ef76f70)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 103
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x55883f5b8a60 (res 0x55883f06feb0)
xwm: Unhandled initial NET_WM_STATE property: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled initial NET_WM_STATE property: _NET_WM_STATE_MAXIMIZED_HORZ
pipewire: renegotiating stream params (size: 1280x717)
The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported maximum keycode 708, clipping.
X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x55883eecb950 (res 0x55883eec7810)
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x55883f340410 (res 0x55883eec8230)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN

Summary: Firefox menu and all context menu are not opening in Steam Deck game mode → [Flatpak] Firefox menu and all context menu are not opening in Steam Deck game mode
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: