How to run "dxdiag.exe"?

Questions about Wine on Linux
Locked
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

How to run "dxdiag.exe"?

Post by Mugsy323 »

I'm trying to get some old DirectX9 games to run under Wine but they crash on launch.

I was able to install the MS DX9.0c distribution package under Wine, but I can't figure out how to run "DxDiag.exe" to confirm it's installed.

Running ./wine/drive_c/windows/system32/dxdiag.exe does absolutely nothing. I also tried launching "wine explorer" from the terminal then locating dxdiag.exe in my REAL Windows/System32 folder, but that does absolutely nothing as well.

If I can't get "dxdiag.exe" to run, no wonder I can't get anything else to run either.

Help. TIA
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: How to run "dxdiag.exe"?

Post by invisible kid »

Just a regular user here, so feel free to ignore. Just providing some feedback until you get a better answer. I am able to run dxdiag.exe by:

Code: Select all

wine ~/.wine/drive_c/windows/syswow64/dxdiag.exe
and

Code: Select all

wine ~/.wine/drive_c/windows/system32/dxdiag.exe
You might have a different setup though, but I would try both commands above, just to fully check it out, but the second one is the one mentioned in your post. Cut and paste the command in so there won't be any typos. You can normally cut and paste by just highlighting the entire line, then middle-clicking in an xterm window. Hope you are able to get straightened out.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Thanks for the reply & bump, I'll check the copy in "syswow64". The "system32" copy doesn't work.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to run "dxdiag.exe"?

Post by jkfloris »

The built-in Wine dxdiag has only a command line interface.
For example:

Code: Select all

wine dxdiag /t dxdiag.txt
The Windows version of dxdiag can be easily installed with winetricks.

Code: Select all

winetricks dxdiag
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

jkfloris wrote: Sun Nov 07, 2021 11:45 am The Windows version of dxdiag can be easily installed with winetricks.

Code: Select all

winetricks dxdiag
That worked (getting DxDiag installed & working!)

For anyone reading this in the future, executing the above command from a terminal will first download & install: "directx_feb2010_red" (a 104.02MB file), then "directx_apr2006_red" (a 52.02MB file) from a host that can be a little slow, so it make take a few minutes.

When done, execute: wine dxdiag.exe

...and the familiar DxDiag app will load/run.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

FOLLOW-UP: Now, any idea how to install "DirectX 11"? I have the full 100MB redist package.

DxDiag says DX9.0c is installed, but I also need DX11. (I have Vulkan installed & working [verified]. I *think* DxVk is installed/working too. Not sure how to confirm.)

When I try running the DX11 redist directly, I get (same thing I got trying to install DX9 manually):
Attachments
Screenshot from 2021-11-07 11-51-43.png
Screenshot from 2021-11-07 11-51-43.png (10.94 KiB) Viewed 141219 times
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to run "dxdiag.exe"?

Post by jkfloris »

By default Wine comes with DirectX 9, 10 and 11. Because Wine is not perfect (yet) it may sometimes be necessary to install certain DirectX-DLL files. A full DirectX installation is not necessary and may not work at all.

If you're having trouble getting a particular game to work, create a new topic that includes the name of the game, your Linux and Wine version.
A few tips in advance:
- Make sure your Wine version is the latest.
- Try old games in a 32-bit prefix.
- Install games in their own Wineprefix. This way, changes in the prefix for one game do not cause problems for an other game.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

jkfloris wrote: Mon Nov 08, 2021 4:33 pm By default Wine comes with DirectX 9, 10 and 11. Because Wine is not perfect (yet) it may sometimes be necessary to install certain DirectX-DLL files. A full DirectX installation is not necessary and may not work at all.
Ah, okay. Thanks. That clears things up some. I have one DX9 game that loads, but crashes with the message "CRT not initialized"... which I thought had something to do with the monitor but learned it's the "C RunTime". Trying to run the DX11 version gives me the same error even earlier on load.

So apparently, I need to be enabling some "Libraries". I just don't know which (or what settings to use.)
Wildebeest
Level 2
Level 2
Posts: 10
Joined: Mon Oct 11, 2021 10:33 pm

Re: How to run "dxdiag.exe"?

Post by Wildebeest »

I have some incredibly old games rusting away inside my PC... with that said, let's back this train up.
I try not to use winetricks or install DirectX, DirectX is not perfect yet either, and is not made to be used with Linux.

Check at the terminal window prompt $ wine --version
It would be best to respond something like; wine-6.0.1

With some of my old programs, I run a link that looks like this for example;
wine explorer '/desktop=UBIsoft,1280x720' 'media/myname/drive-path-to-my-programs/splintercell3.exe'

Let's breakdown what I am doing here;
1. Execute wine with an explorer desktop option.
2. Title the desktop window UBIsoft, call it what you like.
3. Set the base resolution to 1280x720 the monitors were incredibly small and I have to use 640x480 for my old Starcraft game. Yuck!
4. Finally point to the program executable, if you installed it to the virtual drive, that would most likely be; '~/.wine/drive_c/Program Files (x86)/Splinter Cell CT/System' for my example.

Should your game crash, execute the line from the terminal prompt $ and when the crash occurs, see what the message states withing the terminal window. That error message will focus what is going on with your Wine version. If it barks at you about 32 bit systems, just add the system variable at the prompt $
WINEARCH=win32
WINEPREFIX=~/.wine32
Then execute the program. This will create a new hidden virtual drive called .wine32 off your home.

Ah! I love the smell of nostalgia in the morning.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Thx for the reply.

Turns out my version is 5.0. I'm not sure that is part of the problem. The tip on including "explorer" in the path before running the games is interesting, but unfortunately, didn't change anything. I get the same result when launching the exe directly from the desktop. And does it matter if the only prefix I have is "~/.wine"? Do I need to install a second copy configured just for 32bit apps?

Thx.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to run "dxdiag.exe"?

Post by jkfloris »

Do I need to install a second copy configured just for 32bit apps?
https://wiki.winehq.org/FAQ#How_do_I_cr ... _system.3F
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Thanks for the follow-up.

I successfully created a 32bit Wine prefix using the command at the provided link, but it didn't resolve the issue. I'm almost certain I'm missing a required Library. Here are the Libraries I have installed (from "user.reg"):

"d3d11"="native"
"d3d8"="native"
"d3d9"="native"
"d3dcompiler_43"="native"
"d3dcompiler_47"="native"
"d3dx11_43"="native"
"d3dx9_43"="native"

This configuration has gotten me closer than anything else (able to get as far as the game menu in DX9 games, but then crash after attempting to start a new game with "CRT not initialized" error mentioned previously.) DX11 games don't get even *that* far, crashing on launch.

TIA
Wildebeest
Level 2
Level 2
Posts: 10
Joined: Mon Oct 11, 2021 10:33 pm

Re: How to run "dxdiag.exe"?

Post by Wildebeest »

Some of the DX9 games menus are messed up even for Windows 10. A good example of this is "Command and Conquer: Tiberian Sun" with invisible menus. This game for example, required me to download a fix patch, made to correct it for Window 10 users. Another game I own in my collect is Tron 2.0, it will install just fine, but in order to play, I have to patch after I install from the original 2 CD set. Check the games you have installed and make certain they don't require a patch. Also be sure to look in the App Database here for any needed tweaks and workarounds. The link to the AppDB is at the top of this forum page on the right.

Sadly some games will have have issues even in their native OS. The game Afterlife by Lucas Arts is one that quickly comes to mind. They admit there is a Windows audio bug, in the help file on the CD, but never did anything to address it. I don't see any mention of your hardware, old or new won't matter. Some games and Wine builds have known incompatibility with brand name drivers, GPU cards, and motherboard graphics. Sadly as we move into the future, these older games will just become more and more incompatible with our new systems.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Thx for the reply, but this isn't a "patch" issue.

I dual-boot Win11/Ubu on the same PC with Windows as my primary OS. Rather than install duplicate copies of my programs on my Linux partition, I simply run the (working) Windows version directly. Wine has always handled this just fine.

A good free example of a DX9 program that runs just fine in Windows but I can't get to run under Wine is "Future Pinball". The interface loads, but you can't play any tables (crashes on start.)

Hardware: Ryzen 3 3100 CPU. GTX970 GPU with nVidia drivers installed. Vulkan installed & working (verified using "vkcube" from Terminal). Using "Lutis" for "DxVk" support.)
User avatar
JoseskVolpe
Level 4
Level 4
Posts: 103
Joined: Sat Sep 04, 2021 9:35 pm

Re: How to run "dxdiag.exe"?

Post by JoseskVolpe »

Avoid installing DirectX from Microsoft
DirectX from Microsoft makes kernel level calls wich aren't supported on Wine, Wine has it's own DirectX implementation (wined3d and vkd3d) wich works up to DirectX 12, it works out-of-the-box and don't require a installation. If you need a workaround in another application, use winetricks in a new prefix to install the needed d3dcompilers or install other implementations such as DXVK and Gallium Nine

You can however still try to use Microsoft's DirectX, but that's not supported and will lead to many problems
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Some of the games I'm running worked just fine under Wine/Vulkan once before. I've simply forgotten how I did it.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: How to run "dxdiag.exe"?

Post by jkfloris »

I dual-boot Win11/Ubu on the same PC with Windows as my primary OS. Rather than install duplicate copies of my programs on my Linux partition, I simply run the (working) Windows version directly. Wine has always handled this just fine.
This may work for some programs, but this method is not supported.
https://wiki.winehq.org/FAQ#I_have_lots ... in_Wine.3F

An installation program often makes changes to the registry.
Wine has its own registry and thus has no idea of the changes made by the installer.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

As I said, these are programs that worked fine this way under Wine once before.
Wildebeest
Level 2
Level 2
Posts: 10
Joined: Mon Oct 11, 2021 10:33 pm

Re: How to run "dxdiag.exe"?

Post by Wildebeest »

Long ago, I use to dual boot, back when when XP was King. The "gimmick" I used, to find what worked and what didn't, was a separate NTFS partition. I had Linux OS / Windows XP / and a 50 GB NTFS partition. This test area was used to send game folders over to test on Linux. If they ran without issue, they would get moved to the Linux EXT4 partition in as-is condition. If they didn't work, I left them on my XP, removed the copy from the test area, and used the CD to install them using Wine. Very few back then had much issue, those few refusing to install I shelved them for later study. I only dual booted for about 6 months. The transition was very smooth.

Since that time, I try not to install Windows games at all. I bought Borderlands 2, Portal 1 & 2 as 100% Linux games when they were on sale. Unfortunately Steam has started using Proton and this doesn't set well with me. Proton is another Wine fork, it means you are buying Microsoft Games once again. Wine has a meaningful purpose, but Steam is abusing it to redirect Linux users back to Microsoft.

Your original question was how to run dxdiag.exe due to a DX9 game installation. I think you need to focus on the game and less about the DirectX. Without additional information on the game, I can only suggest you start over with a fresh prefix. Another bad habit I had was multiple wine prefix within my home directory. All those virtual drives start to take up a bit of room after a while. The game you mentioned "Future Pinball" is found in the app database with fixes. If you click on the "Test Results" they tell you the following;
Everything works.

It need the following .dlls native/buildin

asycfilt.dll -------+
oleauth32.dll +--- extract from dcom98.exe

vbscript.dll ------------- extract from scripten.exe (Also known as wsh57)
dinput8.dll ------------ extract from directx (This will solve the keyboard issues!)

you can also use winetricks vb6run wsh57 dinput8 to do the trick.
Mugsy323
Level 2
Level 2
Posts: 34
Joined: Sat Nov 06, 2021 4:29 pm

Re: How to run "dxdiag.exe"?

Post by Mugsy323 »

Thx for the reply.

You'll need to explain to me like I'm 12 how to "extract" the necessary DLL's from other DLLs. :(

PS: The result of "winetricks vb6run wsh57 dinput8" says it's already installed.
Wildebeest
Level 2
Level 2
Posts: 10
Joined: Mon Oct 11, 2021 10:33 pm

Re: How to run "dxdiag.exe"?

Post by Wildebeest »

Once you obtain the 4 DLL's listed, most programs will search for them within the directory where the executable is installed first. Since I am unfamiliar with this game, I will explain with one of my own. I have Tron 2.0 installed to a folder ~/.wine/drive_c/Program Files (x86)/Buena Vista Interactive/Tron 2.0 within this folder is binkw32.dll for the 32 bit windows Bink movie codec and it is needed to play the movies. If any additional DLL's were needed for this program, I would place them here first. Run the program, if the program fails, move them into the windows main path here ~/.wine/drive_c/windows/system32 and that should do the trick.

The only reason I wouldn't try the windows path first, these DLL's are not required for other programs to run. Should I decide to uninstall later, the unused portion would remain in the windows folder.
Locked