Jump to content

Linux gaming technical discussion

Recommended Posts

This is a thread meant for Linux gaming experts who have been helping me via email to help decide on the best configuration for doing old game testing in Linux.  I've gotten some conflicting information, so this is an effort to sort it out.  Here's a recap of what I'm trying to do:

 

GOALS / SYSTEM INFO:

•Test compatibility on a battery of games, all 3D accelerated, from about 1997 - 2010.  They'll be DirectX 5 - 9 games with maybe a couple OpenGL titles.  A fair portion of these titles will be obscure and unlikely to be in many game databases.  None of them will be Steam or GOG copies, only disc originals (some with DRM cracks).

 

•I wish to force mixed mode antialiasing (MSAA+SSAA for alpha textures) or SSAA on as many titles as I can.

 

•I wish to measure the framerate on as many titles as I can.  This means disabling vsync for benchmarking, though it would be nice to be able to turn it back on when I'm not also.

 

•The machine I'm using has a FX-8350 CPU and a Geforce 770 GPU.  I have a weaker AMD GPU card also I could use, but my initial research showed a wider range of antialiasing compatibility for Nvidia GPUs on Linux.  I currently have Ubuntu Mate installed.

 

I was using PlayonLinux and was having disappointing performance on many older titles.  I've since been told I should be using Luttris.  What I'm looking for is to collectively come up with a COMPLETE guide for everything I should do from a new install to having a solid set up.  I was starting to make a checklist when I got all the Lutrris info and discovered WINE was forcing Adaptive VSYNC on me, which sent me back to the drawing board.   Here was my checklist so far:

 

 

  Reveal hidden contents

 

Obviously, some of this information is outdated, but I thought it was worth listing here for the parts I did get correct.

 

Anyway, please give me your detailed step-by-step instructions / suggestions for trying to get these games to run.  For example, maybe I should try Luttris in DXVK mode FIRST, but then if that doesn't work for a game, THEN try Playonlinux, etc.  Be as specific as you need to.  Alternately, if you disagree with advice someone else is giving, by all means, feel free to discuss it here.  You only need to "dumb down" the final instructions directed towards me, you can be as technical as you like towards each other. 

 

Thanks in advance for the help and if you're not particularly knowledgeable about Linux gaming, please refrain from posting in this thread.  I'm trying to cut down on the casual chatter here and focus just on the technical aspects of getting things working.

 

 

WHAT I CURRENTLY NEED HELP WITH

 

•Turning off adaptive Vsync in WINE.  It's been suggested to me that I should install libstrangle, which requires me to compile it myself.  It's also been suggested I disable Nvidia DRM, though someone else was claiming that would only work for Opteron setups.  I have no idea which route I should be pursuing, so I would appreciate some clarification here.

 

•Full installation / setup guide to Luttris for the types of games I'm testing (DirectX 5 - 9, mostly, many of which aren't in a Linux database).  Advice on what cases this is likely to be better, worse, etc.

 

•One person suggested dgvoodoo for getting antialiasing working on games it doesn't function on normally.  I think initial testing made this look like it was unlikely to help in most scenarios.  Any clarification on this + instructions for getting it working if it is in fact, recommended.

 

•For older games that only run at 4x3 resolutions, what is the recommended method to run these in full screen mode on a widescreen monitor with proportional stretching (in other words, the image will be scaled accordingly and not distorted horizontally)?

 

•(low priority) when forcing SSAA, I noticed on at least one title, it led to blurring above and beyond what you normally get from SSAA (all AA has a little bit of blur due to its nature, this was beyond that).  In situations this occurs in, are there any "sharpening" graphics options to counteract it?  If it helps, the title I remember this happening in was Warhammer: Mark of Chaos.

 

Edited by Ross Scott (see edit history)

Share this post


Link to post
  On 5/14/2019 at 12:33 PM, RaTcHeT302 said:

Sorry for hijacking the thread, but if there's any info on how to turn off billinear filters \ get pixel perfect scaling (I forgot the term for it), it would be nice to have some info on it, it would be useful for games like StarCraft, where the game is just a blurry mess.

