I'm writing about a problem i recently noticed with wine, nvidia gpu and fullscreen 2d games.Basically the problem is as follows - i am running arch with the latest kernel and nvidia drivers on Thinkpad T61 with NVidia Quadro NVS 140M. I have a problem with old 2d games like Red Alert 2, Baldur's Gate, Icewind Dale, Diablo 2, Heroes 3. All of these games do not support the native 1440x900 resolution of my screen and all of them work fine in window mode but crash if fullscreen is selected. I managed to get some of them working by making them work at higher resolutions. For example although Red Alert 2 does not support 1440x900, it can be easily made to work at that resolution and after i applied the necessary settings it worked. The same was with Heroes 3 - by default it does not support 1440x900 and it used to work only i window mode but there is a HD mod which allows it to run in higher resolutions and after i applied it it worked perfectly in fullscreen. I haven't thested Baldur's Gate and Icewind Dale but i think it will work there too.
The problem is that i cannot use this approach to all games - for example i must run Diablo 2 and Starcraft in their original resolutions. I read somewhere that the problem is that wine can only change between the resolutions described in the xorg.conf file and if doesn't find the necessary resolution the game will crash or will only take the portion of the screen that is its resolution - for example when i play Starcraft rather than stretching it to the whole screen it simply takes 640x480 pixels of my screen and the game is displayed in the top left corner of the screen leaving everything else black.
I didn't have this problem before - it is something new though i'm not sure since when do i have the problem because i rarely play games. As for the idea that the problem may be related to the resolutions defined in the Xorg.conf file, my xorg.conf is automatically generated by the nvidia installer and there are no resolutions defined there.
The nvidia driver only exposes non-native resolutions via xrandr1.1, but wine recently switched to xrandr1.2, that's the problem.
Maybe it's possible to recompile wine to only use xrandr1.1, I haven't investigated. Or you downgrade to a wine version before the switch to xrandr1.2, that would be wine-1.5.8 or older.
Last edited by Gusar (2012-09-13 12:15:37)
But i am using Wine from the arch repositories. Is there another way to deal with the situation or i am going to have to compile wine with a custom prefix (say mi home directory) and use it for the affected games while using the regular wine from the arch repositories for my other games?
Learn about the wonders of ABS. Or the Arch Rollback Machine.
Thank you all for the replies. Unfortunately downgrading wine to 1.5.8 did not help - it just the problem wirder for some games. How can i upgrade to NVidia 304.48 - the current version in the Arch repositories is 304.43. Should i wait for version 304.48 to arrive in the repos?
304.48 is a beta release, so I don't think it'll be in the repos. But just fetch the 304.43 PKGBUILD via ABS, change the version number, update the md5sums and then create packages.
There's nothing in the 304.48 changelog that would indicate stuff regarding non-native resolutions has been fixed though.
Thanks for the reply. Perhaps it will be better if i posted this on the wine forums.
Try nvidia 304.48
I remember that issue, with the 302 series.
I have Nvidia 304.48 installed and the problem still exists (it also happens with Catalyst). This didn't occur with 295.59 using the same version of Wine.
The solution is to run the game in a separate X session, created specifically for the game. Try this simple command in the folder with Heroes3 game, for example:
sudo X :2 -ac -terminate & sleep 4 & DISPLAY=:2 nice -20 wine Heroes3.exe
It works for me just fine. Otherwise I have the same problem in the fullscreen.