Gaming on Ubuntu Desktop

Hi folks,

As we come up to the holidays and everyone is looking forward to some time off, I thought it would be a good moment to start a short mini-series of blogs around gaming on Ubuntu desktop and some tips and tricks on getting started.

I’m intending to collect them all here as they go live:

The gaming experience has been a common theme among users as an area for us to focus on improving. And we’ve already received a number of gaming related requests in recent discussion threads that we’re taking on board. Because of that I’m excited about building some of the topics discussed here into our 2022 roadmap (although I would say more 22.10 than 22.04 :wink:).

Feel free to use this thread to share the good, bad and the ugly of gaming on Ubuntu. Not just bugs and issues but what works well and what information we should highlight to new users. I’d also love to see helpful articles you’ve found elsewhere or suggestions for tutorials or guides related to gaming.

I’m also interested in hearing from developers about their experience making games on Linux, as well as content creators or streamers who use Ubuntu.

GL;HF

:video_game:

12 Likes

First of all, I would like to say that this is a great introduction to getting started with the gaming experience on Linux and informing users on what to expect, and that the status quo is actually relatively good, depending on what you are looking for, of course. This is actually coming from someone who is a developer and uses Gentoo, but had to help out people who were willing to give Linux a try and started using Ubuntu or other similar distributions that are more suitable for people for who this is their first Linux experience. Also note that for my work, while we do use Ubuntu, we do not use it for gaming, so I cannot comment too much about that exact experience, other than what I have noticed by troubleshooting other people’s experiences in the past.

One of the pain points I have noticed with Ubuntu, or Debian-based distributions in general, is that the offered packages are often behind, which can be rather problematic in providing that good gaming experience depending on the hardware that is being used, as the software to provide that gaming experience (e.g. LLVM, Mesa, WINE, etc.) progresses at a much faster pace than the (LTS) release cycle of Ubuntu, which is why people sometimes recommend using distributions that offer access to bleeding-edge versions of software instead. To give an example, I remember Halo, the Masterchief Collection being pretty much unplayable on AMD GPUs as the offered version of Mesa still relies on the old LLVM shader compiler instead of ACO. Anno 1800 also suffers from this, and probably a lot more games that are heavy on the CPU side and/or do frequent shader compilation.

Of course, there are PPAs available like kisak’s PPA to get a more recent version of Mesa installed, but I feel that this has the problem that newcomers now get the idea that the gaming experience might be much worse than it actually is, that you now have to explain that certain software components they never heard of before is outdated out of the box, and that to fix this they have to go through the process of enabling a number of PPAs and install more recent versions of those software components. For newcomers there should be one-click experience to have the option to get the bleeding edge software required for a good almost out-of-the-box gaming experience that is the status quo, instead of what it was like n months/years ago (when comparing against a bleeding edge distribution), similar to how you can install Nvidia’s proprietary drivers to get a better experience with Nvidia GPUs on Linux (as the Nouveau experience does not reflect the best experience that one could have in terms of gaming). Similarly, this should be true for getting a more recent Linux kernel as well, so they have a better shot at driver support, in the event they have bleeding edge hardware that is currently not supported by Ubuntu (e.g. every time Intel and AMD release a new CPU/GPU).

In general, for newcomers we should look at what the current experience is, what the current experience could be and how to best offer that with a minimal number of steps and without having to explain the entire ecosystem.

12 Likes

Thanks for the clear and thoughtful feedback Stephan! Definitely something we need to discuss more. Totally agree that it’s about looking at the steps needed to get set up for gaming and identifying how we can remove as many as possible.

3 Likes

Look at this bug report: https://bugs.launchpad.net/bugs/1890815
vainfo is an utility that’s VERY important for games. The handling of this bug was terrible. It took months to even become assigned to someone. It was closed and the reopened a couple times in different released of Ubuntu, and there was no reason for that – it should be a simple packaging issue that should stay closed and not kick back.

This bug report reflects my history with Ubuntu in the latest years. Every bug report takes a long time to even be recognized and sometimes lingers forever in the bugtracker. I’ve noticed that the worst victims are desktop-related bug reports, which reflects the lower attention Canonical has been paying to these with their focus on IoT and servers. The problem is that gaming cannot work properly without a fine-tuned desktop.

