Wednesday, 30 September 2009

..but it works with Windows...

When dealing with Linux kernel bugs I frequently hear the phrase "..but it works with Windows..". This can be rather galling, why can Windows work correctly when Linux seems to fail? Well, there are several reasons.

First of all, when Windows is shipped with a PC it generally has a whole load of extra drivers bundled with it to handle weird non-standard stuff, such as hotkey handling, wireless/bluetooth kill switches and so on. Some OEMs ship new PCs with the Windows install disc and a CD/DVD with all the extra drivers. Other OEMs ship PCs with a magical restore partition that installs Windows and it's extra drivers in one go to save the hassle of messing around with all the extra drivers. Sometimes these drivers just work around non-standard PC weirdness - this can be where Windows works and Linux does not.

Secondly, Linux relies on the BIOS ACPI tables being correct. For example, yesterday I looking into a bug where a N280 Atom based machine could only run at 1.333GHz when the processor is in able to run at 1.666GHz. For some reason Windows worked correctly and Linux did not. Some digging around in the BIOS and the ACPI driver showed me that the Linux ACPI driver was correctly reading the BIOS settings and it was a buggy BIOS. This seems to indicate that somehow Windows was ignoring this incorrect data. What do you do in these cases? Apart from booting with acpi=off (which is a horrible workaround) I suppose one just needs to ask for a BIOS fix to such issues.

There are other reasons too, but the first two are generally the main causes.

Over time, the kernel just gets more and more weird workaround quirks added to fix such issues - but the crux of the matter is this - Windows has the same kind of kludges but generally they are ironed out before a PC hits the high street - and a lot of these Windows kludges don't get fed back into the mainline Windows installation because it's closed source and it's easy for PC manufacturers to just add on their own hacks to the OS.

Meanwhile, I will continue to try and sort out BIOS problems and to make sure Linux works out of the box...

No comments:

Post a Comment