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
SDL_VIDEODRIVER=wayland not working with -vulkan #282
Comments
Updates? Is it an issue with the Gnome/Linux stack or Dota 2 itself? |
SDL_VIDEODRIVER=wayland steam and I get: Error When trying to run dota2. |
Dota2. Someone on gamingonlinux.com said it might have been something to do with the old sdl library the game ships with. They all need updated to support wayland. |
@romulasry I am running dota 2 on fedora 29 with gnome/wayland and I use the system provided SDL library, see #282 |
Possible setup
Game crashes
Any updates on the issue? |
Can confirm that this is still an issue. Unsure if it's a SDL2 bug or Dota 2 bug |
Update? |
EDIT: Seems I was wrong... it was supposed to run with Wayland but it was using Xwayland. :'/ I tried on Arch with the latest available kernel + mesa stack there and Intel and it was working with vulkan + wayland - at least it was starting. Can I somehow check if xwayland or wayland was in use and if vulkan worked? With AMD (RX 480 8 GB) it failed. |
Any update on that ropic? Maybe @rcgordon could have a look please? :) |
This issue still persists. When using a Ubuntu 20.04 wayland session, I can not start the game with -vulkan at all. In a X11 session, i can use -vulkan without issues. (But X11 does have other bugs, e.g. super tiny steam launcher when using fractional scaling 125%) I have installed:
and the latest kernel: 5.8.12 |
Same as @Kuphi on an RX580 - however I cannot get it to work with Wayland and
Any suggestions for that? |
Any development on this? I tested with a newer version of SDL2 (SDL2-2.0.so.0.14.0) and it didn't work. Also tested with AMDVLK and the proprietary AMDGPU-PRO vulkan driver. I can run it with OpenGL though. |
Update? |
@kisak-valve can you give us any updates what the status of this is? Maybe more details which parts of the stack need to be adapted/fixed? |
There has been a ton of Wayland support work done to SDL in the past few weeks; if anyone is so inclined, I'd appreciate if you build the latest from revision control (now on GitHub!) and see if it improves the situation. If not, feel free to file bugs with SDL on this (also now on GitHub!), since I assume most of these sorts of issues are going to be related to SDL more than Dota2. We can always toss it back here if appropriate. |
last #282 (comment) |
That error might be a Wayland bug or a Dota bug, but that specific thing probably isn't an SDL bug, fwiw. There's a non-zero chance this is just Vulkan+Wayland isn't working on your system, though. Since you were comfortable building SDL from git, can you go into SDL/test, run configure/make, and then try running If you get a window that's just slowly fading from one solid color to the next, you definitely have a system that can handle the world's most simple Vulkan application on Wayland (and can hit ESC to close the window). If not, we know this is probably a system configuration issue or a driver bug. If this does work...we'd have to see what Dota2 is doing under the hood...maybe it assumes a Vulkan graphics queue can also accept present commands, and panics if not, but that's just how Wayland sets things up but X11 doesn't? That seems unlikely for several reasons. So let's try testvulkan first and rule out easy culprits. |
@icculus it works |
Then this is back in Valve's hands, sorry. |
EDIT: Sorry, false alarm. It does still not work. Steam didn't catch my "-vulkan" flag. For me it's working now. Seems like the missing wl roots implementation of Vulkan caused the problem. I use the following version now:
|
@cRaZy-bisCuiT Can you share a bit more details about your setup (e.g.: SDL version, mesa version, GPU)? I'm also on Arch (btw) with the exact same version of |
Using OpenGL by adding -gl makes it work but I would rather use vulkan:
Intel iGPU |
Ubuntu 21.10 here The system-provided lib looks quite old (it symlinks to libSDL2-2.0.so.0.14.0 ) If I try just |
This comment has been minimized.
This comment has been minimized.
I'm hoping that priority of fixing -vulkan with wayland native libSDL be revised. As posted in latest Dota 2 announcement, this will be the last major update with -gl. As an added thought, it seems to me that librendersystemvulkan.so calls Xorg libs directly instead of using libSDL's WSI. As can be seen here: $ ldd librendersystemvulkan.so
To compare, here's how librendersystemgl.so looks like, which does appropriately use libSDL's WSI: $ ldd librendersystemgl.so
I would welcome -gl removal, if it was possible to use -vulkan with SDL_VIDEODRIVER=wayland as it is possible with -gl. To achive that, my guess is, -vulkan should stop calling Xorg out of the blue, as I've shown above, and use libSDL's WSI as librendersystemgl.so does. |
Can we please have @danginsburg to look at this since -gl is getting purged. |
With yesterday's 7.32e update, -gl got removed. Now, I am no longer able to run Dota 2 on wayland natively without xwayland, which was possible with -gl (it didn't use Xorg bits out of the blue like -vulkan, when it calls libXau, libXdcmp instead of using libSDL's tid bits). Please make librendersystemvulkan.so play nice with libSDL's SDL_VIDEODRIVER setting like librendersystemgl.so did before removal. Dota 2 with -vulkan hangs up sway wayland session on high gpu utilization on Nvidia forcing me to kill -9 dota2, that's what kind of error I get every time that happens:
Please help @danginsburg Anyways, here's what I get when launching with VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json SDL_VIDEODRIVER=wayland SDL_AUDIODRIVER=pulse %command% -vulkan -noborder -high -console:
And with VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd_egl.json SDL_VIDEODRIVER=wayland SDL_AUDIODRIVER=pulse %command% -vulkan -noborder -high -console:
|
Update? |
Setting
|
Cant help you there, I'm using Arch KDE with Steam-Native. There's a separate issue for cs2 though. ValveSoftware/csgo-osx-linux#3359 |
Your system information
Please describe your issue in as much detail as possible:
Environment:
DRI_PRIME=1
LD_PRELOAD=/lib64/libSDL2-2.0.so.0 SDL_VIDEODRIVER=wayland DRI_PRIME=1 %command%
Steps for reproducing this issue:
-vulkan
to start optionsWhen setting
SDL_VIDEODRIVER=x11
instead ofSDL_VIDEODRIVER=wayland
the game starts.The text was updated successfully, but these errors were encountered: