ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.16k stars 214 forks source link

Windows run through Gamescope don't appear on Fedora 36 #605

Open poperigby opened 2 years ago

poperigby commented 2 years ago

Gamescope doesn't seem to be producing any video output on Fedora 36.

I tried running gamescope -f -- glxgears, and it gives me this output, but nothing shows up:

vulkan: selecting physical device 'AMD RADV POLARIS10'
vulkan: physical device does not support DRM format modifiers
vulkan: supported DRM formats for sampling usage:
vulkan:   0x34325241
vulkan:   0x34325258
vulkan:   0x3231564E
wlserver: [backend/headless/backend.c:82] Creating headless backend
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:18] Starting headless backend
wlserver: [xwayland/server.c:92] Starting Xwayland on :2
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x562adc7727c0 (res 0x562adb972290)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 68
pipewire: renegociating stream params (size: 1280x720)
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x562adb569c40 (res 0x562adc778330)
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

After that runs for awhile, it starts spamming:

vblankmanager: write failed: Resource temporarily unavailable`

After that Ctrl+c doesn't work to close Gamescope.

When I run this gamescope -f -- nautilus, Nautilus shows up, but it's not in fullscreen.

System Information

GPU: RX 480 CPU: i5-6400 Kernel: 5.19.4

Lakiminki commented 2 years ago

I have this same problem on Fedora 36.

I tried running gamescope -f --nautilus just for reference as this has happened with every game I've tried on Steam. Nothing launches with gamescope anymore, and the gamescope process hangs in the background and must killed manually.

Here is the result:

gamescope -f -- nautilus
wlserver: [backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device 'AMD Radeon RX 6800 (RADV NAVI21)': 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/server.c:92] Starting Xwayland on :2
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x55bc0379dd10 (res 0x55bc03780370)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 70
pipewire: renegotiating stream params (size: 1920x1080)
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_HIDDEN
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x55bc0377b6e0 (res 0x55bc037a96f0)

When I try to send kill signal, nothing happens:

^Cgamescope: received kill signal, terminating!
^Cgamescope: received kill signal, terminating!
^Cgamescope: received kill signal, terminating!
^Cgamescope: received kill signal, terminating!
^Cgamescope: received kill signal, terminating!

And I get the same vblankmanager: write failed: Resource temporarily unavailable spam after about a minute of waiting in the terminal.

In my case, nothing ever shows up when trying to launch a program with gamescope.

Willdrick commented 2 years ago

Same here, though I noticed something. The line wlserver: [xwayland/server.c:92] Starting Xwayland on :2 clued me in. If I let the program run, go to TTY3 and back to TTY2 (graphical session default on F36) I can see the gamescope window with glxgears running within.

I'm not fully sure what's going on here, but it looks like gamescope is spawning a new wayland screen on top of the regular one, and for whatever reason it's not drawn until you do that switch thing. Input of course is mostly broken when it's running like this.

onuralpszr commented 2 years ago

The version on Fedora 36 was bit old and now there is new update on the way

https://bodhi.fedoraproject.org/updates/FEDORA-2022-0537a7714e

Could you try new one because on the new version It does work glxgears but problem is glxgears will gonna look problematic(because of the gamescope) but If you try with vkCube It should be fine as well.

Version I used it gamescope-3.11.43-1.fc36.x86_64

cc : @Conan-Kudo

Crashdummyy commented 2 years ago

The version on Fedora 36 was bit old and now there is new update on the way

https://bodhi.fedoraproject.org/updates/FEDORA-2022-0537a7714e

Could you try new one because on the new version It does work glxgears but problem is glxgears will gonna look problematic(because of the gamescope) but If you try with vkCube It should be fine as well.

Version I used it gamescope-3.11.43-1.fc36.x86_64

cc : @Conan-Kudo

I pretty much think I do have the same problem. The window appears using Wildricks trick.

I am using that one 3.11.43.20220901-1.c40c8aa.fc36 from a copr which is 22 commits behind the master. Is that still too old ?

Nanotwerp commented 2 years ago

This is an issue with SDL2 2.24.0. A change in its code seems to force Gamescope to try to do compositing with Wayland, which Gamescope doesn't support. The solution is to run Gamescope with the environmental variable SDL_VIDEODRIVER=x11. I had this issue on Fedora Rawhide, and doing this fixed my issue.

Conan-Kudo commented 2 years ago

Wait, what? A Wayland compositor that can't handle stuff running in Wayland mode?

Saroufim commented 2 years ago

Gamescope runs on Wayland but the windows it spawns usually run on XWayland

Willdrick commented 2 years ago

With the recent announcement that FSR is being dropped off fshack I decided to give gamescope another go. Sure enough, games wouldn't launch.

So here's the quirk I don't really know: launched steam from my terminal (flatpak run com.valvesoftware.Steam) and everything worked. Both on Xorg and Wayland sessions. Games won't run if I launch steam from the GUI but they always launched flawlessly if I ran steam from gnome-terminal. what gives?

Details:

Willdrick commented 2 years ago

I downloaded a menu editor and managed to find the shortcut for steam that was created when I installed it, /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam @@u %U @@ I don't know which of these flags/options are the culprit of games crashing when using gamescope. Launching steam directly from the terminal (just flatpak run com.valvesoftware.Steam) can run any game directly no problem...

cyberphantom52 commented 2 years ago

https://github.com/libsdl-org/SDL/issues/6074 https://github.com/libsdl-org/SDL/issues/6204

Here's are corresponding issues on sdl git

Conan-Kudo commented 2 years ago

I briefly talked to @flibitijibibo about this issue, and basically the problem is that gamescope doesn't correctly prevent native Wayland client connections (that is, it doesn't cause wl_display_connect() to return an error), so SDL doesn't know it needs to fallback to X11.

Repartee41 commented 2 years ago

Having the same problem on the Fedora 37 release candidate:

[brandonk@brandonk-fedora BinLinux]$ gamescope -f -h 720 -H 1080 -U -- BeamNG.drive.x64 
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device '(null) (RADV RENOIR)': 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/server.c:92] Starting Xwayland on :2
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x5568125584b0 (res 0x5568125530a0)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 98
xwm: execvp failed: No such file or directory
(EE) failed to read Wayland events: Broken pipe
Segmentation fault (core dumped)
Crashdummyy commented 2 years ago

I am currently on Fedora 37 with Kernel 6.1.0-0.rc5.20221116git59d0d52c30d4.41.vanilla.1.fc37.x86_64.

Now gamescope refuses to work at all....

The only way to go appears to be using SDL_VIDEODRIVER=x11 but that cant be the way to go, can it ?

 crashdummy@crashphyrus  ~  gamescope -b -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device 'AMD Unknown (RADV REMBRANDT)': queue family 1
vulkan: physical device supports DRM format modifiers
vulkan: supported DRM formats for sampling usage:
vulkan:   0x34325241
vulkan:   0x34325258
vulkan:   0x3231564E
free(): double free detected in tcache 2
Aborted (core dumped)

 crashdummy@crashphyrus  ~  SDL_VIDEODRIVER=x11 gamescope -b -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device 'AMD Unknown (RADV REMBRANDT)': 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/server.c:92] Starting Xwayland on :2
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x56465e8a36a0 (res 0x56465ea0faa0)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 53
pipewire: renegotiating stream params (size: 1280x720)
Selected GPU 0: AMD Unknown (RADV REMBRANDT), type: IntegratedGpu
wlserver: [types/wlr_surface.c:748] New wlr_surface 0x56465e996790 (res 0x56465ec00530)