Expand  

That's alright, you reminded me of another thing I wanted to mention, I'm adding it to the original post.

Share this post


Link to post

Some preliminary points:

  • the adaptive vsync issue Ross discovered really seems like it could be very well behavior baked into Wine itself. It'd be prudent to test and determine this as soon as possible, possibly by contacting Wine devs and try to get a patch for Wine made that addresses it.
  • I think we should try to categorize all the games we'll be dealing with, because different types of games will require slightly different approaches depending on the graphics API used and other various nuances in the implementation. I imagine we'll have to tackle a lot of games on a case to case basis so it's important that solutions found in such manner will be correctly classified so they can be reused for others. Like for example as Ross mentions, some games actually benefit from going the whole dgvoodoo + DXVK route but a lot probably wouldn't.
  • Regarding the 4:3 thing, I suspect using Proton would be best since it has fullscreen scaling built in, unless vanilla Wine has finally got that upstreamed. Assuming there isn't a game-specific patch on http://www.wsgf.org/ of course.
  • I do think Lutris should be used as the "base of operations" because it has the best per-game configuration options, including an option of easily enabling DXVK. The only thing it misses is an easy way to make prefixes, but it's not like it's hard to make prefixes, even from a terminal.

I'll write more when I have time and as I collect my thoughts.

 

Edit: also I see nothing wrong with your checklist so far btw, Ross, seems like a reasonable starting point

Edited by qptain Nemo (see edit history)

Share this post


Link to post

Okay just as I wrote I see nothing wrong with that checklist I found some nitpicking material. I'd modify the kill wine script as follows

  Quote

 

#!/bin/bash
sleep 30
for KILLPID in `ps ax | grep -i '.exe' | awk ' { print $1;}'`; do
  kill -9 $KILLPID;
done

killall -I -s KILL -v wineserver

 

Expand  

Rationale:

  • wineserver doesn't have .exe in its name and it's better to make sure it's not still hanging and is killed together with the rest
  • the name of the game's executable might be in all caps so grep without -i won't catch it
Edited by qptain Nemo
oops, screwed up the syntax of kill because i always use killall wrapped in my own script (see edit history)

Share this post


Link to post
  On 5/14/2019 at 12:56 PM, qptain Nemo said:
  • I think we should try to categorize all the games we'll be dealing with, because different types of games will require slightly different approaches depending on the graphics API used and other various nuances in the implementation. I imagine we'll have to tackle a lot of games on a case to case basis so it's important that solutions found in such manner will be correctly classified so they can be reused for others. Like for example as Ross mentions, some games actually benefit from going the whole dgvoodoo + DXVK route but a lot probably wouldn't.

 

Expand  

What I'm looking for is almost a flowchart process.  In other words, something like

 

Step 1: Try X software with Y settings.

Step 2: If X software is unsuccessful, try Z software with X1 settings, etc.

Step 3: If game is DirectX 7, try X2 software with Y2 settings, etc.

 

I'm looking for a "general procedure" to follow that I can apply to any random game of the type mentioned (DX5 - DX9, 3D accelerated, possibly too obscure to have existing documentation).  So I'm not expecting one piece of software or one setting to work with everything, but I want to be as prepared as possible with my procedure to get the game working.  It's fine if you want to list a different process for a game that already is in an existing database v. one that's not.  Now beyond that, there's also game-specific fixes, but that's a deeper level I can document elsewhere that people can help with later if you want (I can email about that).  For now, I'm just trying to nail down a general process.

 

 

 

 

 

Share this post


Link to post

Hello everyone. It's been a long time since I've used a forum, so forgive me if my etiquette is a little rusty.

 

This post may get a little long, but I'd like to address as much as I possibly can with all the information I have. I'd also like to suggest that we put in explanations on every terminal command that we post on this thread, as that will make it a lot easier for newbies to understand what they're actually doing. I think the best way is to have a commented out part after the command, so we can roughly explain what we're trying to achieve. Now for the actual post...

 

Wine, V-sync, and libstrangle

 

  Reveal hidden contents

 

Lutris
 

  Reveal hidden contents

 

