The Problem:
With the following combination, Half-Life 2 kept locking up on startup with the console message "Failed to write block to device".
- Kubuntu Hardy Heron AMD64 bit, using ALSA with dmix to mix sounds
- Crossover Games ia32-crossover-gamesdemo 7.0.0-1 debian package (I think this is based on Wine 0.9.55), configured for ALSA only
- Steam windows client rev date 5/5/2008, api v007
- Half-Life 2 Exe version 1.0.1.0 (valve), Exe build: 12:16:15 Apr 6 2006 (2707) (downloaded via Steam)
Looking further I found that Wine was issuing the following messages at startup:
ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default:0
This seems to be related to a bug in the Wine alsa driver, documented here, which was fixed in version 0.9.56.
https://bugs.launchpad.net/wine/+bug/195507/+viewstatus
The Workaround:
I installed Wine 0.9.59-0ubuntu4 from the Ubuntu repository. Then I renamed the file /opt/cxgames/lib/wine/winealsa.drv.so to /opt/cxgames/lib/wine/winealsa.drv.so.orig (just in case), and copied the file /usr/lib32/wine/winealsa.drv.so to /opt/cxgames/lib/wine/winealsa.drv.so. After Half-Life 2 works great!
--RT
My /etc/asound.conf in case anyone is interested.
pcm.ossmix {
type dmix
ipc_key 1024 # must be unique!
slave {
pcm "hw:0,0"
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito.
rate 48000
}
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
}
pcm.!default {
type plug
slave.pcm "duplex"
}
pcm.duplex {
type asym
playback.pcm "ossmix"
capture.pcm "input"
}
pcm.input {
type dsnoop
ipc_key 2048
slave.pcm "hw:0,0"
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}