You can sign up to get a daily email of our articles, see the Mailing List page.
We do often include affiliate links to earn us some pennies. See more here.

A KDE developer has thoughts on changing how Linux games work

By - | Views: 21,187
I am all for increasing performance on Linux games, and KDE developer Martin Gräßlin does have some interesting thoughts, but I disagree with a lot of it.

QuoteSo what can we do? I thought about this and propose that we change gaming completely on Linux: remove the windowing system! Games should talk to kernel mode settings directly, games should interact with libinput directly. Let’s remove everything in between, we don’t need it, it only can worsen the gaming experience.


What he's saying sounds nice, and I'm sure he means well, but we are talking about Linux on the desktop here. Stuff like this may be good for SteamOS, but not desktop Linux.

He goes into more detail about it too and I won't quote all of it, but he summed up what would happen:
QuoteWhen a fullscreen game starts, it can create a “sub-session” on a new virtual terminal and become the logind- session controller for that session. This would allow the game to open the device files for rendering and for input just like a Wayland compositor does. Rendering could be done through EGL on top of DRM/GBM just like a Wayland compositor. The game would have full control over rendering, there is no desktop environment to slow it down any more. And it would have control over mode setting. Need a different resolution? No problem, just set it. On a desktop environment that’s always problematic (terrible on X11, better on Wayland). For games in windowed mode nothing should be changed, those should stay on the desktop environment.

Of course this would remove all interaction with the desktop environment. This is something which needs to be considered, like how to get Mumble to work in such a setup? Maybe the game could launch its own Wayland server?

That breaks Alt+Tab! Well not really. For one on X11 at least games often grab the keyboard, so Alt+Tab won’t work anyway. And of course one can still switch with ctrl+alt+f1 to the running session. Games should also have a common way to achieve this in my opinion.

In my library of 535 Linux supported games, maybe around five or so don't work with Alt+Tab, but all work if you bring up something like the Steam Overlay to make it work again. My point is that you can pry Alt+Tab away from my cold dead fingers, especially since I am on a single monitor again. I don't think having a bunch of extra sessions around will really help all that much, considering the real marginal performance changes you get from it (I've tried it before, it wasn't worth it).

You would lose mumble, teamspeak, game overlays, and possibly more with this approach for what? A marginal performance gain?

What if you are using more than one monitor? It makes it all a bit pointless then doesn't it? Since the desktop will still be running on that monitor. How will it interfere or work with that?

It currently works mostly fine in both Windows and Linux, and I think something like this would make it even harder for people to switch away from Windows.

Personally, I see far too many issues with taking the game right out of the desktop session. I would prefer it if people worked out a way to increase performance for fullscreen games that a ran in desktop mode, rather than trying to completely re-do how it works. I mean, the whole point of the games being ran from the desktop is to integrate it all together isn't it? It sounds like a step forwards, but two steps backwards to me.

I think we can all agree it's good that people are thinking about ways to improve Linux gaming though. Article taken from GamingOnLinux.com.
Tags: Editorial
1 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
The comments on this article are closed.
30 comments
Page: «3/3
  Go to:

HunterZ Dec 11, 2015
Quoting: NouserNo, thanks. I don't want my Alt-Tab, Ctrl-Alt-Arrow and Super-S broken again.

In fact I wish Wayland will finally fix the "fullscreen program grabs ALL the keyboard keys and you can't do nothing to stop it", it's not just a serious usability issue but a security one as well.
This! I hate that the volume buttons on my laptop and keyboard don't work in most full screen Linux games already, and wacky stuff like the proposals in the article would only make it that much worse.

If you just disable compositing, games run great in Linux. The only problem is lack of resolution switching support, which kills me in games like FTL and Gemini Rue. I've become too familiar with using xrandr! It would be better if games or Linux could just do a bilinear scale to my native resolution though, which is what the monitor ends up doing anyway.
HunterZ Dec 11, 2015
I should mention that based on testing, I prefer MATE for a gaming friendly desktop manager, because it uses only software compositing by default. KDE is my second choice, because it makes it easy to turn off hardware compositing.
Guest Dec 11, 2015
Quoting: HunterZI should mention that based on testing, I prefer MATE for a gaming friendly desktop manager, because it uses only software compositing by default. KDE is my second choice, because it makes it easy to turn off hardware compositing.

