What's up with GPUs under Linux?

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
User avatar
zip accident
Sheepie Whore
Sheepie Whore
Posts: 13928
Joined: Sun Feb 20, 2005 1:58 pm 0
Location: Bristol, UK

What's up with GPUs under Linux?

Post by zip accident »

I am aware that "AAA" games do not, typically, maybe ever, first surface on Linux.

Is this a driver issue?

Is there some deep problem with X11 that prevents drivers being written?

I would be very seriously up for moving to Linux if there were AAA style games (free Civ last I saw wasn't up to what I wanted).

I am aware that DirectX is and should be a Microsoft property. but X11 is older than Windows, so it seems to me that it should be possible to write something equivalent over or under X11 that's efficient enough to get the job done.

I'm currently running Windows 7, there are a lot like me out here, it's a big potential market.
"My way is the way of not fighting":- the book of Enter the Dragon.
User avatar
Little stoned kiwi
Baaaaaa!
Baaaaaa!
Posts: 4597
Joined: Mon Oct 27, 2003 6:05 am 0
Location: Christchurch

Re: What's up with GPUs under Linux?

Post by Little stoned kiwi »

I think Steam requires Vulkan now. Which X11 apps can run on.
DirectX would be the biggest hurdle for cross-platform. Then there's just the will to do it. Steam have their own version of WINE to improve compatibility.

But it will never be the same. If Linux is an unacceptable alternative because it doesn't run software developed to run on Windows...*shrug*
If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy.
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: What's up with GPUs under Linux?

Post by Dio »

Vulkan exists and works natively on Linux.

But the usual assumption, which I have heard from developers, is that Linux ports don't even make their porting money. Seems there's this general belief that Linux is all free.

Valve have put a lot of effort into the problem from both sides in that they have done real Linux ports of both their and other people's games and made the WINE+fake-DX ecosystem mostly good enough to play most games for the Steam Deck.
User avatar
Little stoned kiwi
Baaaaaa!
Baaaaaa!
Posts: 4597
Joined: Mon Oct 27, 2003 6:05 am 0
Location: Christchurch

Re: What's up with GPUs under Linux?

Post by Little stoned kiwi »

Little stoned kiwi wrote:I think Steam requires Vulkan now. Which X11 apps can run on.
Total brain fade, I meant Wayland.
Dio wrote:Seems there's this general belief that Linux is all free.
That's a goddamn slur!

I don't expect anything to be free in price and use Linux for reasons other than refusing to purchase Windows. If that was the reason I'd steal it.
There's never been a reason to invest in hardware with poor vendor support and a limited range of software to run on it. I doubt any members of the master race with expensive rigs are using Linux.
If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy.
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Re: What's up with GPUs under Linux?

Post by Dio »

Slur it may be, but if you go look at the history of game developers who've tried selling games on Linux, "nobody bought the Linux version and it wasn't worth the effort" is sadly common. Steam Deck has changed the environment there a bit though (and it's a very clever hedge for the Steam guys against all gaming going to proprietary console).
User avatar
zip accident
Sheepie Whore
Sheepie Whore
Posts: 13928
Joined: Sun Feb 20, 2005 1:58 pm 0
Location: Bristol, UK

Re: What's up with GPUs under Linux?

Post by zip accident »

Little stoned kiwi wrote:I doubt any members of the master race with expensive rigs are using Linux.
Are they/we being kept out by a "no expensive hardware please" clique?

I am very disinclined to frequent closed ecosystems like Apple's or the consoles, so I would quite like to see Linux or GNU allowing the use of modern hardware, but if the current mob have objections that may explain why it never seems to happen.
"My way is the way of not fighting":- the book of Enter the Dragon.
User avatar
WiteWulf
Sheepie Whore
Sheepie Whore
Posts: 10125
Joined: Mon Aug 23, 2004 11:20 am 0
PSN: WiteWulf
Location: Loughborough(ish)

Re: What's up with GPUs under Linux?

Post by WiteWulf »

I've heard, anecdotally, of a growing number of gamers moving from Windows to Linux to run their AAA Steam games due to better performance (likely from lower OS overhead) than Windows 11. The specific case I heard was with respect to Starfield(!)

Proton, Vulkan and VKD3D are now extremely polished pieces of software. As a consequence there seems to be less and less point in Linux native ports of games. This is particularly apparent when the Windows version running through Proton performs better than the Linux native one.
:::G:::

PSN: WiteWulf
Switch: SW-3941-2878-7584
Steam: WITEWULF66
User avatar
zip accident
Sheepie Whore
Sheepie Whore
Posts: 13928
Joined: Sun Feb 20, 2005 1:58 pm 0
Location: Bristol, UK

Re: What's up with GPUs under Linux?

Post by zip accident »

WiteWulf wrote:I've heard, anecdotally, of a growing number of gamers moving from Windows to Linux to run their AAA Steam games due to better performance (likely from lower OS overhead) than Windows 11. The specific case I heard was with respect to Starfield(!)
Sounds good.
Proton, Vulkan and VKD3D are now extremely polished pieces of software. As a consequence there seems to be less and less point in Linux native ports of games.
I would worry that something running under a version of Windows in Linux would at some time in the future get hit by a copyright claim from Microsoft, which seems to me to be much less likely if it were running natively.
This is particularly apparent when the Windows version running through Proton performs better than the Linux native one.
That seems weird to me, I'd think there ought to be less random stuff between a native application and the hardware.
"My way is the way of not fighting":- the book of Enter the Dragon.
User avatar
WiteWulf
Sheepie Whore
Sheepie Whore
Posts: 10125
Joined: Mon Aug 23, 2004 11:20 am 0
PSN: WiteWulf
Location: Loughborough(ish)

Re: What's up with GPUs under Linux?

Post by WiteWulf »

To be clear: Proton, etc. is not "a version of Windows (running) in Linux". They're translation/abstraction/emulation layers that allow Direct3D games (running using Wine) to use standard hardware via the linux Vulkan APIs. IMHO, what Valve and the rest of the development teams are doing isn't copyright infringing. And Wine's been around for a loooooong time (30 years!) and Proton specifically has Valve behind. I've be very surprised to see MS going after either project with a copyright claim.

As to why some games run better via Proton than their native linux ports, I think that's down to the Windows version having a lot more time and money put into their development and optimisation than the linux counterparts, due to perceived forecast sales (and profit). The Windows versions are simply better games as a consequence.

https://en.wikipedia.org/wiki/Proton_(software)
:::G:::

PSN: WiteWulf
Switch: SW-3941-2878-7584
Steam: WITEWULF66
User avatar
KlaxonCow
Baaaaaaa!
Baaaaaaa!
Posts: 8444
Joined: Fri Dec 13, 2002 3:46 am 0
Location: A large grassy field.

Re: What's up with GPUs under Linux?

Post by KlaxonCow »

It's been mentioned, but to fill in the details for those who don't know...

Modern Linux distros have moved / are moving to Wayland instead of X11.

Wayland is a response to the fact that X11 is, indeed, older than Windows and has, over those many years, built up a lot of crusty unused legacy.

Font rendering stuff, character encoding stuff, geometric primitives stuff, etc.

But which, you know, nobody uses anymore because, if you want fonts, you use TrueType / OpenType. Unicode handles character encoding.

And, in practice, what modern applications actually do is use OpenGL / Vulkan, the Pango library for text, which itself uses the Cairo library for graphics to create their own graphics and then just send the end result to the compositor for display.

Wayland recognises this and, not bound by the legacy of X11, just does that. It expects apps to render their own graphics - using graphics API and libraries - then just pass the end result to Wayland for compositing and display.

Of course, lots of stuff is still X11-based, so you have XWayland. Which is an X server that runs on top of Wayland, to bridge the gap and provide the compatibility (which is lateral compatibility, not backwards compatibility, so Wayland is not weighed down having to support any X legacy - which, honestly, ought to be the way it's always done).

Linux supports OpenGL and Vulkan. Indeed, let's remember that Vulkan was "OpenGL Next" in development. But it was decided - similar to Wayland with X11 - that the best approach was not to keep maintaining the "crust" of decades of legacy, dragging everything down. But start from scratch with how things are in the modern world with modern hardware.

The name change is a good idea - to reflect that this is now its own "new thing", unrelated to the old - but it is just "the next version of OpenGL", so to speak (okay, this is confused by the fact that OpenGL still exists and is moving to version 5, so you can't just call Vulkan "OpenGL 5.0" but that's kind of what it is, just that the path splits at that point to the "maintains legacy OpenGL" and the "doesn't maintain legacy OpenGL").

Underlying all this, then nVidia, AMD and Intel do all provide Linux graphics drivers.

And there's also open source alternatives as well - Nouveau is the open source nVidia drivers, for folks who don't want to use nVidia's closed source "proprietary blob" drivers (as you might guess, it's not as performant as nVidia's own drivers - because no-one knows nVidia's hardware better than nVidia - but it does work perfectly well).

WIth AMD, they've got the open source "AMDgpu" drivers. Just embracing going down the open source route, so it's first party and open source, and even Richard Stallman doesn't have to choose anymore.

No, Dio's hit the nail on the head (although you should expect that, knowing who he works for). The Linux graphics stack is perfectly good these days.

Indeed, you can see that via Proton, running all these Windows DirectX games on Steam Deck, just as well - sometimes actually better - as it runs on Windows natively. And, like, that's not at all bad, when you consider that it's all going through a translation layer as well.

And if it's Vulkan, then it doesn't need that translation of the graphics API. Vulkan's cross-platform, of course.

It's to do with money. Return on investment. Whether it's worth bothering with a Linux native port - and the fact that Proton runs so well does mess up that equation, that you might as well code for Windows and let Proton handle it.

It's the market. Indeed, even on Steam, with Valve, you cannot list a game on the Steam Store unless you have at least a Windows version. You can additionally provide Linux and Mac versions, but you can't list without at least a Windows version.

And that's with Valve's store. The people who're most behind pushing Linux gaming forward. Even there, with all Valve has been doing, Windows remains the lead platform. 100% of games on Steam are Windows compatible - because this is by definition, Valve won't let you list your game unless that's true. You can additionally support other platforms, but the Windows version has to be there.

Which skews things. Because if you've got to make a Windows version to list on Steam, and Proton does, indeed, do such a good job of making Windows games run on Linux - easing the porting effort to just "make sure it also works with Proton on Steam Deck" rather than a full-blown native porting effort.

If a game also wants to be on X-Box too, then it's already obliged to use DirectX for that. So, again, do Windows / DirectX and let Proton handle it, is the line of least resistance here.

Yeah, it's all to do with the market. Like, I'm a Linux guy and I have considered being the mad bastard who develops a "Linux only" indie game - but, actually, you can't do that on Steam. Not allowed. Must have at least a Windows version. Then additionally Linux and Mac can be supported. But Windows is non-optional, even on Valve's platform (and if not even Valve supports it, I can't see anyone else doing any better).

Proton does support AAA titles

The real problem is multiplayer "anti-cheat" stuff, as they interpret Proton as a "cheat". Because, like, it's an external layer through which the game communicates to the OS. It's a "man in the middle". And various anti-cheats simply flatly don't allow that, as that's how cheat bots work.

Valve have tried to smooth this over, allowing anti-cheats to legitimately recognise and excuse Proton. But, ah, some of the anti-cheat folks won't budge on this.

Which, again, is probably a market thing. Even with Steam Deck, is there enough Linux players to risk opening things up? Or, fuck that, we make 90+% of our money via Windows, so we're just going to carry on and double down on Windows.

Indeed, they might also be just worried that it's more time and effort to handle potential cheats and bots on multiple platforms. Like, Windows provides us enough to deal with already, so do we want to open this up and then have to learn all the potential ways Linux and Mac and Android and iOS and... can be compromised as well? There's engineering effort involved in making this stuff work, after all. Do they really want the hassle?

Nah, Dio's right. This is not a technical thing, it's a market thing.

The graphics stack is fine. There are drivers. Wayland, Vulkan, Proton. Most games run more or less as well as they do on Windows through Proton (which is impressive, remembering that that also involves passing through translation layers as well). Some stuff actually even runs faster on Linux, weirdly enough.

It's the old self-fulfilling prophecy that have kept Microsoft "dominant" throughout.

You're making hardware / software. You want to make a profit, so where is the biggest market? Oh, it's Windows. Let's aim for Windows.

You're a user. What operating system should I use? Ah, all the hardware and software works with Windows. I'll get Windows, then.

It's self-perpetuating. Self-fulfilling. You want the most users for your product? Well, Windows has all the users on desktop. You're a user and you want the OS with the most products? Well, that's Windows. More users, more products aiming for those users, more users aiming for those products, more products aiming for those even more users, more users aiming for those even more products, etc.. Round and round it goes, multiplying on itself. Like a snowball running down a hill.

In a sense, you answer your own question. Because, ah, you would move over to Linux if it had these games. And the developers of these games are looking at the stats and they're thinking "well, we'd support Linux natively, if it had more players to justify the time and expense of doing so". It's like a Mexican stand-off. Who'll blink first?
"Words ought to be a little wild - for they are assaults of thought on the unthinking."
- John Maynard Keynes
User avatar
WiteWulf
Sheepie Whore
Sheepie Whore
Posts: 10125
Joined: Mon Aug 23, 2004 11:20 am 0
PSN: WiteWulf
Location: Loughborough(ish)

Re: What's up with GPUs under Linux?

Post by WiteWulf »

And lo, for Apple looked upon Proton, and thought "We want some of that!"

https://www.theverge.com/2023/6/7/23752 ... ames-macos

Because they know that hardly anyone will invest in native Mac ports, so let the CPU and a translation layer do they heavy lifting.

It says a lot (to me, at least) that this only seems to have become a practical option since they moved *away* from Intel CPUs. Apple Silicon is mind-bogglingly fast.
:::G:::

PSN: WiteWulf
Switch: SW-3941-2878-7584
Steam: WITEWULF66
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: What's up with GPUs under Linux?

Post by gilesgoat »

Dio wrote:Vulkan exists and works natively on Linux.

But the usual assumption, which I have heard from developers, is that Linux ports don't even make their porting money. Seems there's this general belief that Linux is all free.

Valve have put a lot of effort into the problem from both sides in that they have done real Linux ports of both their and other people's games and made the WINE+fake-DX ecosystem mostly good enough to play most games for the Steam Deck.
My two cents .. "mostly is a money / distribution / support issue" .. when you say "linux" first of all what do you mean "any generic linux" ? Also is there any "clear market point / distribution for games ?".

To be honest "personally" we never explored the field cause we always tought/heard that :

- there's too little money in it
- difficulties in supporting differnt linux distros/etc. ( libs dependencies, versions, stuff, etc .)
- ( at the time we looked in ) "missing of a clear games distribution centre"
- "marketing issues" ( i.e. is there any 'big publisher/something behind supporting' )
- fact that WINE + 'things' already kinda works

Now said that the real number one issue is - so they keep saying - "There's too little money ( to be made ) in it ( and lot of work ) " if there would be really "enough" money to be made I can guarantee you at least at the moment we'd have someone asking us "I want a Linux native version of" , I even asked "would you like one ?" and the answer been around the lines of "we don't need it".

To be honest I am *NOT* and I *DO NOT KNOW* precise figures but it seems to be "even Steam deck is not enough to push for many native things" or at least not when "with a bit of fiddle of this and that" you can still run "good enough" the PC version, I wonder "how much SW they'd really would have for Deck IF that would NOT be possible" and how much market Deck would have.

Now I'd expect that "given that 90% of stuff" is done via Unity/UE "Linux should NOT be a problem" .. or you tell me that "even those big engines" DO NOT support it natively ? Why ?

Also someone mentione OSX ... "that's another weird story" ... "NOBODY ever asked us to even get close to OSX" .. and when we did try by ourselves .. again spending considerable amount of time to do something "native for OSX native" ( yes we did once, iOS was even worse I'll explain in a minute * ) we got in top 10 position on the OSX store .. did we made any significant money ? NOT A CHANCE ..

In essence "lot of work for nothing" .. did not make a blimp .. (*) then OSX/iOS version change with some "updates" and breaks the code .. and you have to do "another version for the other OSX/iOS new version" .. and then another OSX/iOS update .. and breaks it again .. and then there were thosr $150 I think per year to have your stuff "on the store" and if you don't pay you are out .. and when you earn fuck all for the game(s) you put on after a while it becomes "a constant cost" rather than a profit.

In short "does it make enough money to have 'powers' asking us 'yeah do a NATIVE Linux thing' ?" .. apparently NOT .. "does it run good enough as it is ?" .. apparently YES .. is someone paying for doing it and put all the effort to get a result "probably not far away" from what you get already with all the "emulation" ? No we haven't found anyone yet.

Do we have "proof" that "do that and it'll be REALLY worthwhile" ( i.e money ) ? .. NO because if it'll be so we'd have already someone asking us to do it.

How don't know "how you unlock this situation" maybe "easier" for AAA titles and/or "indy titles where you can do expect nothing much but you do because you CAN do it".

But if you are "in the middle" and you need some money return I see it much harder.

I am not sure where the problem is to be honest "something needs to be addressed".
Giles the billy goat
"Baa"
User avatar
Whiteball
Baaaaa!
Baaaaa!
Posts: 1810
Joined: Sat Nov 24, 2007 12:39 pm 0
Location: At the computer

Re: What's up with GPUs under Linux?

Post by Whiteball »

WiteWulf wrote:I've heard, anecdotally, of a growing number of gamers moving from Windows to Linux to run their AAA Steam games due to better performance (likely from lower OS overhead) than Windows 11. The specific case I heard was with respect to Starfield(!)
I heard that was becuase Bethesda basically programmed it really badly by mis(using) ExecuteIndirect and a multi dispatch thing (they are basically hammering away instead of batching or something like that). This can be alleviated through the abstraction layer leading to better performance apparently. Don't know the detals, I'm not that technical.
User avatar
zip accident
Sheepie Whore
Sheepie Whore
Posts: 13928
Joined: Sun Feb 20, 2005 1:58 pm 0
Location: Bristol, UK

Re: What's up with GPUs under Linux?

Post by zip accident »

"The reason no one games on Linux is because typical Linux users aren't typical gamers."

That's a self fulfilling prophecy.

From what I'm hearing, if you want to make anything like full use of a strong PCIe graphics card, you must use Windows.

I want to see that change, but it's not going to while people are saying "Wine is good enough".

Sure there are games that are fine without strong graphics cards, and that's fine for the people who want to play them. That's not the market for graphics cards (except perhaps for crypto-currency miners?).

I'm at least a couple of years away from buying my next set of kit, so I've got time ro wait if that's what it takes.
"My way is the way of not fighting":- the book of Enter the Dragon.
User avatar
Little stoned kiwi
Baaaaaa!
Baaaaaa!
Posts: 4597
Joined: Mon Oct 27, 2003 6:05 am 0
Location: Christchurch

Re: What's up with GPUs under Linux?

Post by Little stoned kiwi »

zip accident wrote:"The reason no one games on Linux is because typical Linux users aren't typical gamers."
In my personal experience, people are held back from using Linux exclusively by wanting to run Microsoft Office, Adobe something, some random application written in 1998, and games.

Hitting just one wall is enough for drive-by users to do a U-turn. I'd bet money the gamers who now use Linux for superficial reasons are really Windows and Linux users.
If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy.
Post Reply