gamescope
gamescope copied to clipboard
Firefoxes drop-down menus do not work
The menus simply do not open/render and the mouse gets snaped to the top left corner of the screen.
Additionally the overflow menu can (sometimes) freeze the whole program.
I do not know what else to add, or what info to provide so please do ask.
I'm seeing this too, when
- clicking on the menu (3 bars in top right)
- right-clicking to bring up any context menu
- mouse-hovering on some elements in pages
Would be happy to provide any info to help debug/diagnose
hardware: Steam Deck problem is present on both Stable and Beta updates as of 13th Nov 2022
Collating a few discussions on this bug from elsewhere, in case it's helpful. It seems to pre-date the change from Firefox being built-in to being a flatpak, and spans many versions of Firefox, so I'm assuming this is not a Firefox-specific issue.
Github:
- ValveSoftware/SteamOS#723
Steam Community forums:
- Firefox Hamburger menu on steam deck not working in gaming mode April 2022
- Browser on Gamemode going crazy May 2022
- Pop-ups won't work Aug 2022
- right click menus do not display for desktop apps running in game mode Nov 2022
Reddit:
- https://www.reddit.com/r/SteamDeck/comments/v8zqcn/firefox_vs_chrome_in_game_mode/
- https://www.reddit.com/r/SteamDeck/comments/xp1dd8/anyone_else_having_issues_with_firefox_in_gaming/
ran gamescope -- flatpak run --env=MOZ_LOG=1 --env=WAYLAND_DISPLAY=wayland-0 org.mozilla.firefox
in desktop mode
Tracing 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: [wayland] unable to lock lockfile /run/user/1000/gamescope-0.lock, maybe another compositor is running
wlserver: Running compositor on wayland display 'gamescope-1'
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/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X1: Address already in use
wlserver: [xwayland/server.c:92] Starting Xwayland on :2
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06468920 (res 0x560a06615000)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 95
pipewire: renegotiating stream params (size: 1280x720)
Gtk-Message: 20:16:38.162: Failed to load module "canberra-gtk-module"
[GFX1-]: glxtest: Could not connect to wayland socket
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a064fb720 (res 0x560a064a0980)
pipewire: renegotiating stream params (size: 1280x717)
[2022-12-27T04:16:40Z ERROR glean_core::metrics::ping] Invalid reason code startup for ping background-update
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
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a05a71290 (res 0x560a06c10410)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06797660 (res 0x560a065715d0)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a067979a0 (res 0x560a065f81a0)
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06797ce0 (res 0x560a065caca0)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4a550 (res 0x560a06d989d0)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4a980 (res 0x560a06a1d380)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a06d99500)
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a067370d0)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a06737d30)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a06d99500)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560a06e4aa40 (res 0x560a06a233e0)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
I hope this can be resolved, all my everything is saved in firefox, and having two web browsers installed on the steam deck is kind of a pain.
im having the same issue. whenever anything on screen is clicked, the mouse cursor teleports to the top left corner of the screen. Firefox therefore can not be used at all.
Works with the latest commit with wayland support enabled 9600bbaadf9c52a13c9a1ea805ae656f875786e8
https://github.com/Plagman/gamescope/commit/1afea5eb866ac96ffeb1e54f7554f327256afff3
MOZ_ENABLE_WAYLAND=1 ./build/src/gamescope -- env WAYLAND_DISPLAY='wayland-0' firefox
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] 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: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: AB48 (0x38344241)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :2
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0xf6cf80 (res 0x74a8f0)
wlserver: [xwayland/server.c:273] Xserver is ready
So i guess its now just a matter of waiting for this to get pushed live?
You want --expose-wayland not whatever env thing you are doing. The Gamescope socket is gamescope-0, not wayland-0. You are just running firefox on your host compositor.
The code still works
./build/src/gamescope --expose-wayland -- firefox
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] 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: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: AB48 (0x38344241)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :2
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x1d42a80 (res 0x1f71320)
wlserver: [xwayland/server.c:273] Xserver is ready
[16764, Main Thread] WARNING: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed: 'glib warning', file /home/abuild/rpmbuild/BUILD/firefox-109.0.1/toolkit/xre/nsSigHandlers.cpp:167
(firefox:16764): Gdk-CRITICAL **: 02:50:13.129: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed
I might have to install development tools on steam os to check
Could someone explain what I will need to add to the Firefox in steams Launch options setting in order to have it work in game mode? sorry, i know enough in linux to not get myself in trouble, but not enough to properly implement the fixes suggested above.
Currently, Launch options has: "run --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @@u @@". this was generated by the deck when i added the shortcut to steam.
Could someone explain what I will need to add to the Firefox in steams Launch options setting in order to have it work in game mode? sorry, i know enough in linux to not get myself in trouble, but not enough to properly implement the fixes suggested above.
Currently, Launch options has: "run --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @@U @@". this was generated by the deck when i added the shortcut to steam.
The newest gamescope have not filter down into steam os yet. Valve will need to add configuration variables into the UI to allow wayland socket to be exposed. I wonder if I can nest gamescope within gamescope if valve has not expose the option.
Right now, I enabled xwayland. The content menus don't work. I just work around by using keyboard shortcuts mapped onto the controller
run --env=MOZ_ENABLE_WAYLAND=1 --env=WAYLAND_DISPLAY='wayland-0' --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @https://github.com/U @@"
The final runtime args should be
run --env=MOZ_ENABLE_WAYLAND=1 --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @https://github.com/U @@"
run --env=MOZ_ENABLE_WAYLAND=1 --env=WAYLAND_DISPLAY='wayland-0' --branch=stable --arch=x86_64 --command=firefox --file-forwarding org.mozilla.firefox @https://github.com/U @@"
Initially, I was having problems with this command running. Firefox was version 111.0 (Flatpak).
I installed Firefox directly with sudo pacman -S firefox (after fixing some key ring stuff) and Firefox 106.0 (Arch Linux 1.0) was installed. The command above appears to work there.
Desktop mode still shows window protocol x11, desktop environment KDE Game mode shows Window protocol x11, desktop environment unknown
However, Firefox ran with the args, so I guess it's a step in the correct direction?
Tried the 2nd command line as well, same results.
run --env=LD_PRELOAD="" --env=XDG_RUNTIME_DIR=/run/user/1000 --env=WAYLAND_DISPLAY=wayland-0 --socket=wayland --env=MOZ_DBUS_REMOTE=1 --env=MOZ_ENABLE_WAYLAND=1 --branch=stable --arch=x86_64 --command=firefox org.mozilla.firefox
No the context menus do not work but xwayland resizes it slightly better. The second one doesn't work at the moment. This command is one I use to get xwayland working right now.
You're still adding --env=WAYLAND_DISPLAY=wayland-0
which as I mentioned isn't going to work... That's not our socket name.
You're still adding
--env=WAYLAND_DISPLAY=wayland-0
which as I mentioned isn't going to work... That's not our socket name.
Yea. I know. You need to set any value for WAYLAND_DISPLAY to change the display protocol from X11 to xwayland when you start it from gamemode.. The problem is when the display protocol is X11, the resolution is narrow and terrible. I do not know if it cause by gamescope not supporting x11 features or firefox does its own thing. Setting the variables seems to help firefox resize itself to fill the whole screen in steam os.
The variable still needs to be set because firefox checks WAYLAND_DISPLAY
variable as shown below.
https://bugzilla.mozilla.org/show_bug.cgi?id=1720497#c7
https://phabricator.services.mozilla.com/differential/changeset/?ref=3655131
You can take a look at firefox code and discussion below. I will stop setting the variable when the new gamescope build is released. I will probably file new bugs with mozilla because DE gnome still feels wrong in the screen shot.
Web browsers are complicated.. Why are there so many flags and triggers....
Please pay attention to what he's saying. wayland-0 is not gamescope's socket, it's gamescope-0. You need to use that in your env vars.
Please pay attention to what he's saying. wayland-0 is not gamescope's socket, it's gamescope-0. You need to use that in your env vars.
I did.......
wayland-0 is probably KDE wayland socket.
gamescope-0 is the game scope socket and the socket crashes.
https://github.com/ValveSoftware/gamescope/issues/808
You seem to think I do not pay attention whatever @Joshua-Ashton is saying. I am. The bug is still open because the gamescope socket still crashes.
That hasn't been mentioned even once in this issue. From all appearances you have been misunderstanding Joshua as all your comments use wayland-0 with no acknowledgement of gamescope-0 at all. Trying wayland-0 is of pretty questionable value to this issue since, like you guessed, like Joshua mentioned way back, that is just your host compositor and not gamescope at all.
This issue is open because this issue with Firefox persists, trying to run it with Wayland enabled is just a workaround that doesn't even work for this issue.
That hasn't been mentioned even once in this issue. From all appearances you have been misunderstanding Joshua as all your comments use wayland-0 with no acknowledgement of gamescope-0 at all. Trying wayland-0 is of pretty questionable value to this issue since, like you guessed, like Joshua mentioned way back, that is just your host compositor and not gamescope at all.
The bug is context menus. Context menu exist in x11 and wayland.
I debate whether including wayland crashing in this thread because wayland is one route for context menus working. E
This issue is open because this issue with Firefox persists, trying to run it with Wayland enabled is just a workaround that doesn't even work for this underlying issue.
Context menus works when I nest the whole kwin compositor into gamescope. The bug is related to how gamescope handles extra windows.
Edit: technically. Valve can side step the issue by allowing a kiosk mode only compositor for desktop linux applications. Anyone can launch in gamescope for complete application support. I would had tested sway if it was install in SteamOS.
Tested widget.gtk.native-context-menus = true
https://www.reddit.com/r/SteamDeck/comments/16eiyi6/make_firefox_work_better_in_game_mode/?utm_source=share&utm_medium=web2x&context=3
Doesn't work
I do not think widget.gtk.native-context-menus = true
work
https://www.reddit.com/r/SteamDeck/comments/16eiyi6/make_firefox_work_better_in_game_mode/?utm_source=share&utm_medium=web2x&context=3
Tested
widget.gtk.native-context-menus = true
https://www.reddit.com/r/SteamDeck/comments/16eiyi6/make_firefox_work_better_in_game_mode/?utm_source=share&utm_medium=web2x&context=3
Doesn't work
False alarm. I was in kiosk mode which suppress mouse context menus. Mouse context menu works. Firefox menus still do not work. I cannot open plugin menu etc.
Seems to work out of the box on SteamOS Stable with LibreWolf now; not sure about stock FireFox but I imagine it should be fine
Testing on latest Steam Deck PREVIEW version, Firefox flatpak (up to date). It works!
PS: What a PITA to find non-steam screenshots on the disk! And I can't even upload them to my Steam account!
Closing per the last couple comments.