ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.12k stars 211 forks source link

Strong artifacts and encoding error when using gamescope with obs-vkcapture #1273

Open Plarpoon opened 6 months ago

Plarpoon commented 6 months ago

Hello, I’ve encountered an issue with gamescope in combination with obs_vkcapture since April 24, the day after I updated from Fedora 39 KDE to Fedora 40 KDE. Initially, I suspected the issue might be with obs_vkcapture, but upon running a game without gamescope, the plugin operates as expected.

However, when I attempt to record a video with gamescope enabled, the output exhibits some anomalies. This issue persists regardless of whether HDR is enabled or disabled.

For reference, here is a video demonstrating the issue. Additionally, I’ve attached the steam log for Persona 4 Golden, which was also run with gamescope and exhibits the same problem.

steam-1113000.log

This is the steam log of Persona 4 Golden running also with gamescope and presenting the same exact issue as the ones showed in the video.

The launch parameters used at the time the log was generated were as follows:

PROTON_LOG=1 OBS_VKCAPTURE_QUIET=0 gamemoderun obs-gamecapture gamescope %command%

Interestingly, when I record my games using the OBS “window capture” utility in combination with “application audio capture” (both of which using PipeWire), the recording does not show any artifacts.

It’s worth noting that these artifacts only appear in the recorded video, video preview mode, and streamed video. The game runs normally on my monitor. If you believe this issue would be better addressed by the obs_vkcapture team, please let me know. I thought it would be most appropriate to report it here first.

Thank you for your attention to this matter. I look forward to any insights or solutions you might have


P.S. The artifacts show up in the recorded video, video preview mode and streamed video only. On my monitor the game runs regularly. Let me know if you think I think I should notify the obs_vkcapture team instead, I just thought this was the correct place.

P.P.S. Immediately after the Fedora 40 update the video recording wtih gamescope worked perfectly fine, that was the 23 of April. From the 24 is when I started having problems so after a day I had already experienced the update.

Plarpoon commented 6 months ago

I am available to do more testing of sorts if you have any tips for me, just write it here and I will give it a try

Plarpoon commented 6 months ago

I have just used the gamescope option that is embedded into the Bottles application to run World of Warcraft and I have tested with that one too. That one is most likely an obsolete version (at least compared to the one running in Fedora RPMs) and I have no issues or artifacts at all.

Unfortunately I cannot check the version of either installed version of gamescope as it doesn't support the --version switch yet #840 , if anyone can suggest me a way to verify this theory I would really appreciate it.

It would seem checking the package information online that it was updated in a compatible timeframe with when my issue first developed itself. https://koji.fedoraproject.org/koji/packageinfo?packageID=32706

sharkautarch commented 6 months ago

@Plarpoon To narrow down which version you’re having this issue on: First downgrade to the gamescope-3.14.1-1.fc40 package to see if the issue also occurs on gamescope 3.14.1

if it occurs on 3.14.1, then try downgrading to version gamescope-3.14.0-1.fc40 and see whether the issue occurs on that version

lastly, if you’re familiar with building stuff from source, you could try building gamescope from the latest commit of the git repo to see if the issue is also present there

Plarpoon commented 6 months ago

I actually did already try the downgraded version of gamescope but to unfortunately no good results. Nowrep from the obs-vkcapture OBS plugin seems to have an idea about the issue tho so for now I would like to see that tested.

It took quite some time to narrow down where the issue was localized due to OBS's modular nature, but we might have found the problem relying on the flatpak version of the plugin. As soon as it's confirmed I will close the issue here too.

For anyone with the same problem as me you can follow this issue