Forced Anti-aliasing
 

  Reveal hidden contents

 

 

Old games and resolution

 

  Reveal hidden contents

 

 

DXVK and D9VK

 

  Reveal hidden contents

 

 

Phew. I think that's everything so far. Sorry again for the extra long post.

Edited by cgalves (see edit history)

Share this post


Link to post

Okay, thanks for the advice so far, I'll test it when I get a chance.  Question, for D9VK, is the usual method of forcing AA still the same (setting it in the Nvidia control panel + adding the registry setting to the WINE install)?

Share this post


Link to post
  On 5/18/2019 at 7:44 PM, Ross Scott said:

Okay, thanks for the advice so far, I'll test it when I get a chance.  Question, for D9VK, is the usual method of forcing AA still the same (setting it in the Nvidia control panel + adding the registry setting to the WINE install)?

Expand  

Short answer: yes.

 

Long answer: D9VK operates similarly to what's already built into Wine, by translated D3D9 calls into Vulkan calls. It doesn't require anything special for setup beyond what I delineated in my previous post. If it doesn't take forced AA, it could likely be a bug as it's still in its early days of development. Assuming you're using Lutris, you don't need to mess with the registry, as you can simply use the Anti-Aliasing option under "Runner options".

Share this post


Link to post
  On 5/19/2019 at 1:38 PM, cgalves said:

Short answer: yes.

 

Long answer: D9VK operates similarly to what's already built into Wine, by translated D3D9 calls into Vulkan calls. It doesn't require anything special for setup beyond what I delineated in my previous post. If it doesn't take forced AA, it could likely be a bug as it's still in its early days of development. Assuming you're using Lutris, you don't need to mess with the registry, as you can simply use the Anti-Aliasing option under "Runner options".

Expand  

Maybe it's different on Linux, but on Windows, forcing AA has always been a crapshoot on DX9 and above.  If you know of any games where it can be forced (in other words, no in-game option to turn on AA, but it does work when forced through drivers), let me know, that could be good to confirm it's working.

Share this post


Link to post
  On 5/20/2019 at 5:39 AM, Ross Scott said:

Maybe it's different on Linux, but on Windows, forcing AA has always been a crapshoot on DX9 and above.  If you know of any games where it can be forced (in other words, no in-game option to turn on AA, but it does work when forced through drivers), let me know, that could be good to confirm it's working.

Expand  

I have a pretty big game library, so it's kind of hard for me to remember what games have what settings. Any outstanding examples you want me to test?

Share this post


Link to post
  On 5/20/2019 at 5:50 AM, cgalves said:

I have a pretty big game library, so it's kind of hard for me to remember what games have what settings. Any outstanding examples you want me to test?

Expand  

Really just anything that runs on D9VK.  Well known games might be best since they're more likely to have been tested.  It's not essential that you find one, it would just be nice to have a point of reference to ensure it works.

 

EDIT:

If you have a game that has in-game options for AA, but that's disabled, however driver-forced AA is on, that can work too (as long as it's in override mode).

Edited by Ross Scott (see edit history)

Share this post


Link to post
  On 5/20/2019 at 5:55 AM, Ross Scott said:

Really just anything that runs on D9VK.  Well known games might be best since they're more likely to have been tested.  It's not essential that you find one, it would just be nice to have a point of reference to ensure it works.

 

EDIT:

If you have a game that has in-game options for AA, but that's disabled, however driver-forced AA is on, that can work too (as long as it's in override mode).

Expand  

D9VK has mostly focused on Shader Models 2 and 3, IIRC. Newer games (more likely to have built-in AA) are more likely to work better on it, ATM. SM 1 is next in line, though. I can test a variety of games, but can add a known odd-ball or two if you can name them.

Share this post


Link to post

Unreal engine games are pretty common.  Maybe something like one of the Mass Effect games (or Unreal Tournament 3) would be a good test.

Share this post


Link to post
  On 5/20/2019 at 6:21 AM, Ross Scott said:

Unreal engine games are pretty common.  Maybe something like one of the Mass Effect games (or Unreal Tournament 3) would be a good test.

Expand  

Alright. I'll run some tests and tag you in a post whenever I've got something.

Share this post


Link to post

I've done some tests

  • I can confirm that libstrangle indeed unlocks the adaptive fps. Seeing as the compilation instructions provided by cgalves are very straightforward I absolutely second that solution. I'm thinking if there is an elegant way to invoke strangle from Lutris though to easily "attach" it to games...
  • [DX 7] using force AA option of Lutris with Nocturne (in DX 7 mode) freezes the game
  • [DX 7] using dgvoodoo + DXVK allows forcing of antialising and anisotropic filtering in Nocturne and Messiah
  • [DX 7] running Messiah with the Lutris AA options has no effect
  • [DX 7] running Messiah and Nocturne with the enable FXAA option in the NVidia settings had no effect
  • [DX 9] Regarding D9VK: The developer states this: "Please do not use wine's d3d9x or d3dcompiler with d9vk. They make invalid API calls and generate bad shaders. I cannot stress this enough." This means that in the wine prefix used with D9VK the following command should be ran 
      Quote

    winetricks -q d3dcompiler_43 d3dx9

    Expand  

    This also means that it's better to make a separate Wine prefix for the usage of D9VK to avoid switching between the native and built in versions of these components, or worse still forget to switch and get bad results.
    Although I'm not entirely sure if the way Lutris invokes DXVK actually takes care of this or not?

Edited by qptain Nemo (see edit history)

Share this post


Link to post

@Ross Scott Apologies for the wait, but I tried to be very extensive with my testing. Sorry in advance for the long post.

 

@qptain Nemo Thanks for your post, it adds quite a bit to what I'm about to detail in this. I'm interested in testing the dgvoodoo method as I tested something similar, which you can see in the "Other Games" section. Can you post instructions on how to set it up in Lutris?

 

With the intro out of the way, let's get onto the meat and potatoes.

 

Testing System and Methodology

  Reveal hidden contents

 

Games Tested

  Reveal hidden contents

 

Conclusions

  Reveal hidden contents

 

Sorry for yet another massively long thread. Hopefully all this testing can be useful and we can figure out where to go from here.

@Ross Scott , please let me know if there's anything here you'd like a detailed guide on.

Edited by cgalves (see edit history)

Share this post


Link to post
  On 5/24/2019 at 10:22 PM, cgalves said:

 

@qptain Nemo Thanks for your post, it adds quite a bit to what I'm about to detail in this. I'm interested in testing the dgvoodoo method as I tested something similar, which you can see in the "Other Games" section. Can you post instructions on how to set it up in Lutris?

Expand  

dgvoodoo is one of those DLL overrides solutions so to utilize it just extract the contents of the installer archive into the game directory of each game, although without any directory hierarchy, just dumping all files directly together with the game executable. It's going to be these files: dgVoodooCpl.exe, dgVoodoo.conf, D3DImm.dll, DDraw.dll, D3D8.dll, D3D9.dll (32 bit or 64 bit version, matching the game). Then of course you need to set up DLL overrides for D3DImm, DDraw, D3D8 and D3D9 to "native, builtin" either in the Lutris config for the game or in the prefix itself. Then just run dgVoodooCpl.exe and/or edit dgVoodoo.conf to set the settings as you want them and you're good to go.

And don't forget to enable DXVK. You'd want to use DXVK with it rather than WOGL.

Edited by qptain Nemo (see edit history)

Share this post


Link to post

Btw, Ross, I want to draw your attention to something cgalves mentions in passing:

  Quote

Unless otherwise noted, the Wine version used was "tkg-protonified-4.6-x86_64".

Expand  

here's the description of that build (from here)

  Quote

This build uses the fullscreen patch from Proton to run older games at the native desktop resolution (For example, games running only at 800x600 will be stretched to the native resolution, without deforming the aspect ratio). On supported setups, this also disable the desktop compositor (Kwin, Mutter, Compton and possibly other compositors are compatible)

Expand  

This, I believe, addresses one of your concerns.

Share this post


Link to post

 

cgalves: Thanks a bunch for your testing, you may have saved me a bunch of time.   I have a few questions, based on your results.

 

 

•Since AA is a cornerstone of what I'll be testing for, unless the game I'm testing is DX9 or higher AND supports in-game AA options, does it make any sense for me to even use D9VK?  Obviously it has its uses, but if it can't force AA, that makes it less relevant for what I'm testing for except for a few games in my testing.

 

•What's the advantage to using Lutris over PlayonLinux for DX5 - DX8 games?  Also, many of the games I'm testing are a little less common, I tried typing in a dozen titles of games I was going to test that didn't even have entries in the Lutris database.

 

•Maybe qptain Nemo could assist with this also.  Are there any games that give better results with dgvoodoo under DKVK?  I think you use it to tell it to render the game under DX11, but whether it works with the specific game is another question.

 

 

RaTcHeT302: Regarding the fence test, that has only 3 solutions:

 

•Mixed mode MSAA / SSAA (called TSAA by Nvidia, Adaptive AA by AMD, but they may have changed the naming).  This uses MSAA for polygon edges and SSAA for alpha textures.  Won't clear up all aliasing (like some shader effects), but will clear up the fence (when it works).  This technique often doesn't work on most modern games.

•SSAA costly in performance, but gives the cleanest picture (when it works)

•Downsampling.  Similar to SSAA and can be even more costly, but has a much higher compatibility (assuming the game isn't resolution capped)

 

I'll talk a little about this when I make the video.

Share this post


Link to post

@qptain Nemo Thank you for the instructions on dgvoodoo, I'll have to try it out whenever I get the chance. In regards to the patch in question, I'm not fully sure if it does integer scale or just proportional stretch to full screen. Ross may correct me if I'm wrong, but I believe he was looking for the former, since it provides a sharper look. More info here.

 

@RaTcHeT302 I wasn't aware of that issue on UE3. Is there a reliable way of telling which games run on which engine? I'd like to cross-compare the games I tested with what engine to better see where the issues I encountered lie.

I had zero luck with FXAA, but I agree that a more bespoke solution would be nice. Unless we manage to make a fund for some programmer to design something to our exact criteria, our best bet is to probably make a feature request on the D9VK GitHub for some option to more reliably add AA in the middle of the rendering pipeline, rather than some endpoint defined by Lutris/Nvidia.

 

@Ross Scott You're welcome! I'm glad I could be of assistance. As for your questions...

It's hard to say, since these projects evolve so quickly. If you were to release the video tomorrow, I'd say probably not worth using in most games. If you were to release it 6 months from now, then the lack of forced AA might well have been solved by then. I'd say that at a minimum it deserves a mention, since (as my testing shows) the performance boost can be huge, leading to games that might've not been playable before being playable now.

The advantages for Lutris aren't just necessarily on DXVK/D9VK being a lot easier to use. The whole interface feels newer and more modern, complete with the way you interact with Wine being done through drop-down menus, rather than messing with winecfg or wine registry. Then there's the inclusion of the Protonified Wine builds, which use patches made by Valve to improve game compatibility and performance across the board. The one click game installs are also a lot better than what PoL had, with tons more games available since the scripts are a lot easier to make. Lutris is also under more active development so new features get added fairly frequently (they recently added GOG integration!). The only downside I can think about Lutris vs PoL is that PoL had a nicer method for making new Wine prefixes, while Lutris's is a little more convoluted. I'd still say the other benefits outweigh that drawback, though.

I hadn't really heard of dgvoodoo until this thread, but from their description, it seems like they're doing to DirectX 1 through 8.1 and Glide, what WOGL, D9VK and DXVK do to DirectX. Basically, taking instructions that might not have support on modern GPUs/Windows drivers, and translating them into modern DX11 instructions. I've yet to try it, but it's hard to say whether or not we'd have better luck with forced AA down that route. At that point you're taking code and pushing it through two translation layers, so all sorts of weird things could happen. Or it could all work perfectly with zero issues. I'll figure it out soon enough, I suppose.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in the community.

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

This website uses cookies, as do most websites since the 90s. By using this site, you consent to cookies. We have to say this or we get in trouble. Learn more.