Games are blinking with weird colours in fullscreen mode when using upscaling
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
Whenever I launch a game upscaled with filters (either fsr or nis) and put it in fullscreen mode - either by shortcut or launch option, the screen starts blinking with weird colours and the Steam console log is spammed with [gamescope] [Error] xdg_backend: Compositor released us but we were not acquired. Oh no.
Tried this on two separate games - Graveyard Keeper (native) and Titan Quest (proton) - both have this blinking.
Attaching a photo of the screen, because for some reason a screenshot doesn't capture the artifacts:
Steps To Reproduce
- Launch Graveyard Keeper with
gamescope -w 1920 -h 1080 -F fsr -- %command%. - Observe no visual problems and no log spam.
- Press Super+F to make the game fullscreen.
- Observe artifacts and log spam.
Hardware information
- Distro: Arch Linux
- CPU: Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz
- GPU: NVIDIA GeForce RTX 4070 Ti SUPER
- Driver Version: NVIDIA 565.77
Software information
- Desktop environment: KDE 6.2.5
- Session type: wayland
- Gamescope version: gamescope version 3.16.1 (gcc 14.2.1)
- Gamescope launch command(s): `gamescope -w 1920 -h 1080 -F fsr -- %command%`
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
No response
Can you share a full log that starts from launching Gamescope?
Here it is: https://gist.github.com/StragaSevera/c81d3c623b8cf6d41004eafd17008876
Hmm, I bought the game and I'm not seeing the same type of flickering yet on a laptop I have with a 3070 dGPU but I'll keep trying for a bit. The picture you shared looks very similar to https://github.com/ValveSoftware/gamescope/issues/1593#issuecomment-2435737848 though.
Wow, you bought the game just for debugging my problem? o_O Yes, it looks really similar.
I do see the issue on my desktop Nvidia rig as well, it started happening after switching between TTY consoles a few times.
I highly suspect it's the same corruption issue as the DRM backend that I linked, since both that issue and your issue started happening at the same time during my testing today. Unfortunately I don't think it's been picked up as an official bug by Nvidia yet so I don't really have any suggestions in the meantime other than stay tuned
I'm using the wayland backend right now, I get errors in console when I try to use DRM or SDL ones. Should I link the logs with those backends?
SDL backend I already know the issue, you need https://github.com/ValveSoftware/gamescope/pull/1548 which isn't in a gamescope release yet
DRM I'd need to see logs to know what's going on there.
Flickering seems to come from somewhere in gamescope's composition pipeline, you can trigger the same flickering without FSR just with gamescope -w 1920 -w 1080 --force-composition -- %command% and then toggling the gamescope window to fullscreen.
not game specific either, but just appears to be NVIDIA-specific.
working: gamescope -w 1920 -h 1080 --composite-debug -- glxgears and Super + F to toggle fullscreen
https://github.com/user-attachments/assets/0b4622e8-ac79-47a6-a688-88ca42a8a43d
flickering: gamescope -w 1920 -h 1080 --composite-debug --force-composition -- glxgears and Super + F to toggle fullscreen
https://github.com/user-attachments/assets/55833809-36c5-4a5c-8181-1d50b378d8c7
CCing @cubanismo on this, this issue should be pretty straightforward to replicate on any Wayland DE (I'm using Plasma 6 Wayland) with NVIDIA drivers. I'm on 570.86.16 but past driver versions (and closed modules) are also affected by the issue. I'll try to dig in more to see if I can narrow down what part of our composition process in gamescope might be causing issues here.
DRM I'd need to see logs to know what's going on there.
Here are the logs: https://gist.github.com/StragaSevera/49beb9d54fd0ca74884cb62b2821e769
Yep, the command you listed produces flickering for me too =-)
Thank you for the report. For future reference, I've filed NVIDIA internal bug 5089016 to track this issue.
From what I've been able to gather so far:
The issue happens in gamescope while nested on wayland under both plasma desktop and cosmic desktop, along with gamescope's DRM backend with the same commands as above. If the host compositor is using direct scan-out and nested gamescope is also using direct scan-out, the issue does not occur. If you force composition within gamescope but leave direct scan-out enabled within the host compositor, then you'll start to see the flickering recorded above. Notably, the flickering only starts to occur once gamescope's window is fullscreen on the host compositor.
you can avoid the flickering altogether on nested gamescope by setting an environment variable to disable direct scan-out on the primary compositor (KWIN_DRM_NO_DIRECT_SCANOUT=1 for example). This lets you run both gamescope -w 1920 -h 1080 --composite-debug -- glxgears and gamescope -w 1920 -h 1080 --composite-debug --force-composition -- glxgears without any flickering occurring during the process.
Of course, this doesn't apply to gamescope's DRM backend since force composition is our process for disabling direct scan-out, so once you do that it will immediately start flickering. To make things even more complicated, it is actually possible to sometimes get gamescope composition to work properly in the DRM backend. If you make gamescope-session your first graphical target after plymouth (skipping SDDM for instance) and you start the session with scan-out disabled, no flickering occurs at first. If you enable/disable HDR, or if you switch sessions (ie shutdown steam -> start plasma desktop -> logout and start gamescope-session again), the flickering will start to occur from the moment the session launches.
I still think the commands provided above for nested Wayland desktop are the most consistent way to reproduce the flickering, but maybe some of the additional context will help for narrowing down the issue.
This is kind of bizarre but the issue also does not occur on nested wayland if you enable HDR on Plasma 6 desktop, but do not enable it in gamescope, ie gamescope --force-composition --composite-debug -- glxgears only with the HDR checkbox toggled in plasma's settings. Then you can fullscreen the window repeatedly without flickering and regardless of composition being used or not.
This is not a new one or an nvidia related one. A similar issue happens in my RX 5500m card. I reported the issue in 12 August 2024, after a while it was fixed and the mouse grab bug was introduced...
Now its just like a loop between issues. This issue persists on full screen when you use scaling. https://github.com/ValveSoftware/gamescope/issues/1471
that was likely a different issue with similar symptoms, I am very confident this specific issue is NVIDIA only after testing multiple GPUs and setups.
that was likely a different issue with similar symptoms, I am very confident this specific issue is NVIDIA only after testing multiple GPUs and setups.
This issue has persisted on my system from Gamescope version 3.16.1 to 3.16.2. The observed artifacts are consistent with those reported by other users. Specifically, when using Fullscreen FSR with the Wayland backend. Due to the nature of the issue, it cannot be captured via screenshots; therefore, I am providing external camera captures.
What makes me different from others may be that I don’t have weird colours here, but black and white blocks, accompanied by some image rendering misalignment
Steps To Reproduce
gamescope -f --backend wayland -F fsr -- vkcube
Hardware information
- Distro: Arch Linux
- CPU: AMD Ryzen 5 5600G (12) @ 4.46 GHz
- GPU 1: AMD Radeon Vega Series / Radeon Vega Mobile Series ]
- GPU 2: AMD Radeon RX 6750 GRE 12GB [Discrete]
- Driver : amdgpu
Software information
- WM: Sway 1.10.1 (Wayland)
- Session type: wayland
- Gamescope version: gamescope version 3.16.2 (gcc 14.2.1)
@wuliaotc and there are none if you don't use fullscreen? Has it always been like this for you with that command or did it used to work?
I can't reproduce it here yet with a 7900XTX, a 780M, or a Steam Deck on Plasma 6 Wayland but I don't own a 6000-series GPU to check for myself which is why I ask.
@matte-schwartz
- if i don't use fullscreen, it will not occur
- in my case, fsr+wayland+fullscreen is the key to reproduce this issues
- this issues persist from 3.16.1 to 3.16.2 perharp earlier . I'm not sure if it occur on 3.15
thanks, will see if I can get someone else with a 6000-series card to check this out later. I'm not sure if there's some commonality between them and NVIDIA cards that would present this behavior but it's very odd that it doesn't affect more AMD cards if it's truly the same issue.
@matte-schwartz Perharps i can confirm it occur on 6000-series card
lspci -nnk | grep VGA
12:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev e5)
30:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c9)
the following command work fine
gamescope --prefer-vk-device 1002:1638 -f --backend wayland -F fsr -- vkcube
@wuliaotc thats very helpful, thanks. let me just double check on all my AMD setups to confirm I don't see the issue, and if that's the case I'll probably point you towards https://gitlab.freedesktop.org/drm/amd/-/issues to file a report. Will get back to you later on whether or not I can repro the issue.
@wuliaotc does this only occur on sway? had someone with a RX6800 running gamescope 3.16.1 on KWin 6.3.3 and kernel 6.14-rc6 and they were unable to reproduce your issue.
@wuliaotc does this only occur on sway? had someone with a RX6800 running gamescope 3.16.1 on KWin 6.3.3 and kernel 6.14-rc6 and they were unable to reproduce your issue.
In my case, this seems to be more serious under the kde(KWIN 6.33), but it is worth noting that when I move the mouse, the problem disappears
@wuliaotc then that looks and sounds like a different type of artifacting, as the artifacting in this issue does not go away with mouse movement. I'd recommend filing a separate report.
hi @cubanismo just wanted to check-in and see if anyone on the team managed to reproduce this bug (5089016)? I tested the latest release version, 570.133.07, along with the current vulkan dev beta, 570.123.06, and both still have the issue when running gamescope 3.16.2 with gamescope -w 1920 -h 1080 --composite-debug --force-composition -- glxgears on a non-HDR wayland desktop session. I'm getting a Blackwell card in the next week or two so I'll try that as well once it arrives.
nvidia-bug-report.log.gz from 570.133.07 while reproducing the issue on my 4090.
Thanks!
To follow up, I am having similar issues with Gamescope. I am on Arch Linux with RTX4090. My GDM and Gnome desktop works just fine. I tried to set up a session that starts in Steam Big Screen mode with Gamescope as the compositor. The flickering will occur when GDM invokes Gamescope as the compositor under specific conditions:
If I boot and enter the Gamescope without going to Gnome first, it will flicker.
Things will work fine if I log in to Gnome, log out, and log in to the Gamescope Steam session. But after I log out of the session and log in again to Gamescope, it immediately starts flickering.
My Gamescope version is 3.16.3, and the Nvidia driver is 570.144.
@chazeon for that specific issue in gamescope-session, a different NVIDIA bug report has been filed: 5240452
So yeah uh... this happens on all the games I tried launching via gamescope since the latest update:
Running latest Bazzite. Excerpt from ujust device-info:
* PCI Video Card (lspci | grep -i -E 'vga' | cut -b1-7 | xargs -i lspci -vnnks {} | grep -v "<access denied>"):
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3080 Ti] [10de:2208] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:389b]
Flags: bus master, fast devsel, latency 0, IRQ 92, IOMMU group 12
Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
Memory at f800000000 (64-bit, prefetchable) [size=16G]
Memory at fc00000000 (64-bit, prefetchable) [size=32M]
I/O ports at f000 [size=128]
Expansion ROM at fb000000 [virtual] [disabled] [size=512K]
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
12:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c3) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Device [1043:8877]
Flags: bus master, fast devsel, latency 0, IRQ 70, IOMMU group 19
Memory at fc10000000 (64-bit, prefetchable) [size=256M]
Memory at fc20000000 (64-bit, prefetchable) [size=2M]
I/O ports at e000 [size=256]
Memory at fbe00000 (32-bit, non-prefetchable) [size=512K]
Kernel driver in use: amdgpu
Kernel modules: amdgpu
* GL Support (glxinfo -B | grep -E "OpenGL version|OpenGL renderer"):
OpenGL renderer string: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2
OpenGL version string: 4.6.0 NVIDIA 580.95.05
* DRM Information (journalctl -k -b --no-hostname | grep -o 'kernel:.*drm.*$' | cut -d ' ' -f 2- ):
ACPI: bus type drm_connector registered
simple-framebuffer simple-framebuffer.0: [drm] Registered 1 planes with drm panic
[drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0
simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[drm] amdgpu kernel modesetting enabled.
[drm] Detected VRAM RAM=512M, BAR=512M
[drm] RAM width 128bits DDR5
[drm] GART: num cpu pages 262144, num gpu pages 262144
[drm] PCIE GART of 1024M enabled (table at 0x000000F41FC00000).
amdgpu 0000:12:00.0: amdgpu: [drm] Loading DMUB firmware via PSP: version=0x05002A00
[drm] use_doorbell being set to: [false]
amdgpu 0000:12:00.0: amdgpu: [drm] Display Core v3.2.340 initialized on DCN 3.1.5
amdgpu 0000:12:00.0: amdgpu: [drm] DP-HDMI FRL PCON supported
amdgpu 0000:12:00.0: amdgpu: [drm] DMUB hardware initialized: version=0x05002A00
amdgpu 0000:12:00.0: amdgpu: [drm] PSR support 0, DC PSR ver -1, sink PSR ver 0 DPCD caps 0x0 su_y_granularity 0
amdgpu 0000:12:00.0: amdgpu: [drm] PSR support 0, DC PSR ver -1, sink PSR ver 0 DPCD caps 0x0 su_y_granularity 0
amdgpu 0000:12:00.0: [drm] Registered 4 planes with drm panic
[drm] Initialized amdgpu 3.64.0 for 0000:12:00.0 on minor 1
amdgpu 0000:12:00.0: [drm] Cannot find any crtc or sizes
[drm] pre_validate_dsc:1628 MST_DSC dsc precompute is not needed
[drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 2
fbcon: nvidia-drmdrmfb (fb0) is primary device
nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
Modules linked in: snd_seq(+) wl(P+) snd_seq_device snd_pcm snd_timer igc(+) snd soundcore gpio_amdpt joydev gpio_generic tcp_bbr tun loop nfnetlink lz4 zram lz4hc_compress lz4_compress overlay erofs netfs nvme polyval_clmulni ghash_clmulni_intel sp5100_tco nvme_core nvme_keyring nvme_auth nvidia_uvm(O) nvidia_drm(O) nvidia_modeset(O) nvidia(O) amdgpu amdxcp drm_panel_backlight_quirks gpu_sched drm_ttm_helper drm_exec drm_suballoc_helper i915 drm_buddy ttm video wmi i2c_algo_bit drm_display_helper cec vfio_pci vfio_pci_core irqbypass vfio_iommu_type1 vfio iommufd pkcs8_key_parser ntsync fuse i2c_dev uhid vhba kvmfr gcadapter_oc
nVidia Driver version: 580.95.05
Gamescope version: 3.16.15-2-g2f30679+
Arguments for Steam app launch:
gamescope -f --backend wayland --steam -W 3440 -H 1440 -w 3440 -h 1440 -r 144 --hdr-enabled -- %command%
EDIT: So, I tried -b --force-grab-cursor instead of -f everything works flawlessly... and this is weird. The top bar in gnome is visible in Borderless so I used the "Hide Top Bar" Gnome extension... and once it's hidden? The flickering returns. So as long as there is something from Gnome overlaying the output everything is dandy.
EDIT2: So it only happens with --hdr-enabled. As long as HDR is turned off, gamescope works fine