Skip to content
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

flickering issue with trainer, because of wayland (+nvidia)? #6

Open
ahjolinna opened this issue Nov 5, 2023 · 12 comments
Open

flickering issue with trainer, because of wayland (+nvidia)? #6

ahjolinna opened this issue Nov 5, 2023 · 12 comments

Comments

@ahjolinna
Copy link

as you can see from video below, this same flickering happens to me every time when I open the trainer.

my guess is because of wayland, and because of nvidia?....is this driver issue or can you fix this?

Screencast_20231105_212448.webm

my PC spec:

Operating System: openSUSE MicroOS 20231103
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.9-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 46.8 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
GPU Driver Version:  535.129.03
@wyyadd
Copy link
Owner

wyyadd commented Nov 6, 2023

I've encountered the same issue as well.
It appears to be related to the specific trainer; some trainers flicker while others do not.
When I tried minimizing it and reopening, the flickering stopped. I suspect it might be related to how it detects the game process (as the flickering frequency seems consistent).
Have you tried launching the game first and then starting the trainer? Does it still flicker in that case?"

@ahjolinna
Copy link
Author

well I tried with Baldur's Gate 3, and minimizing thing you mentioned did help but not the launching the game first

@ahjolinna
Copy link
Author

it seems this flickering issue is a nvidia driver issue on wayland, as it doesn't exist on x-server nor AMD gpu with wayland. (at least on the couple trainers that I have been testing with)

which isn't that surprising as nvidia wayland support has been behind/slow, okay the latest 545 branch seems really promising but sadly they rushed the release because of security thing and now there is a wayland bug that makes it unusable, hopefully the next release is soon'ish

@wyyadd
Copy link
Owner

wyyadd commented Nov 7, 2023

Thank you for the information.
After testing on my AMD GPU with Wayland, the flickering issue still occurs.
However, if you've already started the corresponding game and then launch the trainer, once the trainer detects the game process, the flickering stops.

@ahjolinna
Copy link
Author

oh it also happened on AMD, okay so its not just nvidia, so it seems to be xwayland issue

so as the trainers are getting opened in proton/wine, so we have to wait either xwayland support being fixed
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1120
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317
or wait for native wayland support for wine/proton
part 9 of the support is now in the works: https://gitlab.winehq.org/wine/wine/-/merge_requests/4203

PS. some of the nvidia 545 drivers wayland issues
https://forums.developer.nvidia.com/t/feature-g-sync-freesync-under-wayland-session/220822/46
https://forums.developer.nvidia.com/t/new-545-beta-only-renders-update-game-if-window-is-unfocused-otherwise-it-will-have-0-fps/269759
https://forums.developer.nvidia.com/t/545-29-02-wayland-synchronization-issues-with-framerates-below-screen-refresh-rate/271577
and other ones

....so sometime 2024 this will be fixed, hopefully

@wyyadd
Copy link
Owner

wyyadd commented Nov 10, 2023

You are Right. It is a Wayland-related issue.
After some testing, I haven't experienced flickering when I switched my Ubuntu to X11.
The flickering issue reappeared when I switched back to Wayland.
Similarly, in SteamDeck's desktop mode (X11), I didn't observe any flickering.
However, when switching to gaming mode, I did notice flickering.

well only thing that makes SteamOS different from others when in GamingMode is that it uses gamescope for wayland ...(desktop/KDE it still uses x-server)

You mentioned that gaming mode uses Wayland, so I suspect it might be a Wayland-related issue.
So, I think temporary solution is switching to x11.

@ahjolinna
Copy link
Author

yeah it seems to be a wayland issue, or more exactly xwayland as wine/proton doesn't have native wayland support yet.

when I mentioned gamescope I was mainly thinking about the flatpak issue where it wouldn't launch the trainer

@ahjolinna
Copy link
Author

apparently activating the option for “Emulating a virtual desktop” in the Graphics Tab in winecfg would fix this issue, is it possible to make this default for all the trainers?

@wyyadd
Copy link
Owner

wyyadd commented Nov 10, 2023

I'm so glad there's a solution :)
Thank you for your suggestion, and I'll provide updates as soon as possible.

@wyyadd
Copy link
Owner

wyyadd commented Nov 10, 2023

Activating "Emulating a virtual desktop" would make games and trainers run in a window. Running in a single window also prevents the use of "Alt+Tab" to switch between game and trainer, making it less user-friendly.
After several hours of online research, I couldn't find a method to make trainers and games run in separate windows.
Making "Emulating a virtual desktop" the default for all trainers might not be the best solution. :(

@ahjolinna
Copy link
Author

well to bad, it seems we have to wait for wine dev finish their native wayland support. It has progressed a lot just not sure how much they still need to do, hopefully when wine 9.x is released...soonish

@wyyadd
Copy link
Owner

wyyadd commented Nov 12, 2023

Update:
I wrote a tutotial on how to fix this issue at README FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants