gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Black screen when using upscaler filters on Hyprland

Open effectsbot opened this issue 8 months ago • 8 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • [x] The issue occurs on upstream gamescope without any modifications

Current Behavior

Toggling FSR / NIS upscaling results in a black window.

Steps To Reproduce

  1. Run gamescope -- alacritty
  2. Toggle FSR / NIS upscaling using the keyboard shortcuts (Super + U / Y), then refocus the gamescope window.

Hardware information

- Distro: Arch Linux
- CPU: AMD Ryzen 5 7500F 6-Core Processor
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S]
- Driver Version: Mesa 25.0.4-arch1.1

Software information

- Desktop environment: Hyprland 0.48.1
- Session type: Wayland
- Gamescope version: 3.16.4-23-gdc840e78
- Gamescope launch command(s): gamescope -- alacritty

Which gamescope backends have the issue you are reporting?

  • [x] Wayland (default for nested gamescope)
  • [ ] DRM (default for embedded gamescope, i.e. gamescope-session)
  • [ ] SDL
  • [ ] OpenVR

Logging, screenshots, or anything else

[gamescope] [Info]  console: gamescope version 3.16.4-23-gdc840e78 (gcc 15.1.1)
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/gpd.win4.lcd.lua' (id: 5)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua' (id: 6)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua' (id: 7)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 8)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 9)
[gamescope] [Info]  scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info]  scriptmgr: Loading scripts from: '/home/unixbot/.config/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/home/unixbot/.config/gamescope/scripts' does not exist
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[gamescope] [Info]  vulkan: selecting physical device 'AMD Radeon RX 6650 XT (RADV NAVI23)': queue family 1 (general queue family 0)
[gamescope] [Info]  vulkan: physical device supports DRM format modifiers
[gamescope] [Info]  wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info]  xdg_backend: Seat name: Hyprland
[gamescope] [Info]  vulkan: supported DRM formats for sampling usage:
[gamescope] [Info]  vulkan:   AR24 (0x34325241)
[gamescope] [Info]  vulkan:   XR24 (0x34325258)
[gamescope] [Info]  vulkan:   AB24 (0x34324241)
[gamescope] [Info]  vulkan:   XB24 (0x34324258)
[gamescope] [Info]  vulkan:   RG16 (0x36314752)
[gamescope] [Info]  vulkan:   AB4H (0x48344241)
[gamescope] [Info]  vulkan:   XB4H (0x48344258)
[gamescope] [Info]  vulkan:   AB48 (0x38344241)
[gamescope] [Info]  vulkan:   XB48 (0x38344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[gamescope] [Info]  wlserver: Using explicit sync when available
[gamescope] [Info]  wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info]  wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info]  wlserver: Successfully initialized libei for input emulation!
[gamescope] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :1
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86RefreshRateToggle
> Warning:          Could not resolve keysym XF86Accessibility
> Warning:          Could not resolve keysym XF86DoNotDisturb
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info]  pipewire: stream state changed: connecting
[gamescope] [Info]  pipewire: stream state changed: paused
[gamescope] [Info]  pipewire: stream available on node ID: 68
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: SRGB
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 0
[gamescope] [Info]  edid: Patching res 800x1280 -> 1280x720
[gamescope] [Info]  vblank: Using timerfd.
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: SRGB
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 0
[gamescope] [Info]  edid: Patching res 800x1280 -> 1280x720
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86RefreshRateToggle
> Warning:          Could not resolve keysym XF86Accessibility
> Warning:          Could not resolve keysym XF86DoNotDisturb
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info]  xdg_backend: Changed refresh to: 164.999hz
[gamescope] [Info]  launch: Primary child shut down!
(EE) failed to read Wayland events: Broken pipe

effectsbot avatar May 02 '25 10:05 effectsbot

This does not occur with gamescope version 3.16.4, so any commits later than that must have caused this.

effectsbot avatar May 02 '25 10:05 effectsbot

Turns out this is more of a Hyprland issue. I wasn't able to reproduce this on the Fedora KDE virtual machine I was testing with.

[gamescope] [Info]  console: gamescope version 3.16.4-23-gdc840e7 (gcc 15.1.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/local/share/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/usr/local/share/gamescope/scripts' does not exist
[gamescope] [Info]  scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info]  scriptmgr: Loading scripts from: '/home/fed/.config/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/home/fed/.config/gamescope/scripts' does not exist
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[gamescope] [Info]  vulkan: selecting physical device 'AMD Radeon RX 6650 XT (RADV NAVI23)': queue family 1 (general queue family 0)
[gamescope] [Info]  vulkan: physical device supports DRM format modifiers
[gamescope] [Info]  wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info]  xdg_backend: Seat name: seat0
[gamescope] [Info]  vulkan: supported DRM formats for sampling usage:
[gamescope] [Info]  vulkan:   AR24 (0x34325241)
[gamescope] [Info]  vulkan:   XR24 (0x34325258)
[gamescope] [Info]  vulkan:   AB24 (0x34324241)
[gamescope] [Info]  vulkan:   XB24 (0x34324258)
[gamescope] [Info]  vulkan:   RG16 (0x36314752)
[gamescope] [Info]  vulkan:   NV12 (0x3231564E)
[gamescope] [Info]  vulkan:   AB4H (0x48344241)
[gamescope] [Info]  vulkan:   XB4H (0x48344258)
[gamescope] [Info]  vulkan:   AB48 (0x38344241)
[gamescope] [Info]  vulkan:   XB48 (0x38344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[gamescope] [Info]  wlserver: Using explicit sync when available
[gamescope] [Info]  wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info]  wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info]  wlserver: Successfully initialized libei for input emulation!
[gamescope] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :1
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86RefreshRateToggle
> Warning:          Could not resolve keysym XF86Accessibility
> Warning:          Could not resolve keysym XF86DoNotDisturb
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info]  pipewire: stream state changed: connecting
[gamescope] [Info]  pipewire: stream state changed: paused
[gamescope] [Info]  pipewire: stream available on node ID: 57
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 80
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: GAMMA22
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 199
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: GAMMA22
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  edid: Patching res 800x1280 -> 1280x720
[gamescope] [Info]  vblank: Using timerfd.
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 80
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: GAMMA22
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  xdg_backend: uMaxContentLightLevel: 199
[gamescope] [Info]  xdg_backend: HDR INFO
[gamescope] [Info]  xdg_backend:   cv_hdr_enabled: false
[gamescope] [Info]  xdg_backend:   uTF: GAMMA22
[gamescope] [Info]  xdg_backend:   bExposeHDRSupport: false
[gamescope] [Info]  edid: Patching res 800x1280 -> 1280x720
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86RefreshRateToggle
> Warning:          Could not resolve keysym XF86Accessibility
> Warning:          Could not resolve keysym XF86DoNotDisturb
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info]  xdg_backend: Changed refresh to: 164.999hz
[gamescopereaper] [Info]  reaper: Parent of gamescopereaper was killed. Killing children.
(EE) failed to read Wayland events: Broken pipe
X connection to :1 broken (explicit kill or server shutdown).
[gamescope] [Info]  launch: Primary child shut down!

effectsbot avatar May 03 '25 19:05 effectsbot

Might be related to lack of scRGB support, since the SDL backend worked just fine. See https://github.com/ValveSoftware/gamescope/issues/1825.

effectsbot avatar May 26 '25 09:05 effectsbot

Also on Hyprland here; I tried applying #1867 and that does fix the issues I'm having with the wayland backend crashing altogether but FSR is still broken with the patch applied. SDL is working perfectly for me as well. Resizing the window at or below the native resolution causes the game to suddenly appear.

esibun avatar Jun 16 '25 16:06 esibun

The sdl backend causes me massive performance degregation so I'm just waiting for the PR mentsioned to be merged and shipped. So heads up on that for other amd GPU users having horrid lag spikes with the sdl backend gamescope.

DEFCON001 avatar Jun 18 '25 09:06 DEFCON001

I've just tested this with the other upscaler filters and was able to reproduce the same issue, so I'm renaming this issue again.

effectsbot avatar Jun 29 '25 10:06 effectsbot

i have a similar issue, but its a white screen

Frostlefog avatar Sep 14 '25 06:09 Frostlefog

I'm having the same issue, and I've been having the same log messages as in #1636 and someone mentioned there that sdl backend works fine for them and I tried that and it works fine for me too, it's specifically the wayland backend that results in a black screen with FSR on

BLucky-gh avatar Dec 09 '25 00:12 BLucky-gh

I also have this issue on Hyprland and discovered that it only occurs if the width of the window exceeds the nested-width supplied using the -w option. So it's definitely a problem with the upscaling.

Lich-Corals avatar Dec 30 '25 14:12 Lich-Corals