Getting Deus Ex GOTY Edition running on Linux

Written on

I’ve been struggling with this for a few hours, so I might as well document how I did it.

I have a particular setup, which ended up causing issues. Most important are that I’m using Sway, a tiling Wayland compositor, and a flatpak install of Steam.

Mouse doesn’t move when the game is launched

It looks like there’s a problem with the game window grabbing the cursor on my setup, so moving the mouse doesn’t move the cursor in the game and if you move it too much to the side it takes you out of the game window.

The solution to this is using Gamescope, which is a nested Wayland compositor that makes the window inside it play nice with your actual compositor.

Because I’m using the flatpak install of Steam, I needed to install the flatpak version of gamescope. One catch here is that for me, this wouldn’t work if I also had the flatpak MangoHud installed. The only solution I could come up with right now was to uninstall MangoHud.

flatpak remove org.freedesktop.Platform.VulkanLayer.MangoHud # if you have it installed
flatpak install com.valvesoftware.Steam.Utility.gamescope

Then, right click on the game and select properties, then in launch options type gamescope -f -- %command%. This will launch the game inside gamescope, and the cursor should move inside the game now.

The game is too dark to see anything

It looks like the game relied on some old DirectX or OpenGL features or something, because once you do launch into the game, everything is extremely dark and hard to see. At first I was wondering how anyone could play the game like this, but it turns out that’s not how the game is supposed to look!

I finally managed to solve this by following the installer steps for the Deus Ex CD on Lutris. Yeah, roundabout way to solve it, but it worked.

First download the updated D3D9 and OpenGL renderers from the page, and extract them into the System folder inside the game.

cd "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/steamapps/common/Deus Ex/System"

Next, download and install the 1112fm patch.

cd "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/steamapps/common/Deus Ex/System"
env WINEPREFIX="$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/steamapps/compatdata/6910/pfx/" wine DeusExMPPatch1112fm.exe

Follow the steps of the installer. It should automatically find where the game is installed. Once the install is done, launch the game, then head into the settings and pick “Display Settings”, then “Rendering Device”. In the renderer selection window, pick “Show all devices”, and then select “Direct3D9 Support”.

A window with the title Deus Ex in a stylized font. Below it lists several options such as Direct3D Support, Direct3D9 Support, and OpenGL Support. Direct3D9 is selected. Below are two radio buttons, with the one titled Show all devices selected.

Launch back into the game, head into the display settings again, pick your resolution, and restart the game. Then head into the display settings yet again, this time change the color depth to 32 bit. Restart once more. Yes, you do have to do them separately or the game doesn’t save the color depth change for some reason. Finally, you can start playing!

A game screenshot displaying the Statue of Liberty in front of a cityscape. Closer to the player are wooden docks. The image is split down the middle, left side says before and is very dark, the right side says after and is much lighter.

Other small issues

Here are a few more issues you might hit during this whole process:

My cursor moves too fast!

You need to turn down the cursor speed. My mouse has buttons to adjust the speed on the fly, so I use those to turn down the speed.

After changing resolution, I can’t move my cursor!

Use the keyboard shortcuts (arrow keys and enter) to exit the game. It should work again when you restart.

The cursor doesn’t move when I open the game, even with gamescope!

I’m not fully sure why or how this happens, but a few things I found useful:

  • When the game is launching, and it’s showing the animation of the studio logo, don’t click! Press escape to bring up the menu instead.
  • Press escape to bring the menu up, then hit escape again to dismiss it. It sometimes starts working after that.
  • Use the keyboard to exit the game and restart. It always works the next time for me.