Categoriesblog-1078

Linux Gaming: Blood, sweat and the command line. Part 1

I decided to write a short article about all the hardships and hardships of Linux gaming, and at the same time describe the process of installing games with a couple of tricks to make life easier. At least that was the original intention, to say a few words about history and get straight to the point. But history said “a few words won’t do.”!", so I was surprised that the story was talking and even more surprised by 7 pages of text with a font size of 11 in Goole Docs, I cut this article into two parts. The first will be devoted to history and theory, respectively (well, and a little of my opinion and experience.), but the second one will be more practical, with various techniques and conclusion.

Perhaps someone will be able to glean useful information for themselves, but more likely you came here simply to find out how life is on the other side of the Windows 96%.

Yeah, that’s about the probability. (although these are statistics for those who have Steam installed). Globally, Linux has a large share, and on servers and mobile devices it is the leader.

Why didn’t I turn on Mac 3%? Well, firstly, because this is mainly foreign 3%, and secondly, although this article is dedicated to Linux, it is partially relevant for MacOS.

To be fair, these statistics are not completely objective, they do not take into account those who have 2 systems installed, and personally, Steam on Linux only once offered me to send statistics even if I had not started Windows for months, but as soon as I started Windows, the offer to send data immediately appeared. It seems like there was even news that this is not a feature, but a bug.

Most likely, you would most like to know what kind of difficult task could lead to such an expression as “Linux gaming”, and the difficult one is not so… not easy… ironic Whistling-HA! I like Linux in its current state. The user interface of desktop distributions today is quite user-friendly (especially take some elementaryOS, after which Windows will seem like a dense forest, especially those garbage dumps 8 and 10 (it’s worth mentioning right away that I don’t consider the top ten a bad system, but the unsuccessful combination of the old and new interfaces turns it into a dump with two video players, two browsers, two toolbars and.T.d.)).

Much more elementary?

However, in addition to a fairly simple interface, the road to customization is open for experienced users. Linux is quite flexible, and most graphical environments allow you to customize your appearance as you please. Personally, I think this is the perfect balance for the operating system. And although Windows can essentially also be customized, it does not lend itself to customization as readily as Linux.

Linux Manjaro, for example, offers to change the layout of panels and the appearance of the main menu in a couple of clicks. Very convenient.

This is why I prefer to work in Linux, I feel more comfortable in it. Well, where there is work, why not have fun, especially since Uncle Gabe in 2012, and then in 2018, gave incredible and unexpected gifts to the Linux community. Well, that is, Steam machines with Linux on board did not succeed in the end, but the legacy remains and is still alive. What kind of gifts are these?? To answer this question, you need to delve into… actually not very deep history… ironic Whistling-HA! No. 2… Sorry it won’t happen again.

From Dark Times to Steam

So, 2011. Of the options to run the game on Linux, there are only wine and its paid twin brother Crossover (True, both did not know how to use DirectX11). And from Valve there is information that in addition to selling games, the company will also sell hardware. Gabe Newell gives an interview to Penny arcade:

Well, if we need to sell equipment, we will do it. We have no reason to believe that we will succeed, rather we want to continue to introduce innovation to the world, and if the only way to implement such projects is to develop and sell equipment directly, we will do so. This, of course, is not the main idea that concerns us; we would prefer that the equipment be produced by hardware market players who already have extensive experience in the production and distribution of equipment.

Gabe Newell

Valve https://casinozodiac.uk/bonus/ CEO

By the way, the article itself from Penny arcade was deleted or moved, because.To. all links to this article lead to a 404 error. However, at least part of this interview can be found on third-party resources.

There is a rumor that at GDC2012 Valve will announce a steam machine (then known under the working name steam box), but a valve representative states that there are no such plans yet. In April, Valv begins searching for an engineer to work on the design of the hardware solution, and already in July he announces a port of his Steam client and the company’s main engine, source, to Linux. At the same time, Gabe openly criticizes Windows 8:

I think Windows 8 is kind of a disaster for everyone in the PC space. I think we’ll lose some of the top computer manufacturers. They will leave the market. I think a lot of people will lose. If my assumptions come true, it would be nice to have an alternative to isolate ourselves from this course of affairs.

Gabe Newell on Windows 8

The w8 was not a disaster in the end. It’s especially funny to read today when games from Microsoft not only come out on PCs, but also appear on Steam itself, and the Windows store itself not only did not gain the status of a monopoly (and Gabe’s fears were precisely about this, that Microsoft would make life difficult for third-party stores), but did not even gain almost any popularity.

In general, Valve had global plans. They wanted to push not only Windows, but also classic consoles, confident that in the future the PC would become the main platform for games. And although we know that these plans will not ultimately come true, there was indeed some prophetic vision in this. The PC platform is really growing today. It’s true that this didn’t save Steam machines and they faced obvious failure, because the number of ports of games on Linux was small at first, and the promised ability to run any win32 game appeared relatively recently, when steam engines no longer showed signs of life. However, we are not interested in hardware. And if yes, you can read more in detail, for example, on the Wikipedia page.

In November 2012, a closed beta test of Steam for Linux was launched, as well as one game on the Source engine. This game turned out to be Team Fortress 2, but before the test itself, news sites assumed that it would be Left 4 Dead 2. Shortly after the closed beta test, the open beta test also launched.

This is a huge milestone in the development of computer games. Steam users ask us to support games on Linux. We are excited to provide a variety of entertainment and our community of users on this open, customer-friendly platform.

Gabe Newell on Launching Steam on Linux

Perhaps worth mentioning is the distribution based on Linux Ubuntu, which was created for Steam machines, and was also made available to everyone. But to be honest, few people understand why you need to install a separate stripped-down distribution if you can install Steam without reinstalling the system. Why did he die without even having time to make a noise?.

-But doctor, SteamOS is still available for download directly from the Steam website!

-It’s sad when distributions leave us while still in beta, but this world was too cruel and unfair for him. Rest in peace SteamOS.

A distinctive feature of the distribution was the ability to abandon the desktop environment familiar to PC users in favor of the console Big Picture.

Thus, Steam appeared on Linux, and not only did it appear, Valve honestly transferred their games there, and others followed suit. True, unlike the ports from Valve, these were mostly such cheap ports that there were only enough resources to make a relay of commands from the windows version to the Linux shell. Such ports were characterized by low performance, but they worked and that was much more than nothing.

Well, that is, of course, there was Wine (Wine – wine is not an emulator (wine is not an emulator)), but the games running on it were characterized by the same low performance and often required a fair amount of dancing with a tambourine before this something was able to even launch. Of course, there were special programs to automate the process, for example Play on Linux, but with a high degree of probability, dancing with a tambourine did not go anywhere, but simply moved from the command line to the GUI (graphical interface).

And then Steam… pressed the install button then play. True, such games could be counted on one hand, no, the number quickly moved into the thousands, but you know the dark zone of Steam, it’s… not for everyone. But what’s surprising is that not only indie developers pleased the Linux community with similar ports, even some AAA titles were transferred to this platform. At the moment, for example, the entire trilogy of modern Lara Croft has been officially ported. Other studios, however, often stopped at porting one part of the franchise, for example, CD Project ported only the second Witcher, although there seemed to be promises of a third part. This was a big step for Linux, official ports to Linux, not handicrafts of students, not copies of games compiled on their own open source engines like Quake or Doom, well, not a java version of minecraft, and that’s only because Java is multiplatform in itself, but official ports of AAA games.

