HOWTO: Fix StarCraft II Crash On Login Under Wine And Ubuntu 10.04 (Lucid) / 10.10 (Maverick)

Post date: 30-Sep-2010 16:36:35

There is a new security feature in Ubuntu Lucid / Maverick in the form of a kernel variable which prevents user processes from scanning other processes' memory. This feature is intended to protect the user from malware hooking itself to other processes from e.g. compromised Firefox. While a good thing, it interferes with some of the hackwork Wine needs in order to run StarCraft II properly. The problem presents itself as a crash with "ACCESS VIOLATION" right after we input a username in the login screen for and we press Login. To avoid this we need to turn the aforementioned security feature off. In order to do that execute the following in a Terminal:

sudo sysctl kernel.yama.ptrace_scope=0

Also if you do not want to risk compromising security turn the feature back on after you finish playing by running the opposite in a Terminal:

sudo sysctl kernel.yama.ptrace_scope=1

In the future when time is available I will mash up a Bash script to manage this automatically around launching StarCraft II.

NOTE: There are ways to make this security setting permanently off but I have intentionally skipped them since it is a BAD idea to make your system less secure just to run a game.