keskiviikko 26. kesäkuuta 2019

How I got DOOM (2016) to run on Devuan Linux

Introduction

I bough the "new" (2016 version) DOOM some years ago on Steam, but back then my computer was not powerful enough to run it, and it wasn't even 64 bit. So I never got around to play the game. Now I finally decided to update my computer to a basic gaming machine which should be good enough to run these few years old games (DOOM, Watch_dogs 2, Deus Ex: Mankind Divided etc).

With my old computer I had some version of Windows 7. Now I did not have the license anymore, nor did I want to spend over hundred euros for a new one. So I decided to first start with Linux and try to get my games to run on that. And Steam promises that DOOM would run with their Proton compatibility layer.

I decided to install Devuan Linux, since I wanted a distribution without SystemD. I wont go into details why, and in the end it should not make much difference anyways. The current stable version of Devuan is Ascii, so I installed that one. It worked very well out of the box, and I installed the Linux Steam client and DOOM without issues.

First issue: nothing happens

After installing DOOM I wanted to test it. I pressed the play button on Steam and... nothing happens. No splash screen, no errors, nothing... I also tried Deus Ex: Manking Divided (which has native Linux version) and it worked fine (though giving a warning about nonsupported distribution), so graphics etc. seemed to work just fine. Something else was going on.

I started searching the internet about similar issues and didn't seem to find anything relevant. Finally, after a long search I came across this thread. It caught my attention because I was using my old storage disc which was used with Windows before, which I checked to be formatted as NTFS. Even though I had read/write/execute permissions on the disc, it was owned by root.

I checked my user id and group id with id -u [username] and id -g [username]. I added those ids (1000 and 1000) to my /etc/fstab parameters for the partition with uid=1000,gid=1000 like was instructed in a post in the thread linked above. Then I remounted the drive and tried again. Now the game seemed to launch.

I did not know about Steam logs which could have revealed the issue right away... Oh well...

Second issue: fatal error on startup

Now the game seemed to be starting, but quite quickly died to a fatal error:

FATAL ERROR: wglCreateContextAttribsARB failed
 Again, furious searching lead me to this bug report. I tried to enter the +r_renderapi 1 to the game's launch options but it didn't really make a difference.

In the bug report there is a mention that mesa needs to be a recent version. The versions listed in the post are:
  • client glx vendor string: Mesa Project and SGI
  • OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.5
  • OpenGL version string: 3.1 Mesa 18.1.5
  • OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.1.5
In Devuan Ascii, the mesa-glx package is 13.0.6 so it was too old. However, it seemed that ascii-backports repository had 18.2.8, so I decided to try that.

Updating mesa

So I added the ascii-backports repository (with main, contrib and non-free portions) to /etc/apt/sources.list and did the normal apt-get update. Then I manually installed what I thought I needed: mesa-vulkan-drivers, libgl1-mesa-glx, libglx-mesa-0, libdrm-amdgpu and maybe some other. Then I rebooted to be sure the new drivers are loaded.

Boot texts rolling and... blank screen. Keyboard not working, cannot change to text-only terminal, cannot reboot with keyboard.... Luckily power button did trigger a shutdown. So, I clearly forgot some packages and broke the Xorg.

From GRUB I booted to single user mode and wondered how I would go about fixing this. I tried installing some more packages from the ascii-backports, like xserver-xorg-???, but I could not get X to start. I decided to switch to Devuan Beowulf (testing) version, since it had the mesa-vulkan drivers version 18.3.6.

So change ascii to beowulf in sources.list, and apt-get update && apt-get dist-upgrade. After a while it was done and I rebooted. Fingers crossed... and it works. Perfect.

Now it was time to test DOOM again with newer drivers. Launching steam and pressing play on DOOM, and now it works flawlessy! Perfect.

So in the end I got DOOM to work, but seems like the Devuan Ascii is a bit outdated, and it is necessary to have more recent drivers. I stick with Devuan Beowulf now because with the new drivers most games seem to work fine.

Ei kommentteja:

Lähetä kommentti