I am absolutely onboard with this, but I feel like there might be a “correct” way to achieve it. Could Canonical offer a repo, disabled by default, which contains the updated kernel and mesa drivers? That way people who want a stable desktop can have what they want, but those that want up to date gaming performance can be accommodated? Maybe this repo can also be toggled during install too.

Further, I like the progress toward immutable filesystems in Silverblue, Tumbleweed and SteamOS 3. While this is likely not a priority for Ubuntu, I feel like the store should push flatpaks and snaps more than apt as a means for installing user applications. Apt should be for system controlled packages, flatpak and snap for user owned. As a result, apt packages should be a much lower priority in the store than flatpak and snap.

5 Likes

As an average PC user that focus mainly on games I have some topics to point that still makes windows better to play games than linux and I’m not talking about frame rates. I’ll make topics:

  • Latency is the main problem

The majority os linux distribution use a version of kernel that leaves latency behind. A friend that uses gentoo said to me some time ago that for some reason the default compiled kernel of gentoo had a significant advantage to ubuntu or manjaro in latency. This will impact directly on inputlag and can be what will make a game unplayable because you’ll never be fast enough to respond to the game. Other latency related problems are related on how fast the game will be sent to screen. I remember reading that gnome is behind even to kde in this regard. Gnome response is slow.

Other considerations to this is that the default generic kernel may not be the best option to run games as it generaly is compiled to be reliable to servers tasks. Speed is king in games.

  • Bluetooth stack is the top 1 annoying problem (still a latency issue)

I really can’t believe how slow bluez is. In some games it adds 2 seconds of inputlag (not kiding. It really is 2 seconds!) just because de gamepad is connected over bt. Today’s bluetooth stack isn’t reliable for games.

  • Performance related gamepad drivers isn’t even with windows

I don’t understand why it is this way but some popular controllers like Sony’s DS4 provides worser experiencie on Linux when compared to Windows. DS4 on windows offers the best latency and inputlag on the market even over bt. On Linux this controller is included on the list of worst controllers to use because it offers a terrible latency and inputlag.

  • Lack of software to control your gamepad

I’ll use the DS4 example as it is very common and the most notable on windows at least. On windows we do have 3rd party software to make it good, remap it and turn that led off to save batery. We don’t have anything similar to this on Linux that will work with any game available.

  • GPU drivers is not cutting edge

This is a compatibility problem. Drivers must be cutting edge.

  • Lack of HDR and above 8 bit collor for wide collor gamut support.

This is also a compatibility problem as we do have too many games supporting it by now.

  • The final problem: Ubuntu (and Linux in general) is not dumb proof

Really, there is no need to copy windows here but at least it must be Linus proof (from LTT). My main problem here is that Linux will works great for what it works but as soon you step on something wrong, the majority of people will break the system before a fix is found. The experience should be at least on windows level here: you start the game and it works. No latency issues or inputlag issues. This experience must be at least on windows level.

As an average user, these are the problems I found over the years that keep me away from Linux for games. I test it from time to time just to find that none in this list was improved at all and then I fallback to windows again. I hope this gives enlightment to devs on what a common user seeks when it comes to run games on a PC.

I know that will have people questioning me and ask prove to it but I don’t have the hardware necessary to make a study to prove the latency problem but it is there. Even my gentoo friend did recognised it after seeyng it with he’s own eyes just switching distributions after some time denying it. The latency problem is there and must be at least on windows level to be good enough.

Thank you!

I would like to see support for Gamerzilla, an open source game achievement system, added. It is still not widely supported but there are over a dozen games that support it or have forks which do. In fact if ubuntu really wanted to push the game achievement system, they could setup a server for their users.

Linux gaming is on the rise, I use Ubuntu for this, it is very stable, the systems to run games, I think what we need are more tools that can help us, for example create a gamebar as it exists in bugwindows, rather than all to be able to easily manage resources such as sound, see the resources that come our pc, be able to take screenshots, since to do all that we would have to make tabs to go to settings to lower the volume of the audio or see what So is the pc while we are playing, and also that being in a full screen game when changing the application in the “alt + tab” is also the desktop since we have to change to another app and it is very uncomfortable

Hi Patola, thanks for taking the time to post and for submitting the issue in the first place. I’ve made a note of this particular bug and will escalate it with the team. Desktop has a wide range of users and use cases so it does mean we have to sometimes make careful prioritisation calls within our available bandwidth, that can mean the pace of progress in certain areas is slower but I wouldn’t say that is a signifier of lower attention. We’re continuing to invest in desktop and, with threads like this, making sure we’re looking at how to deliver a great experience to a wide range of users.

1 Like

Great callout on the room for improvement with gamepad support @tamodolo noted!

@dulsi I’ve not seen Gamerzilla before, will check it out!

@tridoxx are you thinking of something like Geforce Experience?

1 Like

It can be similar to the geforce experience, an overlay where we can quickly access options such as volume of apps, brightness, and the resources that the equipment is using while we are playing with keys like ctrl + go using a control for example of xbox when pressing the button with the logo on the control

like this image

3 Likes

If you’re playing Steam games, just use Steam to modify your buttons.
If you’re not playing Steam games, use AntiMicro. I’ve used that for playing k&m-only MMOs with my Xbox controller.

1 Like

And there is the next one (more about expected user experience): https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1767431

Well making ubuntu or a version of ubuntu have immutable root filesystem or at least give concrete desktop support for immutable filesystems(so it can be implemented by flavours) the best example of that for desktop gotta be fedora silverblue. This will help in making OS dumbproof and secure. Plus would make a easier story to fastwr upgrading of kernels drivers and mesa

Thank you very much!

Please don’t forget the gamepad problem is latency and inputlag related!

Please also consider offering alternative kernels that focus on speed (low latency and with high responsiveness) that will favor game’s inputlag.

Thank you!

Hi, as i recently started to using Arch base after five or six years of Ubuntu base usage; i will just be listing what Ubuntu base suffers that usually makes gaming somewhat harder ( in a way that needs tinkering ) which some of the listed issues are also valid for Arch base too but most of them are Ubuntu specific:

  • Multilib is a nightmare on Ubuntu. Sometimes there is a need arises that tempts user to try a patch for Wine that is not upstream but needs feedback etc. On Arch there is no problem with multilib, on Ubuntu building Wine is a painful effort and for some users basically impossible.

  • Ubuntu base has outdated drivers. I appreciate the idea behind it but most of the times having outdated drivers doesn’t mean they have less bugs. Instead of less bugs, you only have old and known bugs which are fixed in upstream. I didn’t see in any circumtances Ubuntu/Debian maintainers fixing an issue with Mesa version they shipped either so that concept is just faulty.

PS: Maybe it is necessary for Nvidia prop driver to be slow on updates ( 495 driver is a mess as of right now) but most certainly not needed for Mesa.

  • Old kernels. If you have a relatively new hardware starting with Ubuntu base is just pain for newcomers. They need to obtain newer kernels via various methods and linux-firmware too.

  • VLK libs are not included by default. For both NV and Mesa. A huge chunk of Linux gaming relies to Proton/Wine these days. Which plausible experience with them is granted with usage of DXVK/vkd3d-proton, Vulkan based translation layers that are responsible for D3D 9,10,11 and 12.

  • Keeping third party/community based gaming sources up to date by default. For example, Lutris. That is usually a great source for people who doesn’t want to touch Wine manually but rather prefers scripts in there to do the job for them, override necessary components , which that they have very little chance to observe what that specific app needs; because it needs a somewhat constant following of Wine issues and needs an understanding of what are the downfalls in general.

Just provide Lutris stable releases in time, rather than forcing people to use a PPA.

  • Not sure if that is changed recently but when i used some non LTS ubuntu bases; their ffmpeg was not compiled with NVENC support while LTS base ffmpeg was. If that is a choice rather than a mistake, it is a bad one.
3 Likes

