this post was submitted on 18 Dec 2024
98 points (93.8% liked)

Linux

48663 readers
514 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I primarily use my pc for gaming, and want to avoid upgrading to Windows 11. Beginning the journey of looking into alternatives.

I am ignorant, trying to be less so. I have a hard time understanding what exactly makes a game not work just because of OS.

top 50 comments
sorted by: hot top controversial new old
[–] prole@lemmy.blahaj.zone 2 points 1 day ago

At this point, it's almost entirely kernel-level anticheat

[–] Nibodhika@lemmy.world 13 points 2 days ago

There are a lot of moving parts, so let's start from the ground up. Processors are glorified input-output machines, you put electricity in some pins, and it gives you back electricity in other pins. Some of those pins define which operation you want and others give the input, so for example sending 00000010 to the operation could mean addition, so the output pins will show the result of the addition of your inputs. Each binary number can be interpreted as a decimal or hexadecimal number, but people are bad at remembering numbers, so instead we can have a table of conversion that says for example that ADD means 00000010, so you write a program saying ADD 2 3 and that's called assembly language.

Each processor has their own table of which operations it can do, so writing assembly is tedious since you need to know and account for all of that. Instead you can write in a higher level language where a program called a compiler will translate your code into assembly taking all of the considerations for different processors.

So far, so good, but there is some stuff which is recurrent and requires special care. For example a processor knows nothing of the disks or memory in the system, so you need a program to be running there to manage stuff. We call that program an Operating system.

Different operating systems do things differently, one might store things in any order on the disk to save on write speed while others might choose to align data where suitable to save on read speed. And they provide different high level APIs for it, e.g. one OS might have the open_file(char* full_path) while other could have open(char* folder, char* file). So if a program tries to call open in an OS that uses open_file the program won't know what to do.

Then just like OS sometimes programs try to use libraries that they expect to be installed in your system, such as DirectX on Windows. These libraries also have their own functions that the program tries to call.

So now we get to a game which is trying to call a function from DirectX which is trying to call something native to Windows. There's no way Linux knows what to do with that.

So a few people realized that if they reimplemented the functions from windows but calling the equivalent functions on Linux you could get the programs to run. They also realized that you can reimplement DirectX using OpenGL calls, or more recently Vulkan. Putting those stuff together almost every call a game is likely to make calls one of these reimplementation which in turn calls the Linux kernel, which in turn calls the corresponding set of instructions on the CPU to do stuff the Linux way. The end result is that most things work, however sometimes the game developer tries to be smart and makes assumptions about how the OS will do something, and then face some errors because Linux did something slightly different.

But the VAST majority of times when a game doesn't work is because the game developer is actively trying to ensure you're not doing anything weird, such as running the game on a different OS.

[–] john89@lemmy.ca 11 points 2 days ago

Poorly-developed anticheat software.

[–] verdigris@lemmy.ml 13 points 2 days ago

First of all, many games can very easily be built and packaged for Linux, devs just don't target it as often because it's a fraction of the market share.

But as for Windows-only games... It used to be because functions games were trying to access simply didn't exist in Linux. Wine is a translation layer that could help with that, but it was both underfunded and had a general focus on all windows apps, not just games.

However these days, thanks in no small part to Valve bankrolling the Proton project -- a gaming-specific branch of Wine that has also contributed plenty of improvements back to Wine itself -- virtually any game you care to play will run on Linux. At this point, if a game doesn't run, it's because the publisher or developer is choosing to not let it run -- likely because of specific anti-cheat software. In the case of Easy Anti-Cheat games like Fortnite and Apex Legends, EAC runs fine on Linux, but the devs chose explicitly to turn off Linux support.

[–] utopiah@lemmy.ml 3 points 2 days ago

Interesting question which to be honest I can't really answer myself... but I'd basically inquire by taking the flip-side of https://www.protondb.com/

Namely gamers like me usually check ProtonDB to see what they can play. Here it would be interesting, and I'm 99.99% sure Valve does that already, to check which games do not work and what's the commonality behind them. It means one can then identify the gaps and try to address them.

Still, to venture an ELI5 answer : games are usually build for Windows. Games are using "bricks" like Lego to avoid re-inventing the wheel. Instead of having a health bar, a game developer might use a "health bar" brick. When you have a collection of such useful bricks, you typically call that a library. That library then makes the work of a game developer much easier but not all libraries are made equal. Some popular libraries target only Windows and thus the bricks make assumptions on how the software running the computer, the operating system, works. So... what Valve does is trying to make new bricks to stack on so that game developers don't even have to use libraries they are not familiar with. They "just" use their typical bricks, Valve "injects" in between their new compatibility bricks and voila, unbeknown to the game developer, their Windows game works on Linux!

[–] circuitfarmer@lemmy.sdf.org 10 points 2 days ago* (last edited 2 days ago)

By and large, unless you are playing one of a few multiplayer games which require kernel-level anti-cheat schemes, you won't have issues running Windows games on Linux. Note that kernel-level anti-cheat is also a huge issue in general, for privacy and other reasons, so it's not really something that should or will be fixed in Linux -- it's up to developers to stop requiring such schemes.

I've been a Linux gamer for about 3 years. 3 years ago, I had occasional issues. Now not for a long time. But I play almost entirely single player titles.

Hardware does matter a bit. AMD is extremely Linux friendly and drivers for AMD hardware tends to be in the Linux kernel, so there's nothing else to load. Nvidia makes things more difficult.

[–] bastionntb@lemmy.ml 80 points 3 days ago (3 children)

Put simply, it's like a translator that knows many of the languages Windows will speak. However, it's not always fluent in every language it might speak. This is what proton does, it translates system calls into Linux, essentially. It almost always will work, specially with Steam games.

In other cases, it's game devs making desicisons to disallow use of Linux. Specifically anti cheat. Not all anticheat is disallowed, but game devs could allow it. They just choose not too.

Most games will run just fine on Linux. I've switched entirely to Linux and said goodbye to those few online anitcheat games that disallow. Most everything works.

[–] lordnikon@lemmy.world 34 points 3 days ago (1 children)

Also to add to this is if windows users understood what kernel level anti-cheat does most people wouldn't want it on windows ether.

[–] Landslide7648@discuss.tchncs.de 4 points 3 days ago (1 children)

What does it do? Could you explain?

[–] Spore@lemmy.ml 24 points 3 days ago (1 children)

It runs in the kernel of the OS as a driver, which means that it's basically a trusted malware that has even higher permission than the admin of the computer, and have access to more things than yourself, to closely monitor the whole system in order to find signs of cheating.

[–] eyeon@lemmy.world 6 points 2 days ago

And for context, it does this because cheaters are willing to run cheats that run at that kernel level, and the only way to detect and prevent them is if the anticheat is in your kernel first.

[–] ElectricAirship@lemmy.dbzer0.com 18 points 3 days ago (1 children)

Very accurate comment, and to expand on this, things like media codecs, windows dependencies, etc also cause problems. Luckily Proton can play just about any game on Steam.

For example, Marvel Rivals is a new game that just came out and its anti-cheat works with Linux. I play it with ProtonGE, which installs extra codecs that regular proton versions don't include and it works awesome.

Check out protondb.com to search what specific games work for others on linux.

[–] floofloof@lemmy.ca 6 points 3 days ago (4 children)

Does Steam ever deliver Linux-native builds instead of running games through Proton?

[–] entropicdrift@lemmy.sdf.org 13 points 3 days ago (1 children)

Yes. There are some games where the Linux-specific bugs don't get fixed and it's better to just run the Windows version thru Proton and take like a 10-20% performance hit so it runs with more stability.

Sometimes the Windows versions just run better than the Linux build because of bad optimization on the Linux build of a given game, as well (OpenGL vs Vulkan drivers, etc etc)

[–] communist@lemmy.frozeninferno.xyz 4 points 3 days ago (1 children)

there's no way it's a 10-20% performance hit

[–] Buildout@lemmy.world 1 points 3 days ago (1 children)

Is it usually more or less than this?

[–] communist@lemmy.frozeninferno.xyz 6 points 3 days ago* (last edited 3 days ago) (2 children)

Way less, even better performance than native in some cases

[–] addie@feddit.uk 5 points 3 days ago (1 children)

Flightless Mango used to have some good comparisons, but they're about four years out-of-date, now. Even then, you'd expect between 10% worse and 5% better on Linux. https://flightlessmango.com/benchmarks/

Forbes article here is from this year; expect between 5% worse and 25% better when running on Linux. https://www.forbes.com/sites/jasonevangelho/2024/08/21/linux-scores-a-surprising-gaming-victory-against-windows-11/

General experience is that generally there's no noticeable difference at all; some games that use new features might have bad performance until the new features are implemented. Last game I really had a problem with was Horizon Zero Dawn. Elden Ring had bad performance on launch day, but was fixed the next day I think.

[–] entropicdrift@lemmy.sdf.org 2 points 2 days ago* (last edited 2 days ago)

These are solid sources to cite, but for the record I was talking about a Linux native build vs a Windows build running under Proton, not a Windows build running in Windows vs running in Proton. Linux is a more efficient OS and well-optimized builds made for it can really fly.

[–] entropicdrift@lemmy.sdf.org 1 points 2 days ago* (last edited 2 days ago) (1 children)

Linux Native builds generally have better performance than Windows builds running on Windows. That's what I was comparing between

[–] communist@lemmy.frozeninferno.xyz 2 points 2 days ago (1 children)

i don't think that's 10-20% either

[–] entropicdrift@lemmy.sdf.org 1 points 2 days ago (1 children)

I did say it varies and sometimes the Windows build runs better than the Linux build depending on optimization

I agree it varies, but even a 10% difference is a lot

[–] bingrazer@lemmy.world 8 points 3 days ago* (last edited 3 days ago)

Yes, I’ve run several games native. ProtonDB will indicate if it runs natively (though some people will report using proton on natively supported games out of habit)

EDIT: some games are supported natively, but should use proton for mods. For example, Mount and Blade Warband runs just fine without proton, but if using mods it should be run with proton. This will also be indicated on ProtonDB in my experience

[–] MorphiusFaydal@lemmy.world 4 points 3 days ago

When you see the Windows and Apple icons on a game, that indicates native Windows and MacOS support. The Steam logo is native SteamOS/Linux. You'll also see a "SteamOS/Linux" section on the system requirements.

[–] SkaveRat@discuss.tchncs.de 6 points 3 days ago

To expand on the translation metaphor:

Trying to run a window program on Linux (without proton) is like trying to read a completely alien text. Your have basically 0 in common and no way to understand it

Proton is doing the translator job of helping. And it's doing a great job for a lot of the alien language. Which is why so many programs and games work on Linux with proton

But even it can't always be perfect, and if the language is using some weird dialect, it might not understand or misinterpret things, which causes games to be buggy or unplayable on Linux

[–] addie@feddit.uk 11 points 2 days ago

I'd probably go with a "kitchen" metaphor here.

The executable for a program is a list of instructions for the CPU to execute. Windows and Linux gaming machines will usually use x64. Most of the instructions are logic eg. how to add numbers together, what comparisons to make, what to copy from one place to another; and they're exactly the same on both Windows and Linux, you can run them as-is.

Some instructions ask the operating system to do things, like open a file to read. Windows and Linux do these quite differently, but you know how one works then you can change it to the equivalent ask for the other machine. Making the translation takes a moment, but some things are faster on Linux than Windows, so it's not very easy to generalise as to whether it'll be faster overall to do certain things. The really important operating system calls for games tend to be messages to pass to the GPU, and the Proton team have put a lot of work into making these as fast as possible.

If you think of it like following a food recipe, then given the ingredients you'd expect that most people would produce exactly the same meal by following it. Most of the steps will be exactly the same for everyone. However, if a step requires a piece of equipment that you don't have, then it might take longer to follow the recipe if you've got to make do with different stuff. Similarly, you might be able to prepare things quicker if you've got a whole pile of restaurant-level gear and can do some of the steps differently.

[–] Guenther_Amanita@slrpnk.net 37 points 3 days ago (5 children)

Ususally, like 99% of the time, it's absolutely the fault of the game developers and by choice.

Pretty much any game can run on Linux nowadays. Some do even run better than on Windows, but most equally good or a tiny bit worse.

The main problem is (very invasive kernel level) anti cheat.

And sometimes, games work fine on Linux, and then the devs actively lock out Linux users for some ludicrous reasons.

You can visit protondb.com for a very nice overview of which games work and how well they do.

load more comments (5 replies)
[–] DieserTypMatthias@lemmy.ml 14 points 3 days ago (2 children)

Anticheats - an inferior piece of software that no one likes.

[–] kuberoot@discuss.tchncs.de 9 points 3 days ago

Anticheat is good. Intrusive anticheat, in this case kernel-level anticheat, is something that's being made only for windows that will stop you from playing a game on Linux and increase attack surface for your Windows.

https://areweanticheatyet.com/ < the greatest source for info on this.

[–] unmagical@lemmy.ml 21 points 3 days ago (1 children)

Different operating systems have their own interfaces to allow user level programs (like games) to communicate with hardware. This is a great-over-simplification, but one OS may understand something like "drawTriangle(x, y, z)" while another may expect "drawPolygon([x, y, z])".

There are software projects to attempt to translate commands meant for one OS for a different OS (such as "Wine" or Valve's "Proton") and those work fairly well in cases that: 1) there's an analogous command, 2) the analogous commands have been accurately mapped, and 3) the analogous commands operate in user space.

That last point is the primary reason why, despite the best efforts of developers, some games still cannot work across OSs. Operating systems are built on top of different levels with the lowest being the "kernel" (of "kernel level anti-cheat" notoriety) and the highest being the user space (where you interact). Both Windows and Linux have these, but the boundaries around them, what they can and cannot do, and how to interact across those boundaries differs between each system.

So when a Windows game installs a driver to monitor everything that your computer does that driver (kernel level anti-cheat) is tailored very specifically to the extremely powerful, low level, and unique Windows kernel. Linux cannot run that natively. If the game pretends that spying on you is an essential component to launch then the game will not launch. If, however, a game is perfectly happy to just stay in user space where it belongs then it will probably work fine with the available translation layers.

[–] Kayday@lemmy.world 2 points 3 days ago

That makes sense, thanks!

[–] Teppichbrand 6 points 3 days ago* (last edited 3 days ago) (1 children)