Thanks for them it is worth saying, including to the Feral Interactive team, thanks to their efforts, such games as Alien: Isolation, Company of Heroes, Deus Ex: Mankind Divided, DiRT Rally, DiRT 4, Empire: Total War, F1™ 2015, F1 2017, GRID Autosport, Hitman, Life is Strange, Life is Strange: Before the Storm, Life is Strange appeared on Linux 2, Mad Max, Medieval II: Total War, Middle-earth: Shadow of Mordor, Tomb Raider, Rise of the Tomb Raider, Shadow of the Tomb Raider, Total War Saga: Thrones of Britannia, Total War: SHOGUN 2, Total War: Shogun 2 – Fall of the Samurai, Total War: WARHAMMER, Total War: WARHAMMER II, Total War: THREE KINGDOMS, XCOM: Enemy Unknown, XCOM 2, Warhammer 40,000: Dawn of War II, Warhammer 40,000: Dawn of War II — Chaos Rising, Warhammer 40,000: Dawn of War II — Retribution, Warhammer 40,000: Dawn of War III.

Feral Interactive logo

But I already talked about the quality of the ports… perhaps the situation around them is not worthy of a second mention. Yes, they had low FPS compared to the wine version, but it was playable and did not require dancing with a tambourine. Moreover, some games went very well, for example Torchlight 2 or the first part of Divinity: Original Sin.

However, it cannot be said that at that time I was actively involved in gaming on Linux. Install a couple of games, test a couple more, and all this is mainly out of curiosity. But further development and the next gift from Gabe changed a lot.

DXVK: may the savior come.

In general, such a sharp transition of the article would certainly look great. But it should be noted that even though a rather large breakthrough in the context of Linux gaming will be described further, it is also worthy of mention that the work was carried out up to this point. Nvidia began to actively update and truly improve drivers on Linux, AMD eventually wrote normal drivers, although as far as I know, they did this relatively recently. Distribution developers have worked to make installing these drivers easier than ever. Today, in order to install the latest (maybe not always the latest, it very much depends on what method of testing and delivering packages to the user the distribution developer has chosen) video card drivers do not require a command line or even the need to go to the official website and download the installer. In Linux this can be done through the interface.

In general, it’s funny, despite the stereotypes about the command line in Linux as the only way to manage the system, in most modern distributions a lot of things are implemented through a graphical interface, and there is also a good application store that has, if not all, then most of the necessary programs, and the command line simply helps speed up some processes, well, it gives those opportunities that have nothing to do in the GUI. T.e. performs the same role as cmd (and its more advanced version of PowerShell) in Windows.

Just clicked install, and then rebooted the system and you were done. You don’t even need to go to the Nvidia website.

And more importantly, Nvidia will not pester you with questions about downloading driver updates or their lengthy installation. In Linux, driver packages will be updated along with the system. At the same time, installing a new driver will not interfere with the operation of the system in any way, because it will begin to be used only after a reboot. This is one of the main advantages of Linux for me, it does not need tons of googleupdater, mailupdater yandexupdater, vasyansoftupdater, system updates also download new software packages and drivers from various sources, including those connected by the user. But I got distracted.

In 2015-2016, two important events occurred, which became the culprits of what will be written about below.

DirectX 12 was released on July 29, 2015, and Vulkan was born on February 16, 2016. These are new graphics APIs designed to improve performance with hardware, reduce CPU load and improve multithreading, which in turn should lead to higher performance, as well as add new features such as ray tracing. However, if Dx12 only supports Windows 10 (at least that’s how it was originally intended, it seems like they eventually implemented some compatibility with older systems), then Vulkan works on w7, w8, w10, Linux, and Android and, in principle, does not have any exclusive restrictions. Actually, Vulcan’s support for Linux, as well as its cross-platform nature, are the culprits of today’s situation.

So, the vkd3d project comes onto the scene, as well as DXVK and D9VK (the last two merged into one project at the end of 2019). All of them are aimed at implementing translations of DirectX calls to the Vulkan API. Without lengthy and complex explanations, these projects improve the compatibility and performance of games running under Wine. And when I say they improve compatibility and performance, I mean significantly. Launching a significant number of games has become possible in principle, and even without crutches, and even with normal FPS and without artifacts. In the case of vkd3d, which is aimed at broadcasting requests from DirectX 12, FPS losses may be completely insignificant. However, DXVK (DirectX 9-11) is not so smooth, the loss can be 10-15 fps, but even this is an excellent result.