this post was submitted on 14 Jun 2024
108 points (99.1% liked)

Linux Gaming

15218 readers
173 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 1 year ago
MODERATORS
 

I use an AMD card, playing on Bazzite. How and when, do i know when its best to use Vulkan or Directx on linux?

all 30 comments
sorted by: hot top controversial new old
[–] [email protected] 94 points 4 months ago* (last edited 4 months ago) (3 children)

I'll go against what most comments said and recommend DirectX 11. Yes, DXVK will translate it to Vulkan anyway, but Larian's own Vulkan implementation is definitely less stable compared to DX11.

I've experienced multiple crashes during simple things like opening the character sheets using the tab key, or crafting alchemy potions. I never had a single crash using DX11. I used Fedora 39/40 and openSUSE Tumbleweed, so the kernels were fairly recent. Radeon 7800 XT GPU.

I had the same experience under Windows 10 (before I switched to Linux), Vulkan has smoother frametimes but DX11 is more stable.

YMMV, this is just my experience from almost 400 hours played so far.

[–] [email protected] 5 points 4 months ago (2 children)

Agreed. Even though I have a nvidia card which might be the cause of some issues due to the drivers. Had some crashes using vulkan but none using dx.

[–] TwoBeeSan 1 points 4 months ago

Same here. 3060ti have found dx 11 to be more stable in almost all games

[–] CarlosCheddar 4 points 4 months ago

This happened to me when playing Hades a few years ago, choosing DirectX was faster and more stable than Vulkan when using Proton.

[–] Molecular0079 2 points 4 months ago* (last edited 4 months ago)

They borked the Vulkan Renderer somewhere around Patch...3 I think? It used to be so performant, but now it runs only at 40-60fps on my Nvidia 3090 compared to the DX11 renderer which can render at 80-120 T_T

[–] [email protected] 40 points 4 months ago* (last edited 4 months ago) (1 children)

DirectX is a Windows thing, so you'll just have those calls translated to Vulkan under the hood (DXVK). You'll probably get better performance from just setting it to Vulkan directly.

Edit: As some others say, for BG3 specifically, DXVK does a really good job. My personal experience is that "the best" option is very patch dependent. At launch Vulkan was best, then after a few patches did DXVK ran better, but personally I'm back to straight Vulkan, for no other reason than wanting to be a +1 in the statistics.

[–] [email protected] 4 points 4 months ago (3 children)

What about OpenGL? What's that and should I choose it instead of DirectX?

[–] [email protected] 14 points 4 months ago (1 children)

OpenGL is a bit like Vulkan, but discontinued since... 2014, with a single update since then. It was actually stopped because Vulkan seemed better, and both API's were maintained by the same organisation.

In general it's more likely to work on older devices, but would be less performant than Vulkan.

[–] [email protected] 2 points 4 months ago (1 children)

So if a game has OpenGL and DirextX as options such as TF2), it's generally better to pick DirectX?

[–] [email protected] 2 points 4 months ago

If you have an Nvidia GPU definitely pick DirectX. On AMD it's more of a tossup, depends on the game and the features in question but generally it won't need to translate OpenGL, so it has higher maximum performance potential.

[–] ozymandias117 8 points 4 months ago

To expand - DirectX is a proprietary Windows solution. Any time you pick it on Linux, it will run through a translation layer

OpenGL/Vulkan are cross-platform

OpenGL is to DirectX 11 as Vulkan is to DirectX 12

Microsoft kept the same branding, but also followed in Vulkans/Metals footsteps of using lower level calls to the hardware. This makes the graphics drivers simpler, and can be way more performant because the CPU doesn’t have to do as much

[–] [email protected] 7 points 4 months ago (1 children)

OpenGL is an older graphics API with a lot of issues I won't get into here.

You're almost guaranteed to be better off using DXVK.

[–] [email protected] 1 points 4 months ago
[–] [email protected] 20 points 4 months ago

You find out by installing MangoHud and checking which works better.

Shortly after release neither one made any real difference for me.

[–] [email protected] 16 points 4 months ago (1 children)

Depends on the games and their implementation of Vulkan but generally Vulkan is preferable and typically runs much faster.

[–] Molecular0079 2 points 4 months ago

Usually yes, but it doesn't apply to BG3. The vulkan renderer is terribly broken ever since Patch 3.

[–] [email protected] 14 points 4 months ago

Dxvk is usually better, but using vulkan is the better strategic move, you'll increase their vulkan stats and provide QA. Good native vulkan support will beat dxvk every time.

[–] [email protected] 14 points 4 months ago

as far as im aware its always better to use vulcan

[–] Gakomi 12 points 4 months ago (1 children)

Always is better to use vulkan!

[–] olafurp 4 points 4 months ago (1 children)

Warhammer TW 3 "Native" mode sucks ass. Running Direct X on Proton is much better.

[–] TipRing 1 points 4 months ago

Except since 5.1 I get soft locks on loading screens running via Proton Experimental. I wish their native support wasn't so awful and dated.

[–] c10l 10 points 4 months ago

Up until a few months ago, Vulkan was very unstable on BG3. It’s been fine for a while though. I haven’t made performance or smoothness comparisons though, I just default to Vulkan and it’s been fine.

[–] [email protected] 8 points 4 months ago
[–] Presi300 8 points 4 months ago

Try them both and use the one that works better

[–] popekingjoe 7 points 4 months ago

Vulkan, always, just to echo the other comments. This game runs pretty well too, at least in my experience. MP even works!

[–] [email protected] 7 points 4 months ago

Directx 11 in this case, played bg3 on Linux and that was the only option that worked, and it did work quite well.

As for when to use one or the other, just check protondb. People usually leave what they played on, they even leave some useful launch commands or solutions to issues that could possibly arise, so it's always worth a look.

[–] angrymouse 3 points 4 months ago

Usually depends of the game, no idea in BG but I would recommend testing both

[–] dodos 2 points 4 months ago

Vulkan in proton was busted at launch (couldn't start the game), but I've heard it's better now. If you have issues then you can always switch.

[–] [email protected] 2 points 4 months ago

I'm still running windows for now, but even then Vulkan has de-fucked a few games for me. Given the option, always Vulkan.