-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gamescope runs fine, when it works then starts to stutter very badly on Fedora KDE #163
Comments
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 d537d6a. 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. 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) |
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 |
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. |
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. |
Tried some more games. The stuttering appears after the 24 minute mark for 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): |
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. |
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. |
I run at 3440x1440 and tried both |
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. |
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: |
some more information: |
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) |
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/ |
Any solutions? I get this issue on Apex and Elden Ring but probably I will get on every game. My launch options are gamemoderun gamescope -e -f -- %command% . Distro is Endeavour (arch btw) and using kde-wayland. |
The issue just disappeared for me. Im on arch, maybe an update of some package fixed it |
It appears the bug gone with this solution. My steam overlay was off. |
Enabling steam overlay prevents the issue for me as well. Tested in both DXVK (Kingdom Come Deliverance) and VKD3D (Cyberpunk 2077). Thank you @JPEspinoza |
I can confirm that enabling the Steam overlay "fixes" the issue. I'm on Fedora (Rawhide) aswell. |
It's related to /cc @Plagman |
Same issue in Back 4 Blood on Fedora Silverblue 37 flatpak gamescope/steam versions, using |
you should have -e in flags and enable steam overlay. @mystrdat |
Ran into this issue too, unfortunately 😢 Nvidia GTX 960, Ryzen 3700X, Arch Linux, Openbox, Castlevania Advance Collection, Proton-tkg 7.18.r11.gaabde227, Linux 5.19.14-270-tkg-bmq Here's my Steam launch options:
And here are the proton logs: I'm running vk-capture, but I can't imagine the problem is there, right? For me, the time limit is about 27-28 minutes before the stuttering starts. I don't have concrete proof, but I suspect that the game window needs to be in focus for the stuttering to happen; I feel like the game was running for >28 minutes with no problem, but after about...maybe 11 minutes of in-focus gameplay, the stutters happened. Running with the overlay helped, but I'm recording game footage, so it's not really an optimal solution. Running without gamescope and without the overlay also worked fine, in my brief testing. It also doesn't seem Wine-specific: I encountered slowdowns with Risk of Rain as well (again with gamescope on and the overlay off). Anyway, I'm happy to provide more information if it'll help 👍 |
I managed to take a picture with MangoHud running (sorry for the tiny font 🤣) : Like before, the stutters happened after somewhere between 95-96K frames--roughly 28 minutes of gameplay. Curiously, GPU usage seems to be reduced after the stutters begin; it went from 20-30% usage to 10-20% usage 😕 . I also managed to get some logs (again, from MangoHud): game_2022-10-23_23-15-07_summary.csv There seems to be a bunch of weird 14 FPS dips surrounded by normal FPS rates 🤔 My gamescope params are here:
If possible, I'd really love to see a fix that's not just "turn on the steam overlay" 🙏 (Also, IMO, this bug is up there with #216 and #577 for me...but those I can kind of work around 😆) |
Same issue here on Ubuntu 22.10 and Nvidia T600 with 515 drivers installed. Going to try the suggested launch command addition -e plus will also enable Steam Overlay, as I usually turn Steam Overlay off, and report back how it goes. Installed Gamescope via Ubuntu 22.10 repos. Tried Proton Exp and Proton 7 so far. |
Update Ok, doing what the others suggested "fixed" the issue on my end as well: Activate Steam Overlay, add -e line to Gamescope launch command in Steam, use Proton 6, 7 or Exp - works with all of them. Performance is more or less normal after this. Usable workaround for now, but not optimal when recording or streaming via OBS ofc. That said, wouldn't mind donating a few coins to fix this. |
Sadly this issue still exists for me; when I enable steam overlay with or without the |
@Melorn366 please, rename this issue to make it easier to find |
I still experience this issue when using gamescope. Operating System: Arch Linux |
I am having the same issue. Ubuntu 22.04 with Nvidia Tesla P40. Games run fine for around half an hour, then frame drops severely, and frame time goes crazy. Without gamescope all games run perfectly. I will try enabling steam overlay and adding -e option. |
out of curiosity, what are your parameters to run KCD over gamescope? No matter what I do the game doesn't start (leaving wine components hanging and requiring to be killed manually). I get the splash screen and then nothing. |
Getting this issue with non steam games on steam deck. Does anyone have an idea of what workaround might work there? Enabling the overlay in game mode doesn’t appear to be a thing Reddit thread: https://www.reddit.com/r/SteamDeck/s/KZ9lKAOLtw |
Looking at the reddit thread, looks like at some points there's a spike in one of the cpu cores (see time 0:02 of the video, time 0:04)... If you can look at the terminal/stdout output of gamescope, you should be able to check if gamescope is able to bypass Xwayland by seeing if it prints lines that start with: If you determine that the problem is with games where gamescope isn't able to bypass Xwayland, then try launching said games with: EDIT: if you still end up experiencing stuttering, try building the commands to clone and build it: git clone https://github.com/sharkautarch/gamescope.git
cd gamescope
git checkout gs-inline-paintall
git submodule update --init --recursive
meson setup -Dc_args="-Wno-uninitialized -Wno-maybe-uninitialized" -Dcpp_args="-Wno-uninitialized -Wno-maybe-uninitialized" --reconfigure build
ninja -C build commands to give it the ability to run it w/ realtime perms: double check the directory where this branch was built (because I'm not sure how compiling and running stuff works on the steam deck): run it like so:
|
This bug goes away for me when unsetting the LD_PRELOAD env var for the gamescope process (eg steam launch command like |
Thank you! This fixes the issue for me. |
What's LD_PRELOAD being set to that's causing this then? |
This is usually set to both the 32 and 64 bit gameoverlayrenderer.so dynamic libraries whether steam overlay is enabled or not. |
Not sure if it can help, but on my end this issue triggers only when When the game starts stuttering, hiding mangohud with RALT+F12 helps lowering the issue by ~75% but doesn't make it disappear. Removing the |
For internet reference, the website linked was wrong. Quoting the nice manpage: Run COMMAND with an adjusted niceness, which affects process scheduling. With no COMMAND, print the current niceness. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). |
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 ?
The text was updated successfully, but these errors were encountered: