On Kubuntu, at least, the lockup is not being caused by X or KDE. I killed X, and a few minutes the computer still locked up. This might make the problem more tractable. Assuming it's not the kernel, I can try killing background processes and see if it still locks up.