Well… To be clear, we have to understand exactly which is the goal. If the goal is to make the standard ubuntu more game-friendly, there are few things that can be done, if the goal is to rise a game-oriented flavor, than many interesting things can be done.

  1. let the user have a tool to install a steamos-like session (I replaced steamos installing steamcompmgr and the modeswitch inhibitor in the past, I got a cool console experience ). Nowadays, this should be done with something like gamescope at boot, avoiding to launch the DE and having a console-Like session.

  2. a rolling release is a better solution. The kernel get frequent game patches, drivers evolve quickly, pipewire and wayland evolve quickly. Don’t stick with a 6 month release plan. It’s not enough stable and not enough quick.

  3. one of the most annoying problems of ubuntu is that gnome shell tries many times to get the focus with its boring notifications. I switched from ubuntu to kubuntu and notifications went out. A point in favor of kde.

  4. about the DE, kde is rising and surpassing gnome as features, speed and evolution. Valve too is actually funding kde.

  5. latency is a thing. I have a lot of latency even with cabled pads (steam controller too). Probably some efforts have to be done in compiling.

  6. the gamer flavor should have dedicated repos.

@sergio-tarsiero let’s not get too carried away! It’s definitely interesting to consider what a game-oriented flavour might be but for now I’m thinking about what we can do to be more game friendly with current Ubuntu. I think there are probably three areas that are particularly useful in the short, medium and long term:

  • Short term: guides, tips, workarounds to getting started gaming on Ubuntu currently - what do new users need to do that they probably don’t know about?
  • Shortish-medium term: fixes and updates to improve the experience, remove some of the above friction
  • Longer term: new features, apps, game-oriented options in settings/installs to make a really compelling experience

Let’s build a backlog that we can gradually work through over time, starting with the lowest hanging fruit to help us prioritise gaming alongside our other engineering goals. :slight_smile:

3 Likes

Controllers like the Dualshock 4 can cause issues with sound.

Plugging in a Dualshock 4 in Ubuntu 21.10 causes the audio output and input device to switch to the Dualshock 4.

I don’t see any solution in the default sound settings other than manually switching the output and input every time I plug in the controller.

Using Pavucontrol you can set the audio profile of the Dualshock 4 to “Off” to fix this issue.

The main issues with Ubuntu Desktop:

  1. Gnome Desktop Environment requires many unofficial Gnome extensions + Gnome Tweaks to be customized. That is something painful to do even for an average Linux user. Also, Gnome extensions breaks with every point update, and you have to wait for a new update for these extensions to work again.

  2. Mesa drivers are outdated, and you have to add a PPA to update the drivers.

  3. Linux-firmware, and Linux kernels are outdated as well, so if you own an AMD GPU, the gaming experience may be downgraded.

  4. WINE, and Winetricks are outdated, and both are required for gaming outside of Steam.

  5. FAudio, and VKD3D dependencies required by WINE are either outdated or not available at all, and you have to use PPAs, or you will not be able to install wine.

  6. MangoHud, vkBasalt, and GOverlay are only available on Ubuntu by an outdated PPA.

  7. 32bit packages are disabled by default, so you can not play any 32bit Windows games or Native 32bit Linux games out of the box.

  8. 32bit mesa-vulkan-drivers are not installed by default, so you can not run any 32bit Windows game on Ubuntu.

  9. Vulkan-loader is outdated.

  10. If you use a laptop, the iGPU is used by default, especially with OpenGL games. Also, the screen will be turned off while gaming, because wine does not inhibit power management while running full-screen applications, or receiving input from a controller.

  11. Achieve Manager is the default application to open .exe extension on Ubuntu Desktop.

  12. If you want to use any environment variable or pass a Windows command-line argument to a Windows executable, you need to use the terminal.

  13. If you want to use any environment variable with a native Linux game, you need to use the terminal.

  14. Most native Linux games use .sh extension, which is opened by the text editor by default on Ubuntu Desktop.

  15. Pipewire offers better compatibility for Bluetooth headsets, and low audio latency in general, but it is not available on Ubuntu Desktop yet.

  16. RetroArch, Heroic Games Launcher, and Lutris are only available to be installed on Ubuntu Desktop by a PPA, or by a Debian package.

  17. Ubuntu Desktop has no settings for the controllers.

I think what will help with most of these issues is having one official PPA for all packages that needs to be updated for gaming, and to be available to enable from Software Sources.

3 Likes