Poor Gaming Performance in Linux

Never had a problem with my Acers A8 with linux gaming... Nope, it was every other damn thing with the Acer that was the problem. Killing Floor did on the other hand look different under linux than windows and I was never able to pin down why it looked different. Get higher fps on CS:GO but a lot of games still run terrible, Like when they first put KF on linux terrible. Never had a problem with NVidia either. Only real problem I had was when I installed Catalyst and would reset the computer and it would try to go back to Xorg. Turned out I had to disable it then setup catalyst from the comand line. That was on mint 13 iirc. Yup, problem was with mint not AMD that time. Installed Mint 14 and didn't have the same problem, only thing that didn't work out of the box on 14 was the wifi wich I already knew how to fix from both xubuntu and Mint 13.

Ok, let's get back on topic and actual problem. Yes, AMD drivers for games are terrible, but, that doesn't mean you can't do anything about it.

Now, what is the problem on AMD? I've read about it, and did find uout it is OpenGL swap buffer problem (or something among those lines, I'm no expert on it), the problem is that AMD fglrx drivers create some sort of "infinite loop" in OpenGL on some (or most) games, and effect of that is calls to the CPU in rapid way, so your CPU usage goes up like crazy (similar to software rendering, but it is not).

You can test this effect on Trine 2 (since you have it), first, what you need to do is to go into: .frozenbyte/Trine2/options.txt in your home folder (.file is hidden file, i guess you know it, but just saying), and there, you need to change those two lines from "true" to "false", like this:

setOption(gameBaseApplicationModule, "FPSCapEnabled", false)
setOption(gameBaseApplicationModule, "TargetSmooth30FPS", false)

Then, you can start testing. Load game with fglrx drivers (as you have it now), and monitor CPU usage, it should go up to 100% in some places, and on those places FPS will drop to 40 or something, and you will get stutter (usualy at the begining of map = try first mission with Amadeus walking behind the trine).

Now, if that is the case, you can test same game with open source drivers. If game doesen't work (not able to load, or black boxes etc., that happens to me with open source drivers), start game from terminal (or create a script) with:

force_s3tc_enable=true /path wherever game is/trine2.sh, additionaly if open source drivers force V-SYNC, you can add vblank_mode=0, so, for example, if game folder is in home directory, it would look something like this:
vblank_mode=0 force_s3tc_enable=true /home/trine2/trine2.sh

If force_s3tc_enable=true doesn't work, download it with:
sudo apt-get install libtxc-dxtn-s2tc0
sudo apt-get install libtxc-dxtn-s2tc0:i386

Now, with open source drivers, you should get huge FPS boost, with minimum FPS well above 60, but for me, graphic quality is a little bit degraded (some minor lighting effects are missing). CPU usage should be low, i hope AMD fixes that.

Sorry for detailed instructions, but it might be useful for others (newer users of Linux) in future. Obviously, you can use this method with any game.

2 Likes

I primarily built this machine to be a portable gaming rig and thus, it would be used mostly for gaming in that respect. Native Linux gaming as well as running games within windows running in a VM with PCIe passthrough to the main GPU (I will be adding a 2nd card).

Not only that, but while this machine is at home, it'll also be used as a platform for me to learn all things Linux.

So, I need it to be able to handle and perform well in some rather demanding 3d games as well as do more casual stuff. A sort of Jack-of-all-trades machine.

Thanks for all the tips and suggestions. :)

I'll give this a try over the weekend and see if I can get some better performance out of it. I guess this is really only an issue with running Linux-native games. Once I have the windows VM setup with PCIe passthrough, it'll be using the windows drivers and it should run the games, more or less, closer to the performance you get running them in windows.

But until I can pick up a 2nd cheap GPU, I'd like to get native Linux gaming performance to be better than it is for now.

Thanks again to everyone, this has been very helpful. :)

Well, give it a try. It is not problem with Linux native gaming, it is a problem with AMD drivers (just to clarify for the sake of otehr readers), and can be solved, will be? I dont know :).

Using the AMD proprietary drivers, zero issues, games like a dream... Maybe you tried wrong? XD

Dear Swick,

at first I'd like to apologise for editing your post slightly so that readers of my post can easier understand the points I'm replying to. Sorry!

And now into the business: I'd say that this is now heading towards the more philosophical direction about what's good and right. Everybody has their own opinions about that. And it's OK as long as people don't go running around claiming that their way is the only way it should be.

