gamescope
gamescope copied to clipboard
Gamescope runs fine, when it works then starts to stutter very badly on Fedora KDE
What repository did I use in order to install the latest gamescope on fedora ? This https://copr.fedorainfracloud.org/coprs/petrb/gamescope/packages/
Why did I use this repository when gamescope is available in the main repository? Because this issue was present with older gamescope builds (which is available on fedora)
What else do I notice during the time when the Bug happens?
GPU usage is 100% all the time.
What others programs do I use in order to make gamescope run at the best performance? Corectrl (to control gpu fancurve and set the gpu governor to performance along with cpu), gamemode (So that I can force the CPU to have a higher priority during steam gameplays. In gamemode.ini file i set renice to 10, desiredgov set to performance and finally softrealtime to auto )
Does this issue occur when gamemoded is not in use (deleted from the game launch section). Yes it happens. With the newer gamescope version and the older one which is available in fedora.
What files should I provide, so this issue could be sorted ?
Hi, this is my repository, so only for clarification, despite package has version 3.7.1, it is actually built from master so it matches commit d537d6ac98fe6eccafda206dec0dd99c337f648c. I did not encounter this bug yet, but i am not using it very much, i was testing some games maybe for 30 minutes or so.
@petr666 Hi there check out my video about this. launch option gamescope -w 1920 -h 1080 gamemoderun %command%
As I said in the video, i disabled futex2 so it is definitely not the one causing the issue. The bug happens randomly. The performance is very good until this bug happens (it can happend totally randomly, sometimes it need more then 30 mins). Using KDE (and the bug could be reproduced both in wayland and x11 session)
https://www.youtube.com/watch?v=i_09HOxnhJg
In gamemode.ini file i set renice to 10
10 or -10? Higher nice value means lower priority.
In gamemode.ini file i set renice to 10
10 or -10? Higher nice value means lower priority.
Accodin to this webside (you are wrong) https://gamecrate.com/linux-gaming-boost-your-performance-gamemode/25200 Quote "f you have four or more CPU cores. I like to set the “renice” value at “10” - this will increase the priority of your game’s process, telling Linux to prioritize the game’s CPU time."
The issue is still present. Its definitely not caused by gamemode. For further testing purpose I deleted gamemode from my system, and just let gamescope run without even moving a mouse in menu. The issue appeared precisely at 30 mins. I tested this stock kernel (without any patches) and with custom tkg patches. The issue could have been reproduced at both times. So no matter what Desktop environment I use, it happens all the time. Tested on Fedora, Ubuntu, Arch, variants like (endeavour, garuda) . This issue still exist.
As I said I would love to provide logs or anything that the dev needs. I just need explanation how to provide them.
Maybe trying to capture some traces with gpuvis when it's stuttering would help.
Maybe trying to capture some traces with gpuvis when it's stuttering would help.
If you explain how to capture gpuvis traces during stutter, I would gladly help.
Recently the terminal post this while running games Unhandled NET_WM_STATE property change: _NET_WM STATE_MAXIMIZED HDRZ
Okay. Figured it out that gpuvis is your tool emersion. Buit it using aur repo. Now how to find traces when it comes to steam games? Or how does it work? I would gladly help. I just need explanation.
Have the same issue with "The Witcher 3". After ~24 minutes the game starts stuttering. FPS according to MangoHud drop from ~160 to ~80. Restarting the game helps (for another 24 minutes). If I start the game without gamescope the issue is gone. Running under Windows is fine as well. I tried different Proton Versions but it did not make a difference. This is on kernel 5.12.4 and mesa-git (as of 2021-05-15) with a 6900xt. Will try to get some traces/logs.
Not sure if this is the same issue as the OP but the symptoms describe my issue. Here is a trace-cmd capture right after it started stuttering.
witcher3_trace-cmd.dat.tar.gz.
Frametimes start looking like this instead of a constant value/line:
Tried some more games. The stuttering appears after the 24 minute mark for The Witcher3 (DXVK) Cyberpunk 2077 (VKD3D) Doom Eternal (Vulkan) Book of Forbidden Tales 2 (OpenGL)
It does not seem to be temperature related as those are pretty stable after 10 minutes. To test I ran all fans at 100% speed which dropped the temperatures by 5-8°C but the issue still appeared after 24 minutes. And as mentioned before: without gamescope all those games work fine while having the same temperature.
Still is an issue with latest master on my machine (arch 5.14.2, mesa-git):
Tried a trace-cmd capture again (as last one did not contain required info from what @emersion told me in irc):
20210908_witcher3_trace-cmd.dat.tar.gz
gpuvis screenshot of when the stuttering starts:
I just tried starting two games via gamescope with a 10 minute delay. Both windows ran next to each other on one screen (sway tiled mode). The first game (Kingdom Come Deliverance via DXVK) started stuttering as expected after ~24 minutes. The second game (Witcher3 / DXVK) ran fine for another 10 minutes and then also started stuttering. If I use the same setup but switch to a different workspace on the same monitor so that the games are not visible they run fine even after the 24 minute mark. So it appears the games have to be visible for 24 minutes for the bug to kick in. Edit: When started without gamescope both games run fine next to each other for >3h (as is the case when just running one game).
Greetings ppacher. Yes we have the same issue. To be precise exactly the same ! Finally someone !
I am very worried about this issue. If steamdeck releases and this issue will be still present in December. Steamdeck will fail miserably. I truly wish team valve the best. But this issue haven't been fixed for half a year now.
This information is not reaching either Emerson or Plagmen ( Pierre-Loup A. of Valve)
BTW thx for sharing ppascher.
The 24 min mark is present ! After that it stutters.
ppascher. I have a question for you.
1.You say that gamescope run fine when you start it in a different workspace? I need to test this. 2. How do you set up gamescope to play games at 1920x1080? are you setting it up like this ( -W 1920 -H 1080 or -w 1920 -h 1080) ? For me this does not change the resolution of games like warframe ( -w 1920 -h 1080) whit this nothing happens and the game start in 720p. 3.Are you using integer scaling ? Option -n
I run at 3440x1440 and tried both -W/-H
and -w/-h
. I do not use -n
. I tried running with and without gamemode/mangohud. I manually fullscreen my game as with the -f
option games do not run. I use git master of sway/wlroots/mesa on arch. Tried both custom kernel and default distro kernel. Hopefully we can figure out what is causing this.
Hey there ppasher, thx for the reply. I don't know what it is causing this, but it concerns me that plagman or emerson doesn't respond. Can you contact them ? They doesn't seem to notice our conversation..This is very serious bug.
This is an open-source project. Feel free to submit patches, but don't expect your bugs to magically fixed.
I don't have time to look into your issue at the moment.
@emersion Greetings thx for responding. This has been an issue for months now and I pretty much bad at programming. But lets ask @ppascher
Btw emersion what kind of data do you need in the future in order for this to be fixed?
One more thing I noticed is when I keep moving the mouse the stuttering is gone. As soon as I stop the cursor the stuttering is back.
In case anyone else runs into this and is able to make sense of it here is another gpuvis screenshot of a trace with gamescope events logged while stuttering:
And here is the full trace file:
20211017_gamescope_trace-cmd.dat.tar.gz
some more information:
starting steam via gamescope (either from within sway or directly from tty with /usr/local/bin/gamescope -e -f -- steam -tenfoot -steamos -fulldesktopres
and then a steam game does not cause these stutters.
Starting steam from within sway without gamescope and then using the steam game launch options to start a game via gamescope causes these stutters after ~24-25 minutes.
ARK goes into stutter mode after 20mins with gamescope, no idea whats going on.
I just remembered; I believe this stutter happens with gamescope and Star Citizen (via wine). So that is yet another game that gets this bug and surely a solution can be found.
@ppascher interesting trace, thanks a lot! Looks like something is keeping the steamcompmgr thread busy for a long time. This would be great to look at such a trace with latest gpu-trace, which also includes a perf capture.
Separate from that, worth re-testing with current master, as the buffer import path has changed significantly and might interact with this issue.
@Plagman Sorry, did not get a notification and just now saw your reply. I just tested with kernel 5.15.11, mesa, wlroots, gamescope git master as of today and still run into this issue. I created a new capture using gpu-trace and sent you a download link through the valvesoftware contact page (I get an error when trying to attach the file to this comment) This trace shows the stuttering and also a brief period where the stutter was reduced when I kept moving the mouse. Thank you for looking into this.
Hello, I don't know if this is related, but someone on Reddit asked me to mention it here.
On Fedora 35 with Gnome, Nvidia and Xorg (no Gamescope), when I play Valheim (Native, Vulkan) it starts stuttering after about 30 minutes unless I enable the Steam overlay, which seems to workaround the bug. To be clear: Steam overlay disabled = stuttering and low FPS after ~30 minutes, Steam overlay enabled = normal performance. I don't need to open the overlay in game either, just having it be enabled works. I do have an FPS counter though.
Maybe the Steam overlay has something to do with this issue? Or whatever it does bypasses the error? Again, I'm not using Gamescope, so its probably a completely different issue specific to Valheim.
More people mentioning the bug in this thread: https://www.reddit.com/r/linux_gaming/comments/lmslz9/best_settings_to_optimize_valheim/
I do believe Mortal Online 2 stutters with gamescope after 20mins or so. I noticed at main menu a distinct mouse cursor stutter (can't get into game due to queue, but yeah, stutter).
Sure hope this stutter issue can be resolved. Kind of makes GS pointless otherwise, and it may also occur on steamdeck once in peoples hands.
Yup the problem still exists. So weird. Only AMD GPU card are affected, with Intel processor ?
On Wed, Feb 2, 2022 at 6:27 AM jarrard @.***> wrote:
I do believe Mortal Online 2 stutters with gamescope after 20mins or so. I noticed at main menu a distinct mouse cursor stutter (can't get into game due to queue, but yeah, stutter).
Sure hope this stutter issue can be resolved. Kind of makes GS pointless otherwise, and it may also occur on steamdeck once in peoples hands.
— Reply to this email directly, view it on GitHub https://github.com/Plagman/gamescope/issues/163#issuecomment-1027599257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN7SZSWCVRULNNQMJTDWV6LUZC6E7ANCNFSM4XAY46PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
AMD 5700G and 6800XT here.