I'm not exactly a gamer. I play two games, each of them approximately 6-7 times a year. One is natively available for Linux and these days even Open Source: Return to Castle Wolfenstein: Enemy Territory, an online 1st person shooter. The second game I have to play through wine: Warcraft III: The Frozen Throne. And if I could, I would be playing a third game: Command & Conquer Generals: Zero Hour. Which, according to Wine's App DB should work fine. Doesn't for me, unfortunately - despite spending more hours on getting the game to work than I would play it this year...
Anyway, let's move to some (Wine) Proprietary-Gaming-on-Linux tips you'd need. Both with and without Nouveau, by the way.
RTCW and similar old, closed games
Return to Castle Wolfenstein on Linux. You want sound? And you have a modern Linux? Your game depends on an ancient sound driver system called oss... You need to install the alsa-oss layer and make sure you have the kernel stuff loaded for oss. Oh and you can forget about running both a music player and RTCW or another game which requires this compatibility, won't work. It is one or the other!Now, the commands. Install whatever oss stuff you can find:
zypper in alsa-oss alsa-oss-32bitthen add to your /etc/rc.d/boot.local:
modprobe snd_seq_ossThat should give you all the auditory gore you need ;-)
modprobe snd_mixer_oss
modprobe snd_pcm_oss
update: I didn't know about aoss which provides an even better solution for the sound. It is simple: start et with "aoss et.x86" and that should already take care of it... It mixes now with other sound as well so you can play music while you frag away. Read more here.
Does the game work with Nouveau? Sure, but I experience occasional instability, as in - hard freezes of the system. I recommend enabling the sysrq keys and using REISUB to avoid data loss. I'll be waiting a bit until it is all more stable until I play that game more.
Gaming with Wine
I'm going to assume you managed to purge the proprietary NVidia driver from your system (yes, this can be quite hard actually) and have nouveau installed and working already. That gives you 3D effects with Compiz/GNOME Shell/KWin/etc and some other basic openGL stuff. Not enough for windows games in wine, however.I wanted to play Warcraft III and it took me forever to get that working. Turns out error messages like "Can't load Data.dll" or Put the DVD in the drive have little to do with the actual problem. Most of the problems turned out to be related to missing openGL stuff. I had to install the experimental Mesa drivers developed & maintained by Johannes Obermayr in his home project. You should be able to download his Mesa here (although at the time of writing there was a problem with OBS and it gave an error). You will also need some other packages so I suggest to switch the systempackages to those from his repository (see screenshot).
Getting it to work
Once you've installed all new nouveau-stuff, reboot and configure wine by modifying user.reg (in ~/.wine) adding the following under the "Direct3D" header:"OffscreenRenderingMode"="backbuffer"like this:
[Software\\Wine\\Direct3D] 1331547889PlayOnLinux and winetricks both have this as options you can enable via their GUI's.
"DirectDrawRenderer"="opengl"
"Multisampling"="enabled"
"OffscreenRenderingMode"="backbuffer"
"RenderTargetLockMode"="auto"
"StrictDrawOrdering"="enabled"
"UseGLSL"="enabled"
"VideoMemorySize"="256"
For sound to not block your soundcard, use pulse-audio and its alsa plugin:
zypper in alsa-plugins-pulse alsa-plugins-pulse-32bit
Conclusion
It is all rather painful but in the end it's possible to get nouveau to work with Wine (and other) games. But I don't recommend moving over to nouveau if you play games and if you're not desperate to get rid of proprietary drivers (and you usually only are if you want a newer kernel for its hardware support or greatly care about that Freedom stuff). It's not completely ready yet and will give you some issues.On the other hand, we're getting there. I'm quite happy to see progress in the area of free drivers for both NVIDIA and AMD graphics hardware. If only NVIDIA would be helping the efforts to create open drivers...
Have you tried using aoss instead of loading the OSS emulation modules?
ReplyDeleteI have not, excellent tip. Will update my blog post.
DeleteGreat post! I was having the missing Game.dll issue and wondering if I was the only one. I didn't want to play the game bad enough to actually look out for a solution, but I did try the packages in X11:Xorg repo. Is there something different in that repo you mentioned? Would you recommend switching to it?
ReplyDeleteThanks in advance!
I am not sure but as far as I can tell only the repo I mention has all the 3D stuff. I have been using the X11:Xorg repo but couldn't get the games to work there...
DeleteBut I don't know that much about Xorg stuff so I might very well be wrong :D
for ET and similar games I'd recommend et-sdl-sound (injects some sdl/alsa function calls into the binary)
ReplyDeletehttp://nullkey.kapsi.fi/et-sdl-sound/
Works great, and I can other plays simult. just fine.
If you want open source Wolfenstein: Enemy Territory based on SDL, with working sound and compatibility with 2.60b mods, then please have a look at http://www.etlegacy.com or http://etlegacy.com/projects/etlegacy/wiki/Changelog for the list of changes done so far.
ReplyDeleteIt is an amateurish project, but it is moving forward quite rapidly.
Don't forget Interfaces like Winegame/winestuff there's also Q4Wine, not sure if you have it in the repos there since I use Arch but worth a look. :)
ReplyDeleteWhen I installed Warcraft for the last time on oS 12.1, I actually played an hour until I noticed that I'm using the Nouveau driver. Great developments happening there.
ReplyDeleteI use PlayOnLinux (http://www.playonlinux.com/en/) to play windows games such as Starcraft 2. Its much easier to manage wine versions and windows games.
ReplyDelete