(As a funny side-note, we've now reached the same central argument between GNU/Linux users that lead @MEC_777 to erroneously believe that Linux drivers for AMD's hardware were superior. Like he described it, there's this decade old ideological split in the community about this matter.)

From my perspective you seem to be essentially saying that a company should not provide the very best it has to offer. Should not provide anything but the standard features. Should not distinct itself from its competitors. And should opt to a poor committee designed standards that are not as good as they could have been. And should not try to compete. And so on.

That's in opposite direction of what free market should be about. There's no API that "should not exist" in my opinion. I tend to think that there are various levels of "vendor lock-in". One some levels it is acceptable and perfectly fine thing. However I want to make one thing clear now: The word itself, "vendor lock-in", contains a certain level of ideological package with it which I am not entirely comfortable using it in this case.

Certain people like you use ā€vendor lock-inā€ very loosely to attack companies. I don't think that just providing unique solution to a problem or a need that clearly exist should constitute to "vendor lock-in" just because only one company is offering that feature or set of features that no other company has access to. (The ā€Free softwareā€ also carries an ideological package with it. That's why certain people thought that ā€Open Sourceā€ is a better choice of words.)

If that solution proves to be very good and popular (as in competitive solutions appear that duplicate the functionality of the original solution) it makes sense to standardise it and enable it for everybody. Especially after the company that innovated the solution has made back their investments into the research and made a reasonable profit from it.

If the original company tries to prevent competitors from providing similar feature to compete with their feature, or prevent their customers from moving to use the competitive feature, or prevent the standardisation of less used solutions, then that is what vendor lock-in is all about. That's against the free market.

Additional side-note: I'd keep software non-patentable because I see software as pure mathematics and it's very difficult for me to see why pure software processes should be patentable when they're nothing but abstract ideas without an actual physical implementation. Software can be closed but not patentable.

And one more additional point: The way you use ā€vendor lock-inā€ in this case discredits the actual dangerous vendor lock-in situations, in my honest opinion. There are companies out there which are constantly seeking ways to fix the market and try to prevent their competitors from providing solutions like e.g. Oracle, Novell, IBM, Microsoft, Apple, and Google to name a few.

These companies have grown so big on certain markets that sometimes they try to actively make it so that it's as difficult as possible (e.g. cost is too high) for their customers to move from their product to a competitive product. The classic example of that is the Microsoft and their text processing program Microsoft Word. Another classic example is IBM and their punch cards.

nVidia is nowhere near the top on the list of the worst offenders. nVidia tends to open new markets and compete within that market with their own rules and they do allow others to participate (much like Microsoft in their early days). nVidia is ā€openā€. I'll come back to this point later when I talk about VDPAU.

I am pro choice. If it's your choice to not support nVidia then it's OK. I am actually grateful to you for your dedication to AMD and Intel because by supporting their ā€freeā€ and ā€openā€ solutions it means that nVidia will have to compete honestly. We are benefiting from that kind of competition.

Competition forces both companies to try to do their best, and it ensures that customers don't have to ā€suck it upā€. That would happen if and when one company has too much leverage over the market like it was in 2005-2007 when nVidia arguably had a monopoly like position in Linux 3D market (and from certain perspectives they still hold on to that kind of position).

I support free software because opening the source code for public scrutiny gives certain freedoms to its users as you are aware. It improves technical side of the software especially because it enables more competition on that market where it is being applied to. Closed source is not an entirely bad thing (but it opens the door to monopolies and trusts which are a inherently a bad thing. That's why proper competition and regulations are needed.)

If nVidia, or any company for that matter, gains a complete monopoly in computer graphics market it would be a really bad thing. It doesn't if it is nVidia. AMD would be just as bad as a company in that kind of position. Any individual or organisation who has power wants to stick to that power as much as they can and haul even more power to themselves. That leads to the failure of the system if and when there's nothing to balance things out between the parties.

I see need to support proprietary software so that utilising as many free software or open source components as possible becomes a functional reality. Without nVidia's GNU/Linux support, I'd be forced to use Microsoft Windows because Intel and AMD just do not deliver in my opinion a product that serves my needs. But there's also the aspect of competition. When free software and proprietary software compete against each other both ideologies are forced to improve themselves and their intellectual products on the market.

I see no problem in compromising little bit of the feature set I get from nVidia in-order to support AMD because I see value in their current attitude towards the more free and open driver development. However AMD doesn't deliver a product that serves my specific needs. They might do so in the future. At which point I'd be more than happy to try them again. But at the moment I'm still quite a bit disappointed in abilities of their product lines.

I could tell you a story why I think the ATi as a company was the worst thing on the planet and how they cheated GNU/Linux users and betrayed trust of many. But let's move on. You see, I could talk about this topic for hours. But let me move on and talk little bit about the VDPAU. You see, I'm not entirely sure if you've understood what VDPAU (or OpenCL) actually is.

VDPAU was developed by nVidia (and still is for the most parts). VDPAU is just one of the examples that shows how nVidia sees free software and open source market as a opportunity for itself. They saw that there was a need on GNU/Linux and UNIX-like systems for a hardware accelerated video processing.

nVidia then made VDPAU to implement their PureVideo on UNIX family of systems and UNIX-like systems (Linux, Solaris, various BSDs, etc.). And then gave it away to FreeDesktop.org as a royalty-free API for adoption by free software community. The only similar things that exists to my knowledge on Linux are Intel's VA-API (which is very much Intel specific since Intel doesn't support VDPAU) and AMD's XvBA (which is AMD's answer to VDPAU which only works on GNU/Linux and only on AMD's graphics cards unlike nVidia's VDPAU).

VDPAU interface is used access certain video processing capabilities of the graphics card. It is implemented in the graphics drivers. VDPAU itself only defines a small standard set of functionality but it can offer more than that if the manufacturer extends it which is entirely possible. Both nVidia and AMD have their own extras in their respective cards you can access through VDPAU.

VDPAU is a very good at what it does to the point that AMD also implemented it in their drivers. Now nVidia and AMD can both compete in the accelerated video for Linux market. VDPAU is probably the most common way to access nVidia's PureVideo and AMD's UVD capabilities. Software developers can safely implement VDPAU in their software and everybody wins.

Note that AMD's UVD's feature set is different compared to nVidia's PureVideo capabilities. In my opinion PureVideo is better because of its performance and extra capabilities although for common usage it probably doesn't make much different which one you have. You see, I don't have extensive experiences from AMD's UVD.

Both OpenCL and OpenGL work pretty much the same in principle. Both APIs provides a standard API/Interface to a card that implements certain standard features in drivers and also certain features that are specific only to the manufacturer. This way the companies can distinct themselves by offering additional capabilities on top of the standard features.

Extending has its problems too which easily could lead us to the talk about why DirectX is so popular among the game developers. However I am not going there. I am also not denying the raison d'ĆŖtre of these extensions. Some of them could and will become official part of the standard someday and everybody will benefit.

AMD doesn't have as much money to spend on software development as nVidia does. That shows in the amount of features they provide and in the stability of their driver.

Next I'll go through your points...

I've addressed the fact that making money on a new market is not a bad thing. And it has not been ā€the worst routeā€ to do so with a proprietary drivers or signed firmwares. nVidia was very open about it and alerted Noveau developers and talked with them about it. Noveau drivers work properly with any nVidia card, even the Falcon ones which you're talking about. I'd suggest you read:

http://www.phoronix.com/scan.php?page=news_item&px=MTc5ODA

Besides AMD already has similar firmware solution to protect their chips. With nVidia now issuing similar signed firmware images to Noveau project isn't too different from what AMD is already doing.

I'd like to see the source for ā€nVidia pressuring the kernel developers to re-license their codeā€. I don't remember that event and I'd like to read more about it before giving away my thoughts on the matter. However if you're talking about the DMA buffer thing where nVidia wanted to enable Optimus for the Linux users. But to do that they would have had to use DMA-BUF to achieve that so the Intel and AMD stuff would have worked together. But that DMA-BUF only allows GPL'd drivers and nVidia asked to change it so that it would allow also their proprietary driver. The ā€stealing codeā€ argument is pure propaganda and fearmongering by FSF people in relation of this topic. Anyway that didn't happen and that's why we don't have nVidia's Optimus on Linux officially supported by nVidia's proprietary driver. This is the reason for it.

http://www.tomshardware.com/news/nvidia-gpl-linux-driver,18572.html
http://www.phoronix.com/scan.php?page=news_item&px=MTA1OTU
http://www.phoronix.com/scan.php?page=news_item&px=MTIwNDI

I'd also like to see your sources for nVidia holding back their OpenCL implementation in hopes of people turning to CUDA. I don't remember that event. Not at least in the way you described it since you don't have to use CUDA API to get good GPGPU support. That's not true.

Yes it's true that OpenCL on nVidia cards is implemented using CUDA platform interface. But from the point of the source code or performance it doesn't make any difference. The same OpenCL code runs both in Intel and AMD implementation of OpenCL. Besides nVidia's OpenCL performance is on-pair or faster than with the Intel's and AMD's relative performance depending on what kind of GPU is being used.

CUDA as a platform is overall better designed, its documentation is better, and the libraries are better in my honest opinion. However I think it's fantastic that we have these two (very different) solutions for the sake of competition. Not to mention that CUDA as a platform doesn't only support OpenCL. OpenGL CS, Microsoft's DirectCompute and C++AMP can also be used through CUDA.

Now that I remember you should also know that the nVidia drivers also have support on Linux for the nVidia GameWorks. It comes with support for VisualFX, PhysX, and OptiX. OptiX is especially interesting because while ray tracing might not be a thing right now in games but in future it will be. OptiX is useful in various science and engineering applications at moment. The point is that nVidia driver don't offer just ā€performanceā€.

nVidia's driver does offer performance but also comes with loads of extras for the kind of engineering stuff I do that I find useful. AMD doesn't deliver this kind of stuff. There are similar things that offer something like that but nothing that's quite as good.

Unlike with the AMD's proprietary driver, the nVidia's proprietary Linux, FreeBSD, Solaris, and Windows drivers use the same common core. When Windows driver is improved those same improvements also go to the Linux driver almost directly. And yes when Windows driver gets crippled then Linux, FreeBSD, and Solaris drivers are also crippled in most cases. But that's the magic behind the nVidia's driver superiority on Linux.

Linux, FreeBSD, and Solaris will receive the support for new nVidia graphics cards the same day Windows receives the support. When OpenGL version is updates Linux, FreeBSD, Solaris and Windows receive the support at the same time. And then there's the performance parity between Windows and Linux version.

And that's why you're also little mistaken. Nvidia's proprietary driver doesn't limit the number of monitors per single card. As long as you're using single card you can have as many monitors as the card supports. If you have, let's say GTX 750 with 2x DVI and 2x HDMI, then you can use all those four ports with four monitors.

However the driver does indeed limit the number of total monitors in a multi-GPU set-up to three instead of the previous four in consumer GeForce cards. This limitation doesn't exist on professional Quadro cards.

This change apparently happened because nVidia changed their driver core to accommodate the rule changes on Microsoft Windows regarding the multi-GPU multi-monitor set-ups. The normal GeForce cards have the Base Mosaic feature and the so called SLI Mosaic feature is still there in the professional Quadro cards and it works as intended.

You can call it ā€an artificial limitā€ and ā€pissing into the pool of existing customersā€ because that's what it is. What else can I say? It's a result of one company having too much leverage on the market that is not most significant for them.

https://bbs.archlinux.org/viewtopic.php?id=193314
https://devtalk.nvidia.com/default/topic/809498/2x-gtx970-sli-mosaic-4-monitors/
https://devtalk.nvidia.com/default/topic/579449/linux/basemosaic-v295-vs-v310-vs-v325-only-up-to-three-screens-/1/
http://us.download.nvidia.com/XFree86/Linux-x86_64/325.15/README/xconfigoptions.html

But in all honesty no matter what graphics manufacturer you support that multi-GPU set-ups in Linux are kind of messy and you're unlikely to get all the benefits from having one. It probably results performance setbacks actually if I've understood correctly. And it doesn't matter what card you're using. AMD doesn't even support this on Linux to my knowledge. If anything I think this gives AMD a spot they could serve segment of the market who do require cheap multi-GPU set-ups with more than three monitors. But they're not investing into it.

We could also debate whenever or not FreeSync would even exist if nVidia didn't come up with G-Sync or Adaptive V-Sync first. FreeSync was AMD's response to G-Sync. And nVidia has the right to charge any arbitrary sum of money they want for their technology.

http://www.geforce.com/hardware/technology/adaptive-vsync

