steamos gamemode opens flatpak firefox in x11 mode
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: monkeyboyted, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
Steps to reproduce:
System: SteamOS 3.4 Beta - November 11, 2022 - steam deck
Create a custom non steam application with these settings below.
command: /usr/bin/flatpak
start in: $HOME
extra arguments: run --socket=wayland --env=MOZ_ENABLE_WAYLAND=1 --branch=stable --arch=x86_64 --command=firefox org.mozilla.firefox --window-size 1920,1200
https://github.com/Plagman/gamescope
https://steamcommunity.com/app/1675200/discussions/0/5568165891217929856/
Actual results:
The about support shows x11.
Expected results:
--socket=wayland and --env=MOZ_ENABLE_WAYLAND=1 should had enable wayland when launch in gamemode aka gamescope.
Comment 2•2 years ago
|
||
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.
Reporter | ||
Comment 3•2 years ago
|
||
I think it more a setting environment and build issue. The issue might be non obvious user error. I do not know.
Reporter | ||
Comment 4•2 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1720497#c7
If WAYLAND_DISPLAY is set but DISPLAY is not, we have every reason
to assume that we are in a Wayland-only session. Enable the Wayland
backend unconditionally in this case.
Note: We do not bother to further sanity check the content of the env
variables as these can be considered client setup bugs.
Hmmm
Reporter | ||
Comment 5•2 years ago
|
||
Reporter | ||
Comment 6•2 years ago
|
||
setting WAYLAND_DISPLAY=wayland-0 changes the display protocol to Xwayland.
Reporter | ||
Comment 7•2 years ago
|
||
https://phabricator.services.mozilla.com/differential/changeset/?ref=3655131
if defined(MOZ_WAYLAND)
bool IsWaylandEnabled() {
const char* waylandDisplay = PR_GetEnv("WAYLAND_DISPLAY");
if (!waylandDisplay) {
return false;
}
// MOZ_ENABLE_WAYLAND is our primary Wayland on/off switch.
const char* waylandPref = PR_GetEnv("MOZ_ENABLE_WAYLAND");
bool enableWayland = (waylandPref && *waylandPref);
hmmm
Reporter | ||
Comment 9•2 years ago
|
||
I need to check whether setting XDG_SESSION_TYPE will work
https://github.com/Plagman/gamescope/commit/98d61844d81f0ef39358c6336eed477054c4c320
Reporter | ||
Comment 10•2 years ago
|
||
Firefox ignores the variable. Nevermind. I didn't bother testing. I checked the changelog withing 49a6125392f5
Updated•2 years ago
|
Comment 11•2 years ago
|
||
https://github.com/Plagman/gamescope
It's getting game frames through Wayland by way of Xwayland
game is running in its own personal Xwayland sandbox desktop
It also runs on top of a regular desktop, the 'nested' usecase steamcompmgr didn't support.
Does SteamDeck / gamescope even support Wayland clients other than Xwayland? Have you been able to launch other apps in Wayland mode?
Desktop mode seems to be KDE X11.
Reporter | ||
Comment 12•2 years ago
|
||
I believe firefox wayland run in kwin wayland gamescope works.
command: dbus-run-session
args: LD_PRELOAD="" ...... WAYLAND_DISPLAY=wayland-0 XDG_SESSION_TYPE=wayland startplasma-wayland ......
run in: $HOME
Reporter | ||
Comment 14•2 years ago
|
||
Hi Darkspirit,
The gamescope situation confuses me. You can nest an entire wayland compositor into gamescope and it works like shown above. However, gamescope may not allow clients run in wayland mode.
Either way, firefox within gamescope have lots of other bugs even if wayland mode is not enabled. I was wondering wayland mode fixes it but I could not enable it either.
Comment 15•2 years ago
|
||
Thanks for testing!
What other bugs does Firefox suffer from within gamescope? (Apart from bug 1787939.)
Ideally please only test https://nightly.mozilla.org.
Can some of those problems be fixed by setting gfx.webrender.software to true on about:config and restarting Nightly?
Reporter | ||
Comment 16•2 years ago
|
||
Hi Darkspirit,
gfx.webrender.software does next to nothing. Notification like asking for permissions causes the web browser to lose focus. Overall, the experience is pretty lacking within gamemode. The common workaround is to use it in desktop mode.
I trying to figure out how to grab the logs within gamemode. I will think about it.
Reporter | ||
Comment 17•2 years ago
|
||
I am testing this configuration with firefox nightly and the browser does open in wayland mode in a nested kwin window manager. However, the window management awkwardness and steamos does not play well with another instance of kwin.
Nested Kwin mode handles the context menu fine. However, gestures does not seem to be recognized.
Target: env
Start in: $HOME
Launch Options: XDG_SESSION_TYPE=wayland MOZ_ENABLE_WAYLAND=1 dbus-run-session kwin_wayland --no-lockscreen --height 800 --width 1280 $HOME/bin/firefox/firefox
Reporter | ||
Comment 18•2 years ago
|
||
I tested this gamescope commit 9600bbaadf9c52a13c9a1ea805ae656f875786e8 and firefox runs on wayland.
Tested on Opensuse Tumbleweed Gnome.
MOZ_ENABLE_WAYLAND=1 ./build/src/gamescope -- env WAYLAND_DISPLAY='wayland-0' firefox
Reporter | ||
Comment 20•2 years ago
|
||
Do I have to wait until the feature filters down to steam os beta?
Comment 21•2 years ago
|
||
(In reply to monkeyboyted from comment #20)
Do I have to wait until the feature filters down to steam os beta?
No need to wait, closing.
Reporter | ||
Comment 22•2 years ago
|
||
./build/src/gamescope --expose-wayland -- firefox
Wrong start up flags and variables. A gamescope dev said WAYLAND_DISPLAY='wayland-0' uses the host desktop compositor.
Expose wayland flags exposes gamescope. The newest build still works.
Description
•