This is a little offtopic and a Lemmy cliché, but:
Go and try Linux Mint! I was a Windows fanboy for more than a decade, now I'm all team Linux. It doesn't run all games (I'm not a huge gamer, so no expert) but most stuff i want to play is no problem at all. I edit videos with Davinci, produce music with Bitwig plus there so much great free open source software. Working in Windows nowadays makes me nervous. It's so predatory and dishonest. Try to get off while you can, it won't get any better. And it's so much fun to explore a new OS with an opened mind and some curiosity.

[–] Sturgist@lemmy.ca 2 points 2 days ago* (last edited 2 days ago)

Mint is a great general entry point to Linux.
I'd say Pop!OS or Garuda Gaming edition for traditional style, and Bazzite for "Atomic"(harder to accidentally Bork), are better ootb(out of the box) gaming distros. I.e. less downloading and tweaking to get games running, more things installed from first boot.

[–] Montagge@lemmy.zip 9 points 3 days ago (2 children)

So far the only thing that has been an issue has been anticheat

[–] herrvogel@lemmy.world 4 points 3 days ago (1 children)

I'd say the anti-cheat has only recently become the "only issue". It's not like wine and proton could run everything flawlessly before kernel level stuff came along. The translation was imperfect and incomplete, so shit simply did not work. Lots of hard work on those projects slowly but surely filled in the gaps, and now we are finally at a stage where we can say that if a game doesn't work it's by design.

[–] xavier666@lemm.ee 1 points 3 days ago

There are certain instances where certain games on Windows run slightly better because the Windows function implementation was possibly written slightly better. However, this is becoming rarer and rarer. I've faced it only when playing random 3d indie games.

[–] bingrazer@lemmy.world 2 points 3 days ago

Same here. Newer versions of Easy Anti-Cheat work fine, but pretty much anything else breaks. Rising Storm 2: Vietnam is an example of a game that uses EAC, but with a version too old to work with Linux

[–] muhyb@programming.dev 8 points 3 days ago

Since it's ELI5, I'll try to be as clear as possible. Windows and Linux distros are different operating systems, so their programs are their own. If there isn't a compatibility layer present (or an emulator) you won't be able run a program written for the other system. What Steam does on Linux is, it uses a compatibility layer (Proton) to run Windows games. Proton is Valve's version of WINE with some specific improvements, mostly targeting Steam games. That's how Steam Deck works. You can think the other way around of this is Microsoft's WSL (not exactly).

So, because of there needs to be a compatibility layer, it might not always work as intended for some games (though numbers are decreasing with every update). Most of these games are games that use an anti-cheat, though Valve included Linux versions of BattlEye and EasyAntiCheat in Proton, and if a developer uses it, there is no problem for that game. For example, Hell Let Loose works fine because of this. Note that, some games will use kernel level anti-cheat (or currently using), those games won't run at all.

From what I found, there is also a possibility that you might have a hard time with some older games that use a custom-built engine. I mostly encountered this with some Japanese games. Though, those games usually don't work on something over Windows 7 too.

[–] unknowing8343@discuss.tchncs.de 5 points 3 days ago* (last edited 3 days ago)

Most "normal" programs use some "abstraction" libraries, so the programmer doesn't need to know which platform it is running on. This "platform" is important because it is the layer that actually talks to things like your SSD, RAM, GPU, etc.

Videogames, tho, are very very specific programs that really benefit from very optimized code, so some of these "abstraction" libraries simply will be worked on for a specific operative system.

Thankfully, the people from the WINE project and lots of work from Valve themselves have made it possible to "trick" these libraries into thinking they are talking to Windows. It's not perfect, tho, so some stuff is still not working, but you'd be surprised how much we've got already. Check out the ProtonDB project.

[–] catloaf@lemm.ee 5 points 3 days ago

A Windows binary is just plain not compatible with Linux. Everything in the operating system is different.

Compatibility layers like Wine are pretty good, but not perfect.

[–] CaptainBasculin@lemmy.ml 4 points 3 days ago

Steam pretty much has a translation layer that turns Windows programs run on Linux. Both operating systems execute code in a different manner, so it's up to the translation layer to turn one into another. Sometimes, a game can call code that the translation layer cannot translate. A well known one of those is kernel-level calls made by some anticheat software.

[–] ada@lemmy.blahaj.zone 3 points 3 days ago

An analogy is that operating languages speak different languages. And an app built for one operating system doesn't speak the language of others.

But in the case of Linux, there are lots of really good tools that let Linux understand Windows apps. Steam has those tools built right in.

Where it falls down is that the tools that let Linux understand and run Windows apps aren't perfect. So things like DRM, anti cheat, propriety drivers etc, can be a challenge.

But currently, if you're not running games that use kernel level anti cheat, the vast majority of games will work on Linux. The steamdeck uses Linux itself, so it's a high priority for valve to get as much working as possible.

[–] Piatro@programming.dev 2 points 3 days ago

The ELI5 version is that developers can make a lot of assumptions about what a Windows pc means and what features are available. A while ago if you had videos as part of a game (for example a cutscene) it was actually played through Windows Media Player, which was virtually guaranteed to be present on the user's computer. Sure you can play that video with other tools like VLC or Quicktime, but you couldn't guarantee they were installed, so Windows Media Player was a safe bet. Nowadays that's not how video is handled but the point remains for a few other things. For example if I need to load an image, maybe a background, I would look it up using the windows filesystem, so probably something like C:\Program Files\Steam\common\mygame\images\background.png. That's not the same in the Linux or another os. Also the piece of software that handles loading images might be different, which means how we execute that load operation is probably different, and so our Windows-focused version of our game just doesn't work.

Fortunately nowadays that's a mostly solved problem with Steam investing a lot of time into Proton, what they call a "compatibility layer" that basically translates all of the windows-specific stuff to work in Linux. That's a very simplified explanation but you get the idea. The games that still won't run have kernel-level anticheat (Valorant, Helldivers 2) or are so dependent on things only available on Windows that even Proton can't fix it. Some anti-cheat software doesn't run properly so then you can't go online, like Warhammer: Vermintide 2. That's mostly a commercial decision rather than technical, they could make it work they just choose not to.

load more comments
view more: next ›