Why would you care if they charge extra 100 USD for it? If it was the only solution, and you felt that you need it, then you'd be likely to buy it. It's simple business. And going back to the theme of this post... nVidia saw a problem and offered a solution.

FreeSync is exactly what AMD should have come up with in-order to offer a competitive solution to the market. FreeSync is the very opposite of G-Sync which is proprietary and exclusionary. AMD's FreeSync was adopted as a VESA standard and is royalty-free, free to use, and at least in theory, has no performance penalties.

And about the reports that nVidia won't be supporting it... Well, yeah... nVidia has to support it eventually because Adaptive Sync aka. FreeSync becomes mandatory with the DisplayPort 1.3. At the moment with 1.2a it's optional.

Please go on. I can take time on weekends to correct the misinformation and misunderstandings you might still have. The point is that Intel, AMD, and nVidia are all companies in the business of making money. AMD has found out that by supporting free and open source software they can make money even if they aren't offering the best performance or the best feature set. And that's good! They're able to serve audience they didn't have before. nVidia on the other hand has found out that the best way to make money is to be the best in the performance, offering the widest range of features, and supporting the professionals out there and their special needs.

One of my personal dreams is to push free software to schools so that children would be able to see that there are more choices than just Microsoft Windows or Apple's OS X and iOS. The free software and the world would benefit greatly from that. I agree with the RMS that closed proprietary software in schools is harmful to society in terms of monetary value much like cigarettes are (for different reasons obviously).

But I also defend the closed source where it makes sense. Closed source wasn't that bad of a thing before the internet came and changed everything. Now it's entirely possible for Amazon, Sony, Microsoft, Apple, etc. to spy on you and disregard your civil and human rights. It's entirely possible for Sony to remove features from the products they sold. It's possible for Amazon to remove eBook you bought like they did with the 1984 Kindle edition.

What I seek is the golden middle way and the ability to have different choices. Free software is not the ultimate answer to all the problems but it is a great way to provide some choice for the people and balance the negative effects of the proprietary software.

Yours truly,

Hopeakettu

P.S. I quite literally just wrote this in an hour or something so if you find mistakes then please report back so I can fix them. That includes spelling and grammar mistakes. You see, I am not a native English speaker. English is the third language I've learned. Some of the things I've written here will probably appear bit "strange" to you guys. I'll keep drinking beer in a meanwhile. Cheers and have a nice Sunday!

6 Likes

To Summarize the thread:

OpenSource AMD drivers = Very Good with 60 - 80% of the performance of closed with smoother frame rates.

ClosedSource (Binary) Nvidia drivers = As good as windows 8+
( they are just repackaged versions of the same driver with theoretical identical performance )

Caveat: AMD closed "CAN" and "DO" work very well on certain applications and certain games. Its the lack of consistency that pisses people off. You can get 100+FPS on a game using these drivers, where on windows you might get 150 - 170fps .. but again, its having consistency.

People do like to call out AMD for having terrible closed drivers but they are semi-workable and the open are almost 100% workable day to day.

For hardcore gaming right now, choose Nvidia, no contest your running the same performance as the latest windows releases and in some cases ( source engine ) more FPS than on Windows titles.

I believe some popular gpu benchmarks are actually a few FPS faster on Linux than windows with the closed Nvidia also.

2 Likes

Ok, well I've certainly learned a lot from all your feedback. :)

I've decided to make the switch to Nvidia. Have already sold the 7950 and am currently searching for a GTX 670, 760 or 770 - which ever I can find for the best price.

Thanks again for the help. :)

Edit Just picked up an MSI Twin Frozer GTX 760 OC. :D

Quick update...

WAAAAAAAY better performance with the GTX 760 running the proprietary Nvidia drivers (followed Wendell's guide to install). Pretty much equal to windows performance. I'm now very happy with my Frankenputer Linux gaming rig. :)

Thanks everyone for all your time, effort and information. Much appreciated. :)

+! to you @Hopeakettu.. thank you for clearing up issues such as these. I hate seeing bashing of proprietary vs open source drivers .. I am just sick of it. Good on you.. props to you from the #mumblethinktank :D

tl;dr but it looks like swick got rekt

1 Like

good call, im running a 760gtx and everything is smooth and fast. TBH im having a better time with Nvidia on Linux than I did with AMD on windows.

everything just works.