22 May 2008

Portal on Wine

I figured I'd post about a problem I had running Portal under WINE, since I couldn't find it posted anywhere. I dare you to try and solve this just from the symptoms:

  • Quicksave works fine, but quickload goes to a black screen and sits there

  • When a new level loads, you start outside the level and immediately begin falling to your death

  • Video settings are saved when the game is restarted, but key bindings are lost


Give up? I had no idea what the problem was, since by all accounts Portal works great under WINE, including on a friend's machine. I was fully prepared to blame Steam, which thoroughly hates me, but then I discovered the problem by accident when I had the developer's console open: there were a series of error messages about quicksave failing everytime I tried it. It turns out permissions had changed when I remounted a partition: I was running Portal without permission to write to its folder. This means quicksave can't work, and for some unknown reason quicksave fails silently (excluding the developer console output; the screen itself reports "Saved" whether it worked or not). You get the same black screen if you try to quickload without having any quicksave; apparently it doesn't check to make sure you have a save before trying to load it. The permission problem also means keybindings can't be saved in the configuration file; video settings are stored to the WINE registry, so they were fine. I have no explanation for the problem with starting outside the level, but changing the ownership on the portal directory fixed all the problems listed above, including this one. I suspect you would have the same problems under Windows if you ran as a limited user, but I'm not sure.

No comments: