Linux Might Need To Claim Only ACPI 2.0 Support For BIOS 129
jones_supa writes Some of us remember the story of why Linux kernel responds "False" when ACPI BIOS asks if the operating system is Linux. We have found yet another case where mimicking the Windows behavior instead of writing to the spec is the right choice if you just want your machine to work properly. The ACPI spec defines the _REV object as evaluating to the revision of the ACPI specification that the OS implements. Linux returns 5 for this, because Linux actually tries to implement ACPI 5.0, but Windows returns 2 (ACPI 2.0), possibly due to legacy reasons. Linux kernel expert Matthew Garrett discovered that still a fair amount of brokenness appears when 5 is returned as the revision, including a Dell machine which left the sound hardware in a misconfigured state. He is proposing a kernel patch which simply reports _REV as 2 on all x86 hardware.
Blame the market (Score:4)
MS had a large portion of the market so big players trying to launch products on a tight schedule or low budget will quickly ignore specs they don't believe will be required for the launch. In this case Windows forces a lower spec. The problem with that is you'll rarely see companies go back and address the issue until there's a fire burning under their behind.
The patch should fail to be included (Score:1)
Re: (Score:3, Insightful)
What's the point of following the spec if no hardware does? The goal of an operating system is to run.
Re: (Score:1)
You haven't taken much Computer Science. The goal of all software is to be correct.
Re: (Score:1)
What's the point of following the spec if no hardware does? The goal of an operating system is to run.
What's the point of following the spec for hardware manufacturers if no software uses it?
Re: (Score:1)
The root-cause is that these days PC software is designed to work with Windows, not to respect standards. For example, I only got UEFI booting Linux to work on a netbook, after looking what Windows did. This was completely non-standard, but apparently Win8 could cope. Fortunately it was also easy to replicate.
Add a parameter? (Score:5, Interesting)
2 might be the right default, but shouldn't we at least allow acpi_version= on the kernel cmdline for people who want to take advantage of the feature spread between 2 and 5?
Not everybody has broken Dell crap, right?
Re: (Score:2)
TFA also states HP as an offending vendor? It's not very clear.
Sounds like this could be vendor agnostic?
Re: (Score:2)
The kernels default should be the revision the kernel implements. If the kernel implements five the value should be five. A report_acpi_ver= flag seems like a perfectly reasonable solution, but it should be up to the distros to override that with their boot loader configs; where someone might actually see it. If its really such a common problem that it makes sense to do that widely out of box in the first place.
Software should do the least astonishing thing, and I think having the kernel inaccurately rep
Re: (Score:2)
The kernels default should be the revision the kernel implements. If the kernel implements five the value should be five. A report_acpi_ver= flag seems like a perfectly reasonable solution, but it should be up to the distros to override that with their boot loader configs; where someone might actually see it. If its really such a common problem that it makes sense to do that widely out of box in the first place.
Software should do the least astonishing thing, and I think having the kernel inaccurately report acpi support would qualify as astonishing.
Isn't working properly the least astonishing thing?
Re: (Score:3)
No. It might even be the exact opposite of the least astonishing thing.
Re: (Score:2)
The kernels default should be the revision the kernel implements. If the kernel implements five the value should be five. A report_acpi_ver= flag seems like a perfectly reasonable solution, but it should be up to the distros to override that with their boot loader configs; where someone might actually see it. If its really such a common problem that it makes sense to do that widely out of box in the first place.
Software should do the least astonishing thing, and I think having the kernel inaccurately report acpi support would qualify as astonishing.
Isn't working properly the least astonishing thing?
You must be new to computers.
Re: (Score:2, Informative)
It's been widely known for more than a decade now that almost all ACPI implementations from almost all manufactures are bad, if not completely broken.
Microsoft doesn't even bother humoring them. They roll their own power management code and maintain an internal database/whitelist/blacklist of machines and fixes/cludges.
The above probably leads hardware makers to be complacent. They'll jiggle their implementation enough until the machine boots windows, then they ship it.
Yes, they ship stuff that doesn't mee
Re: (Score:2)
They'll jiggle their implementation enough until the machine boots windows, then they ship it.
It's more than that. You have to verify that all hardware is initialized correctly, you have to make sure that suspend and hibernation work 100%, that power management doesn't go haywire, and many more QA things.
However I suspect the BIOS ACPI implementation is not only tested under Windows but built for Windows and its quirks from the ground up. They don't only grab the Intel spec but they monitor how Windows behaves in different scenarios.
Re: (Score:2)
2 might be the right default, but shouldn't we at least allow acpi_version= on the kernel cmdline for people who want to take advantage of the feature spread between 2 and 5? Not everybody has broken Dell crap, right?
My prediction is that this will turn out to be another case of using a Microsoft tool, in this case to create the DSDT tables in ACPI, and the tool was deliberately designed to bone Linux.
Re: (Score:1)
Not everybody has broken Dell crap, right?
Not all Dell is broken crap any longer. Dell went private awhile back and they don't have to answer to a 'bottom line' band of shareholders any more. As a result, their product is improving significantly. It's players like Apple who have to watch their market price now.
Lets get crazy (Score:3)
How about reporting yes to Linux and keeping the correct 5 as a response.
Then return all that dont deliver a working computer as broken.
Because whats the use of having those questions if everybody delivers the same answer ?
Re: (Score:2)
Re: (Score:2)
Do you think Google or Facebook buy millions of server nodes from Dell or HP? No. They just order direct from the manufacturers in China and Taiwan (e.g. Foxconn, Pegatron, Compal, Quanta) that companies like Dell and HP use.
Re: (Score:2)
Do you think Google or Facebook buy millions of server nodes from Dell or HP? No. ....
Actually "Yes", no matter what you fabricate attempting to counter facts.
Re: (Score:2)
Google probably does. Facebook came up with the Open Compute project, so a lot of their servers are custom designed for their specific niche. I don't know who actually manufactures them, but they are probably made especially to order.
Re: (Score:2)
Unlikely, Google reportedly has designed its own hardware [cnet.com] for a long time.
Re: (Score:2)
They "designed it" to a similar degree to what someone like HP or Dell does. Or Alienware. Or whatever. They ask the Taiwanese "build me this" and they built it.
I guess most of the work Google did was regarding the power supply, cooling architecture, etc.
Re: (Score:2)
http://www.bloomberg.com/bw/ar... [bloomberg.com]
Almost 50 percent of Quanta’s revenue comes from HP, data compiled by Bloomberg show. It’s also selling hardware directly to Google (GOOG) and Amazon.com (AMZN), which require massive collections of servers to keep their websites humming.
So you were saying?
Re: (Score:2)
As for Facebook:
http://arstechnica.com/informa... [arstechnica.com]
Like Google, Facebook designs its own servers and has them built by ODMs (original design manufacturers) in Taiwan and China, rather than OEMs (original equipment manufacturers) like HP or Dell. By rolling its own, Facebook eliminates what Frankovsky calls "gratuitous differentiation," hardware features that make servers unique but do not benefit Facebook.
"Most of our new gear is built by ODMs like Quanta," the company said in an e-mail response to one of our
Re: (Score:2)
How about reporting yes to Linux and keeping the correct 5 as a response.Then return all that dont deliver a working computer as broken.
You have 185 generic PC desktops sitting on pallets in a warehouse. Your boss wants them installed on schedule with a minimum of disruption and expense. Suck it in. Get it done.
Re: (Score:2)
Oh, Goody! Another kernel command-line switch (Score:2)
append fake_ACPI=2 to wherever your kernel command-line hides. At least this is easily done and more importantly, people can know it might help.
Whether Linus will accept another switch is a totally different question -- Does his famous "The kernel will not cater for broken hardware" extend to BIOS firmware?
Re: (Score:1)
Shouldn't systemd handle this?
who runs sound on their servers?
Who runs linux on their desktop?
Windows 10. Resistance is futile.
Re: (Score:1)
Re: (Score:1)
Wrong way round. it should default with a configuration what will work everywhere (ACPI=2) and use kernel command-line options for the relatively rare hardware that actually supports higher spec.
Re: (Score:2)
What makes you think you're able to programmatically determine that and return it to the BIOS?
I've been through this myself. (Score:5, Interesting)
I had a Toshiba laptop where none of the built-in devices like sound or network worked if you booted with ACPI on. It turned out the fix was to fool the bios into thinking it was running Windows by editing the DSDT code. The firmware on this machine actually shut off all the peripherals if it thought it was running some version of Linux.
I've always been mystified as to why Toshiba's engineers did this. And even having that capability in ACPI seems architecturally suspect. I can't see any legitimate reason for the machine's firmware to second guess what to do based on which OS is running on it.
Re:I've been through this myself. (Score:4, Interesting)
Now THAT would make me apt to return the computer for a refund and buy something different.... It's one thing for Linux to support a newer level of ACPI that many popular vendors/machines don't behave well with. (I get the idea of reporting a value of 2 instead of 5 to make things work in these cases. Why not? It's a one character solution to the OS misbehaving on those systems. Just make a note as to why it's done and allow users to edit a file to change it to 5 for full ACPI functionality in cases where it will work.
But to have a computer that willfully disables hardware because it thinks you're "trying to run something other than Windows"? That's done on purpose by Toshiba, if you ask me -- and was a ploy to ensure only Windows stays on the machine. (Maybe for tech support reasons, so they don't have to worry about fielding calls from users of Linux or other OS's who they have no support database built for?) I'd prefer not to use something designed like that.
Re: (Score:1)
So maybe you should RTFA.
Re: (Score:2)
I did read the article. What's your point?
Despite the article's claims, the discussion directly below it makes it pretty clear that a lot of finger-pointing is going on around the whole thing. Some people assert that "firmware should never try to adjust anything to get around an OS bug", yet that's been commonplace for well over a decade now!
(Anyone remember the old PC BIOS's which would require you toggle "Plug and Play" to Yes for a Windows '9x type OS, or select "No" for others? How about the ones that l
Re: (Score:2)
Did not Matthew Garret hi-light Toshiba as idiots before for bios secure boot tables mix ups.
It raised a do not buy flag on Toshiba products with me.
Re: (Score:2)
I've got a Lenovo laptop where the firmware doesn't initialise the touchpad if you cold boot to linux. It's a slight annoyance. Strangely, it does work after a reboot. As I keep it on suspend, it's only a slight annoyance - just means that if I ever turn it right off, I have to then turn it on and reboot from software to get the touchpad back.
The problem is the same as everyone is complaining about: Like the vast majority of laptops, it was designed to run Windows. It was tested running Windows - certainly
Device Tree vs ACPI (Score:2)
I now wonder if it's a good idea to add ACPI to the ARM architecture. The device tree have the advantage to be far simpler and more robust since it can't change depending on the operating system loaded.
Why Linux kernel responds False .. (Score:5, Informative)
Sent: Sunday, January 24, 1999 8:41 AM
To: Jeff Westorinen; Ben Fathi
Cc: Carl Stork (Exchange); Nathan Myhrvold; Eric Rudder
Subject: ACPI extensions [edge-op.org]
"One thing I find myself wondering about is whether we shouldn't try and make the "ACPI" extensions somehow Windows specific.
It seems unfortunate if we do this work and get our partners to do the work and the results is that Linux works great without having to do the work.
Maybe there is no way to avoid this problem but it does bother me.
Maybe we could define the APIs so that they work well with NT and not the others even if they are open.
Or maybe we could patent something related to this."
-------
A possible bug in Foxconn boards BIOS affects Linux ACPI [ubuntuforums.org]
Foxconn Does Hate Linux Support [phoronix.com]
Probably laziness at work (Score:2)
Never attribute to malice that which is adequately explained by stupidity. The firmware developers probably never finished the "5" case in the "level" switch, and were still fine to ship the laptop with Windows. They were not obligated to do anything else to bring this to the market in any practical way.
I've seen developers write the minimum amount of code that will "make it just work", and ignore what will make it "actually right". This is not only Linux's issue. Even Windows had to do crazy things, like W
Re: (Score:2)
Windows slop? (Score:1)
Re: (Score:2)
What, he said. And everyone should just drive a Volkswagen or Ford Pinto (or model T) and they should be all the same color because you having a choice is not a concern.
But it appears this problem, if the author of the story is correct, is not in effort making linux like windows, it's in making linux act like windows in order to avoid deliberate sabotage from the firmware. So if we wanted to make your statement a little more correct with the actual situation, it shoudl go something like this.
Re: (Score:2)
To be fair, it's not clear that there is deliberate sabotage. The more likely reason is that the hardware was only tested under MSWind.
Re: (Score:2)
Re: (Score:2)
The problem is, if reporting 5 instead of 2 doesn't work, because of a defect in BIOS/Firmware, it isn't the fault of LINUX, it is a fault of defective by design hardware.
IF Dell doesn't support 5 properly, then it is defective. PERIOD. Buy the product, and return it defective to the place of purchase. Either that, or find a computer that actually works at 5, and post it on a hardware compatibility list somewhere, along with naming and shaming DELL for having defective hardware.
Re: (Score:2)
Yes, I have a 386 handy, and I want to run a modern version of GNOME on it!
Don't YOU be an ass. Expecting hardware to perform outside of its capability is stupid. You know it isn't going to work, so quit your bitching. Expecting a Dell that runs only at 2 properly to run at 5 is expecting too much. A Dell saying it runs at 5 properly, that doesn't, means it is defective, and you have a choice to run it at 2, or return it as defective.
It would be much easier to find a system that does run 5 correctly.
Re: (Score:2)
Sometimes you have to make do with the hardware you have.
Re: (Score:2)
Partly because it's a stupid solution. The problem is that hardware manufacturers making commodity parts do the minimum work available, essentially ignoring the standard altogether. The true de-facto standard is to do only what Windows expects and nothing more or less. Especially if you're getting parts intended for the consumer market.
This is also a PC thing. PCs are just horribly designed, mostly because they are a result of a decades long process of feature creep rather than any thoughtful design pro
Re:There is already a solution. (Score:5, Interesting)
>essentially ignoring the standard altogether.
Let me regale you my favorite version of this. It must have been 12 or 13 years ago now, I was maintaining an educational linux distribution called OpenLab (we did some awesome stuff - look it up) when one of our big customers bought a large consignment of P3 machines to use as thin-client class-room servers.
The things just wouldn't work... they would start booting the live CD and halfway through the bootup just reboot again, over and over and over.
So they sent us one to figure out what was going wrong. I spent ages trying to figure out what on earth could be causing it, eventually resorting to disabling drivers one by one until it booted up to track down the issue.
It turns out it was a watchdog card driver causing the problem. Which is odd because the machines did not HAVE watchdog cards. Now having a starting point I dug further. It turns out the cheap motherboard manufacturers had added an onboard sound card, but hadn't bothered to get a unique PCI-ID for it, they just used one from an intel watchdog card assuming nobody would install one. Running windows this would not be a major issue since nobody would load the driver for one.
On Linux though the plugnplay layer picked up the device ID and loaded the watchdog card driver thinking there is one. The driver fires up, waits for the scheduled watchdog ping - and when it didn't get one (because the card wasn't really there) after 60 seconds (Back then booting up in 90seconds got us lots of praise, below one minute was unheard of) it would reboot the machine -exactly as it's supposed to.
Never underestimate the level of stupid that hardware companies can come up with. I had to build a hotpatch version of the distribution which would disable the watchdog card driver if it detected that motherboard (which by the way is not that simple to do in very early-boot init scripts that have to run before drivers start loading).
Re: This is so Republican (Score:1)
Re: (Score:1)
You are replying to an insane person. You are wasting your time.
Re: (Score:1)
The lunacy around here gets stronger every day.
Re:Front page news (Score:5, Interesting)
This isn't really at the driver level yet. It's at the bios level where the OS can configure the devices to some degrees. The ACPI (Advanced Configuration and Power Interface ) level dictates the revision to be used in allowing the kernel to change settings and the level of control. It's basically why you do not have to go into the bios and change settings to resolve IRQ or DMA conflicts or worse, crap open the case and flip jumpers anymore.
If the spec level is implemented properly, the bios will default to a non-conflicting configuration and all most drivers will need to do is query that configuration and use it. In some cases, such as workarounds for sound cards, the IRQ and DMA will need to be changed and the APCI level will dictate how and what can be changed. As stated by the article, in Dell machines the sound hardware is left in a misconfiguration state which would require the driver to explicitly use the APCI spec to make it useful to the user under linux.
But it's way more useful then that. The brightness of a monitor for instance is controlled via the ACPI interface so you don't have to set it in the bios. In the article, the author claims that HP machines report fewer brightness levels for the back light of the LCD screen.
However, the author thinks this is by design and intended to sabotage the linux installs. I'm thinking it may be more likely that they just do not put enough effort into the levels that are not commonly used and allow bugs to persist. Of course it could be a malicious firmware author who is upset over having to make this stuff for linux and sabotaging it. It's hard to tell at this point.
Re: (Score:2)
I suppose you meant 'crack' open the case and not 'crap' it open, but from now on, 'crap' is the word that I will use to discuss opening a computer case.
Re: (Score:1)
No he meant "crap". If you regularly opened a computer case, you'd know exactly how many times you screamed CRAP! and it's variants :D
Re: (Score:2)
Whenever I have to open a computer case I dress in nothing but a large overcoat.
Then when the case is opened I yank the coat open and "flash" the BIOS !
Re:Front page news (Score:5, Informative)
Hi, I'm a UEFI BIOS/Firmware engineer that is very well plugged in to the heart of the PC industry and I can tell you that the reasons behind this are not malicious at all. I am fortunate because I am one of the engineers that write code that is broadly applicable to many different motherboard designs. Me and my colleagues have reasonable release schedules similar to other software projects of similar complexity. We have the time and the dedicated QA engineers to really polish our code, eliminate bugs, and test it under a wide variety of OS and platform configurations.
Most UEFI BIOS engineers don't do the work that I do. They take the code from my group and make motherboard specific customizations. My group does all our testing and development on reference boards. The typical BIOS engineer working for a large OEM/ODM/IBV is generally given about 2 weeks to develop and test the customizations for a new motherboard design, and is generally expected to do so without any help from his/her peers. The reason for this is most large OEMs release about 50-100 new designs every 6 months, so per board development time needs to be as minimal as possible. With so many boards to support the OEM's engineering BIOS department ends up being a bunch of individuals all working on separate boards in parallel with little cross communication.
With only 2 weeks to develop and test the BIOS, pretty much the only thing that ends up getting tested is whatever version of Windows the OEM is planning on shipping with that system. So you end up with this mixed bag of well written code from me and my colleagues combined with rushed, poorly tested motherboard specific customizations. Net result is bugs like what this kernel developer noticed happen.
There are exceptions to this rule. Anything with an Apple logo, or anything that the OEM considers to be a "flagship product" that's going to get a lot of media attention is going to get a ton of development resources thrown on it. Products like the Surface, XPS 13, Yoga 3 Pro, Thinkpad T & X series, etc.
With regard to the kernel dev's observation about _REV, he is spot on. Microsoft has done a great job making it absolutely worthless. We pretty much exclusively rely on _OSI checks for certain Windows versions. Its unfortunate but MS has pretty much forced us in to doing it this way since the ACPI requirements for Win7/8/8.1/10 are vastly different and the only way to make all of them boot on the same system without blue screens (and have connected standby work) is a ton of _OSI checks.
Re: (Score:2)
So, Microsoft is still Microsoft. Good to know.
Re: (Score:2)
From a user's perspective, if a device doesn't work with Linux, the OS is broken, but if a device doesn't work with Windows, then the device is broken. It's not fair, but that's the reality we operate in.
Re: (Score:1)
He was also one of the two scumbags who were arguing for signed kernels ("deepthroating Microsoft", as Torvalds put it) a while ago, if I remember correctly.
Re:SJW is the new Godwin (Score:5, Informative)
I propose a new rule similar to Godwin's rule about the first to mention the word "Nazi" loses the argument.
Uh, there's no such thing. Godwin's Law just says that, in any discussion that goes on long enough, someone will call another poster a Nazi.
Your supposed 'Godwin's Law' would be absurd:
'I think we should murder all the Jews'
'Hitler, you're a Naz!'
'Ha-ha! Godwin's Law! You lose!'
Re: (Score:2)
No. It also adds that after Nazis have been brought up, any chance of having a reasonable discussion - as opposed to a shouting match - disappears. Which seems to fit the way the word "SJW" is usually used.
But that's not absurd. If Hitler proposes genocide
Re: (Score:1)
So you say SJWs are as bad as Hitler? I'd say... not as bad, just more annoying. But then, with further levels such as Mao or Stalin, there's plenty of space for them to grow.