Brain Dump

A place to store my random thoughts and anything else I might find useful.

Archive for April, 2012

Problems with ThinkPad W520 handing during udev

Posted by mzanfardino on April 6, 2012

Contents

1. Overview
2. Solution
3. Summary

Overview

I’m going to keep this short. In summary, I just bought a ThinkPad W520 and found that when I attempt to install a number of the latest linux distros they all hang intermittently during boot. I decided to troubleshoot this using Arch Linux as my test platform, as I have no trouble booting from the netinst CD nor installing the OS.  However, after the OS is installed I have found that the system hangs more than 50% of the time during “Waiting to process udev events”.  Naturally I assumed the problem lay in udev. As of yesterday (April 5, 2012) the version of udev installed from core is 181-5. I opted to try udev from testing (udev 181-9). This did not improve things.

Solution

With some help from folks in #udev I was able to disable asynchronous processing and enable debugging from the kernel options in grub-legacy.  This helped me to identify a key clue: it never seemed to hang at the same spot.  I reasoned that if it was in fact udev that was failing, and given that I disabled asynchronous processing it seems highly unlikely that the problem was in fact with udev.

This led me to think of hardware, such as RAM or CPU as the source of the problem.  However, after several successful passes with memtest86+ 4.20 I was convinced that there was no problem with RAM.  This left the CPU.

After scouring the web for days and fighting with this issue for nearly a week, I finally came across a forum post for Fedora that suggested perhaps the problem lay with Intel Virtualization Technology being enabled.

And there it was: I’d turned on Intel-VT when I first booted the machine and never ran it with Intel-VT turned off. After turning Intel-VT off I have been able to successfully boot to Arch 100% of the time!

Summary

As udev has nothing (directly) to do with Intel-VT, it’s highly unlikely that udev is the problem. It’s more likely udev is loading a module (it has been suggested to me by a friend of mine Ewen Marshall that  kvm is the likely suspect) which is the real culprit. I will be performing tests this weekend in an effort to isolate the offending module and hopefully then open a bug with the developers of the module in an effort to help solve the problem.

ED – I found this http://forums.lenovo.com/t5/Linux-Discussion/64-bit-Linux-W520-amp-nVidia/td-p/577789 recently which suggests that perhaps it’s localized to VT-d (and not the entire VT) in combination with discrete video.  I happen to be running with discrete video enabled in BIOS as well, and haven’t (yet) tried to boot with VT enabled and VT-d disabled.  I will try that in addition to my other tests this weekend and will report back later.

ED – I can confirm that the issue appears to be related to the VT-d.  I have enabled VT and left VT-d disabled.  I will begin further research as time permits.

Posted in Arch Linux, linux | 3 Comments »