Cinnamon is what typically choose. You can do the same under 'general' in settings. With it on and vsync off in games there is no tearing and no input lag, unlike with vsync on in game and the compositor off. The flip side is that the GPU gets to run as fast as it can which is probably not a good thing for power/heat/noise .. but at least there is no lag and no tearing. Its why i leave the compositor on in most cases and disable in game vsync .. there are of course games where vsync works properly ( not this 59,60,61,62,63 fps malarkey that stutters the game ) but on those games having the compositor on ( with muffin at least ) doesn’t make a difference, so yea I leave the compositing on.. I can't do this on other Desktop Environments, Im not sure if its a Mint Cinnamon specific or if its the same on Arch Cinnamon.

if there was only some kind of frame limiter that would top it off. I could composite games, vsync off in game and then frame cap the output to 60/90fps ( or higher, source engine games run smoothest at 160+fps )


Last edited by on 11 December 2015 at 4:14 pm UTC
Shmerl Dec 11, 2015
Quoting: HunterZIf you just disable compositing, games run great in Linux. The only problem is lack of resolution switching support, which kills me in games like FTL and Gemini Rue. I've become too familiar with using xrandr! It would be better if games or Linux could just do a bilinear scale to my native resolution though, which is what the monitor ends up doing anyway.

Martin explained, that Wayland compositors work differently, and you can't disable compositing like with X.

See here: http://blog.martin-graesslin.com/blog/2015/08/layered-compositing/
Mountain Man Dec 11, 2015
A KDE developer, huh? You know how I recently boosted performance on my gaming machine? I got rid of KDE and replaced it with Xfce.
Keyrock Dec 11, 2015
It's an interesting idea and I'm not going to dismiss it entirely, but, as echoed by so many people here, it creates a whole host of issues. Those issues would have to be solved or worked around before implementing anything like a separate wayland session for gaming.
Purple Library Guy Dec 11, 2015
Quoting: SethoxMy point here is that as long as you just deny an idea because you do not like it, you stagnate the community.

Of course! Everyone should support ideas because they don't like them! How could I have been so blind?
ElectricPrism Dec 12, 2015
Quoting: AsavarTzeth
Quoting: HoriAlso, can't Valve just develop their own DE and make it very lightweight and make interaction between the game and the kernel as direct as possible (still via the DE, but with less bloat) ?
They already have their own custom compositor that is used on SteamOS.

Quoting: HoriI know they have Big Picture but AFAIK it still runs on GNOME. And having their own DE has other benefits too, as they will have full control over it's development, and can make it as gaming-friendly as possible.
Incorrect. Gnome does not run by default and it is in its own tty (tty7) while SteamOS runs on a lightweight compositor in tty8.

I'm not sure that is entirely a statement of fact. When using LightDM greeter the Session launches on TTY7 yeah, but when using GDM the session launches on TTY1 and each additional session TTY2, etc.. at least on my Arch setup that's how it is and you can have 2 users logged in on different sessions at the same time on eg, TTY2 and TTY3.
AsavarTzeth Dec 12, 2015
Quoting: ElectricPrism
Quoting: AsavarTzeth
Quoting: HoriAlso, can't Valve just develop their own DE and make it very lightweight and make interaction between the game and the kernel as direct as possible (still via the DE, but with less bloat) ?
They already have their own custom compositor that is used on SteamOS.

Quoting: HoriI know they have Big Picture but AFAIK it still runs on GNOME. And having their own DE has other benefits too, as they will have full control over it's development, and can make it as gaming-friendly as possible.
Incorrect. Gnome does not run by default and it is in its own tty (tty7) while SteamOS runs on a lightweight compositor in tty8.

I'm not sure that is entirely a statement of fact. When using LightDM greeter the Session launches on TTY7 yeah, but when using GDM the session launches on TTY1 and each additional session TTY2, etc.. at least on my Arch setup that's how it is and you can have 2 users logged in on different sessions at the same time on eg, TTY2 and TTY3.

I think you are talking out of context. This comment and the ones before it were related to SteamOS and nothing else.

This is my partly my fault though. I missed one important line in my qouting: "Because the only place where this makes at least some kind of sense is a TV box". I will correct this, thank you. Still I would think it was clear when I mentioned SteamOS specifically.

It may also very much be a mistake in my interpretation of the original comment (from Hori), which I realize now was not that clear and very open for different interpretations.


Last edited by AsavarTzeth on 12 December 2015 at 1:55 pm UTC
Qantourisc Dec 17, 2015
Alt-Tab is for "noobs" :D
Real Linux men use ctrl-alt-Fx and run multiple X11, Wayland or whatever they want to create there.

The biggest problem is: your video-card driver crashes after doing this quite a few times.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.