Mesa-3D
Mesa-3D copied to clipboard
GTA 4 can't start
With wined3d the title video is played, then there is a black screen for 4 minutes (suspiciously exact), then the main menu shows up. The game renders correctly, but it's not really playable at 10fps.
With nine the game window shows up behind everything else in wrong resolution (1280x720 instead of 1280x1024), the title video is played, then it stays black forever. Well, maybe not forever, but I killed it after half an hour.
Which graphic card ?
One possibility is that this is linked to shaders getting compiled. Nine does compile them at shader creation, while mesa opengl delays to first use.
If using a driver with cache, the shaders are compiled once, so relaunching the game would be fast after the first time. But it's surprising the compilation would take that long.
The game could also be blocked, waiting for some window message. Is the game using some cpu ?
Try disabling Nine CSMT with csmt_force=0
.
Start wine from terminal. If possible run the game in a window, so you can monitor other terminals/programs.
Use top
/htop
to see if any program is using a lot of CPU while Nine is hanging. (Aka, does it burn in an endless loop or just waits for eternity.)
If it burns CPU then try perf top
and see what is the top function.
Use WINEDEBUG=+relay
to see if wine is cycling at same function(s). (Slow and might not work.) Check Wine Debug Channels for more fun.
Use NINE_DEBUG=all
(needs mesa compiled with --enable-debug
) to see the last Nine call.
If the game runs fine in a window, it might be another case of #243. IMHO setting wine to win7 might disable that "misfeature".
Also, might be good idea to try the oldest mesa build that you can find to work on your system (in case it is a recent regression).
My graphics card is AMD R9 270x. I always configure wine to emulate a virtual desktop and run games fullscreen inside that desktop, because I hate it when the screen resolution is not the monitor's native one. GTA 4 has no option to run in a window btw.
I did some more tests, and here's what I found:
The 4 minute wait at the start looks like a timeout for the gfwl service, as it ends with this message on the console: 0172:err:wininet:open_http_connection create_netconn failed: 12029 During those 4 minutes 'perf top' shows 33% in wined3d.dll.so wined3d_cs_mt_finish() with wined3d, nothing with nine.
I tried what happens if I do nothing, not even move the mouse, and it worked. After the timeout the main menu of the game shows up normally, but the game's window is behind everything else, even the desktop icons, and it's impossible to bring it forward. I managed to get the steam client out of the way, and I could play the game. It's 15-20 fps with nine, which is still not very good, but it's much better than wined3d.
If I do anything during the timeout period, the game's window either remains black, or vanishes.
Are you running wine-3.18/19/20 ? There is a known bug that prevents steam from connecting. Might be related.
I have wine 3.20, and steam works fine.
https://bugs.winehq.org/show_bug.cgi?id=45948 is closed in wine-3.21, so the 4 minute wait might be fixed in newer wine.
As for the Nine problem, it looks like the original problem - the hang, is not Nine related.
If I understand correctly the problem is that in the virtual desktop the game image is drawn under all other windows.
I now upgraded to wine 4.0-rc5, and the 4 minute wait is indeed gone, the menu shows up right after the title video. With nine the game window still remains black after the video if I click into the window before the menu shows up, so I learned to not do that (btw when this happens it's the second LaunchGTAIV.exe process that has to be killed in order to stop the game).
I helped a friend to get acceptable performances with GTA IV on his APU, it may be a little bit off topic, but I would share some tip, to help understanding if this is a nine problem or a wine problem with gta or a driver problem
- install xliveless to fix some problems with GFWL
- winecfg: uncheck "allow the window manager to control the windows" and never switch to other windows when running gta
- use the amdgpu driver, to get better speed and stability
- downgrade to patch 4, which nearly doubles the fps (see https://pcgamingwiki.com/wiki/Grand_Theft_Auto_IV#Downgrading )