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

No display on Wayland with a NVIDIA GPU (Arch Linux, KDE Plasma 5.26) #13

Open
Dupiter-AU opened this issue Oct 13, 2022 · 12 comments
Open

Comments

@Dupiter-AU
Copy link

While running games such as Team Fortress 2, Portal 2 and Counter Strike: Global Offensive, games do not render anything to the screen under XWayland. When forcing SDL_VIDEODRIVER=wayland in Team Fortress 2 with the libSDL replacement recommended by mastercomfig, the game does successfully render to the screen, however the game will freeze and crash not long after launch. I have attempted to look for error messages in steam console and in the output console from both the in-game console and in the console from launching the hl2.sh script from konsole, but I could not find anything of use.

I have confirmed this is an issue related to NVIDIA by testing both on my AMD Vega 8 laptop and my 2060 Super desktop PC. The games work perfectly under Wayland on AMD, but not on NVIDIA. Both the new open source NVIDIA drivers and the proprietary drivers have this problem.

I have also confirmed this is a problem with ToGL. When Portal 2 and certain other source games are launched in Vulkan using -vulkan, the game displays to the screen perfectly and has no problems. Without vulkan, the games do not render.

This issue is related to issue #3871 found in the Source-1-Games repository, however no progress or even developer communication has been made so far on that issue.

@mark-russ
Copy link

My system:
ArchLinux, GNOME (Wayland), NVIDIA (Proprietary)

I too can't play TF2. The game runs for me, but the menu HUD doesn't appear. I can hear the music playing, I can even blindly press "tilde" and type "exit" to close the game gracefully.

@SilverMight
Copy link

Also experiencing the same issue. It seems to vary across versions, I can play Garry's Mod fine as an example.

@getchoo
Copy link

getchoo commented Oct 30, 2022

try to launch it using native SDL (as described here), SDL_VIDEODRIVER=x11, and with anti-aliasing disabled

@Tank-Missile
Copy link

@getchoo That results in only the loading screen rendering instead of a black screen, which I guess is progress. There's still the issue of the game not updating frames. I can click buttons on the main menu, but I can't see anything because it's obscured by the loading screen.

@getchoo
Copy link

getchoo commented Oct 30, 2022

did you delete the builtin version of SDL? i've tested this on TF2 with multiple distros (with the proprietary kernel module, maybe the open source version differs with this) and it's never had that problem

@Tank-Missile
Copy link

@getchoo Yes. I deleted the builtin version of SDL. I also deleted videoconfig_linux.cfg to start fresh and ensured mat_antialias was set to 0. I'm using the proprietary kernel driver on a GTX 1070.

@getchoo
Copy link

getchoo commented Oct 30, 2022

if you use mastercomfig, disable it by using the modules (anti_aliasing=off in tf/cfg/overrides/modules.cfg). if you don't, put the commands used here in your autoexec and try again

@Tank-Missile
Copy link

Tank-Missile commented Oct 30, 2022

@getchoo I'm not using masterconfig, but I was using a bunch of custom config files. I deleted the cfg folder and started the game again, and it actually worked! I'm not sure what's causing the issue from the cfgs. You can take a look at them here.

@getchoo
Copy link

getchoo commented Oct 30, 2022

not sure, but i'm guessing it's one of the cvars in optimization.cfg - maybe r_queued_post_processing since iirc that can change the video mode tf2 uses. i would try mastercomfig though, has similar cvars as your config, but with better values along with even more optimizations - plus you could avoid issues like these :p

@Dupiter-AU
Copy link
Author

Dupiter-AU commented Oct 31, 2022

I can confirm that anti-aliasing causes the display to be broken (in Team Fortress 2). Disabling the anti aliasing module in mastercomfig allows the game to render fine, which is a real shame.

EDIT 1: This problem does appear to be directly related to anti-aliasing. Counter Strike Global Offensive launched after a while when I disabled AA and displayed without a hitch. I attempted to test Portal 2 but it wasn't launching for some reason

EDIT 2: This does not work for Portal 2.

@Dupiter-AU
Copy link
Author

Attached is a video showcasing the effects of toggling CS:GO's anti-aliasing setting while in-game.
https://user-images.githubusercontent.com/82429716/198947109-67040d57-20da-450f-8779-f64bc8f3bd9d.mp4

@Invertisment
Copy link

I use swaywm and nvidia drivers. Adding -windowed -noborder command-line options for TF2 fixed it for me:
image

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

6 participants