Tuesday, 15 May 2012

Diablo 3 on Ubuntu Linux with Wine!

Be advised that there is a Blizzard Auto-banning Linux clients issue:


I used the following pages’ info to get Diablo 3 from DVD install version 1.0.0 working with Wine 1.5.4 on Ubuntu 11.10 64 bit with NVidia Optimus graphics. I do not issue any guarantee this will work for you.

Wine HQ patches for Diablo 3 here.
Wine from source with patches, info on wine prefixes here.
Some notes on running Diablo 3 beta from benV here.

Here are my steps for installation:
Remove any installed wine:
sudo apt-get remove wine

Remove any winehq repo files from your apt lists /etc/apt/sources.list.d/:
sudo rm /etc/apt/sources.list.d/winehq.list
sudo apt-get update

Install Git core:
sudo apt-get install git-core

Download the wine source from WineHQ’s GIT repo to your home folder/wine-git:
git clone git://source.winehq.org/git/wine.git ~/wine-git

Install dependencies:
sudo apt-get build-dep wine
sudo apt-get install fakeroot

Install checkinstall to manage install
sudo apt-get install checkinstall

Download WineHQ’s patches for Diablo3, where <URL> and <PATCH> is the URL and number for each patch  respectively:
mkdir ~/wine-patches
wget <URL> -O ~/wine-patches/<PATCH>
Patch each successive patch. I used patches 86102-5 and the bug patch 28201:
cd ~/wine-git
patch -p1 < ~/wine-patches/<PATCH>
./configure --prefix=/usr
make
./tools/make_requests

Install from source using checkinstall. Answer yes and make a comment if you want:
sudo checkinstall --fstrans=no --pkgversion=1.5.4

You will end up with a .deb install package in that folder for later use.
Mount Diablo 3 DVD with the unhide option. My /etc/mtab:
/dev/sr0 /media/D3C1.0.0 udf ro,nosuid,nodev,unhide,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500,uhelper=udisks 0 0

Run Diablo 3 installer using Wine:
wine /media/D3C1.0.0/Diablo\ III\ Setup.exe

Wine will ask to install Gecko so that the HTML in the Diablo 3 installer will display, say yes and let it complete before you proceed with the installation. I also had to exit the installer and run wine again to start the game.

I use bumblebee graphics card drivers on my laptop because of the Nvidia hybrid graphics card so I used optirun to get Diablo 3 to use the Nvidia hardware for OpenGL:
optirun bash
wine ~/.wine/drive_c/Program\ Files/Diablo\ III/Diablo\ III.exe --opengl

Troubleshooting:
I used winetricks to install vcrun2008, which is probably needed: 
winetricks vcrun2008 

I initially had errors getting OpenGL to start with error Direct3D9 is not available without OpenGLand these packages might have helped:
sudo apt-get install --reinstall libc6-i386
sudo apt-get install ia32-libs*
sudo apt-get install libgl1-mesa-glx:i386 libc6:i386

The WineHQ page for Diablo 3 does mention game instability but it’s not bad for a day 1 release! Be sure to check for more patches and comments there. I have not had time to re-test these exact steps and because the game performance on my Dell XPS L502X isn’t great. I will try tweaks like D3D registry OffscreenRenderingMode = backbuffer some time.

Wednesday, 21 March 2012

Open source development for the win! Linux hybrid graphics projects

 http://linux-hybrid-graphics.blogspot.com/
 
A new job means a new laptop for me! My employer was kind enough to buy a new Dell XPS L502X for me so naturally I installed a Linux desktop OS (Ubuntu 11.10). This is a pretty sweet laptop you might say, except for one problem: Nvidia does not support Optimus hybrid graphics on Linux.

Currently Nvidia only supports Windows 7 is officially, however there are open source projects that have made progress on supporting hybrid graphics in Linux.

Nvidia Optimus basically makes use of a 'discrete' card for graphics heavy lifting while it can switch to using the 'internal' graphics card (Intel) to conserve power.

Bumblebee, supports Ubuntu and Arch Linux for now (Fedora and openSUSE on the way). It is developed by Lekensteyn, Samsagax, ArchangeGabriel, pvriens(Fedora) and Ximi1970(openSUSE). The second one is IronHide, supporting only Ubuntu, developed by MrMEEE.

Bumblebee's latest version, 3.0 "Tumbleweed", supports power management although I still need to tinker with the settings because the battery lasts 2 hours after initial installation reboot. I am happy that the mini-display port (Intel) works easily in place of the HDMI port (Nvidia). Auto-switching between each graphics processors is not supported *yet* but any graphics intensive application can be invoked using optirun and the power consumption is much better.

I used these instructions with success:
installing-bumblebee-3-0-tumbleweed-on-ubuntu/

Details on the ATI and Nvidia hybrid graphics, Bumblebee and Ironhide projects here:
https://launchpad.net/~hybrid-graphics-linux











Wednesday, 15 February 2012

Sippy's B2BUA and RTPproxy projects
www.b2bua.org

I have spent a little time reading about sippysoft.com's open source projects: SIP B2BUA and RTPproxy which use GPL and BSD-style licenses respectively. On the surface they look great.

Unlike a SIP proxy "the Back2BackUserAgent maintains complete call state and participates in all call requests". Functions include "accurate call accounting, pre-paid rating and billing, fail over call routing".

RTPproxy can help SIP user agents transverse firewalls, "call recording, playing pre-encoded announcements, real-time stream copying and RTP payload reframing". There is a Java client and an Erlang implementation. It can work together with the major, open SIP proxies like OpenSIPS and Kamailio including their own Sippy B2BUA and another one I've never heard of reSIProcate B2BUA.

Sippy hosts B2BUA and RTPproxy on sourceforge.net, use git and are very recently active. This is impressive because these projects initial code commits look to be from around 8 years ago!

It is good to see more open projects for communications that are going strong. I also like look of their licensed product softphone and switch appliance. I hope to get to load testing each and to comparing notes soon. Asterisk and FreeSWITCH have B2BUA capabilities and for Sippy's B2BUA to be unlike a SIP proxy is interesting. The RTP proxy concept is also new to me.