Thursday, 10 June 2010

Ubuntu 10.04 and nz5000 black screen update

I blogged back in May about my experiences installing Ubuntu 10.04 to the hp/C nx5000.

I noted back then that the usual KMS workaround did not do anything. Since then I found out what went wrong. It turns out to be a subtle bug stemming from the way hardware gets installed...

The key is that the problem only occurs in some old laptops. You see, in order to tell if the computer it is running is a laptop or not as early as possible, the kernel checked the state of the "lid". If the lid was open then it was a laptop, if closed then it must be a desktop or, at least, it must be starting up with an external monitor. Makes sense as only laptops have lids to begin with even though desktops still have the indicator (always set to closed) on the inside.

In laptops, the indicator is reading the condition of a micro-switch that the lid presses on. In the nx5000 it is a small spike sticking out by the lid hinge. The lid switches on old laptops were not standardized: sometimes manufacturers used normally-open switches and sometimes normally-closed, and accounted for the difference in the (windows) software. So, assuming that a closed switch means a closed lid will be wrong about half the time.

This bug was fixed days after Ubuntu 10.04 came out - basically by leaving the detection until later (slowing the boot slightly). Technically the lid switch was not supposed to be used for that purpose anyway. When the computer is much more booted, programs are available to correctly detect the lid status as an ACPI event.

The solution, if you think you've run into this, is to install using an external monitor, or the alternate install CD (which is text-based), so you can see what you are doing. Then get the updates.

This sort of thing shows you just what we have to deal with. These days more and more vendors are linux-aware, and have improved their standardization. New computers don't suffer from this.

Afterward: If you seek technical support from me not covered in these posts, please send me an email, or add your question to linux questions. I'll not respond to anonymous comments here at all though I will respond to redirects that are relevant to the blog post.

No comments:

Post a Comment