Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Operating Systems Software Windows Linux Hardware

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.
This discussion has been archived. No new comments can be posted.

Linux Might Need To Claim Only ACPI 2.0 Support For BIOS

Comments Filter:
  • by Ravaldy ( 2621787 ) on Thursday March 12, 2015 @04:27PM (#49244473)

    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.

  • Sounds like a bios issue not a kernel issue. If linux is trying to do it correctly screw what windows does. Maybe what could be done is a flag to send from the bootloader to fix his one off issue. ACPI=2 something like that.
    • Re: (Score:3, Insightful)

      by Anonymous Coward

      What's the point of following the spec if no hardware does? The goal of an operating system is to run.

      • You haven't taken much Computer Science. The goal of all software is to be correct.

      • 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?

    • by gweihir ( 88907 )

      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)

    by bill_mcgonigle ( 4333 ) * on Thursday March 12, 2015 @04:28PM (#49244481) Homepage Journal

    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?

    • TFA also states HP as an offending vendor? It's not very clear.

      Sounds like this could be vendor agnostic?

    • by DarkOx ( 621550 )

      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

      • 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?

        • by Kremmy ( 793693 )
          Given everything that I have seen, in life and in computer science...

          No. It might even be the exact opposite of the least astonishing thing.
        • 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)

      by Anonymous Coward

      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

      • 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.

    • 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.

    • 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.

  • by a_n_d_e_r_s ( 136412 ) on Thursday March 12, 2015 @04:28PM (#49244487) Homepage Journal

    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 ?

    • 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.

    • But Linux returned 5, it's winning by 3. 5-2 Linux over Windows in the 3rd quarter, YAY!
  • 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?

    • by Anonymous Coward

      Shouldn't systemd handle this?
      who runs sound on their servers?
      Who runs linux on their desktop?
      Windows 10. Resistance is futile.

    • Would that come in conflict with his other mantra of "don't break user space"?
    • by Anonymous Coward

      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.

  • by hey! ( 33014 ) on Thursday March 12, 2015 @05:01PM (#49244797) Homepage Journal

    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.

    • by King_TJ ( 85913 ) on Thursday March 12, 2015 @05:16PM (#49244913) Journal

      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.

      • So maybe you should RTFA.

        • by King_TJ ( 85913 )

          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

    • by sjwest ( 948274 )

      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.

    • 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

  • 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.

  • by DougPaulson ( 4034537 ) on Thursday March 12, 2015 @05:52PM (#49245203)
    From: Bill Gates
    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]
  • 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

    • Why do the _OSI("Linux") and _REV 5 blocks even exist if they are just stubs which do not fully work?
  • After reading in to the problem, I can see it's due to sloppiness on Windows' part. At some point we need to just do the right thing, and do it whether Microsoft is on board or not. The fact that Microsoft, a software company, can still influence the hardware market is mind boggling. The reason is probably high market share, which is not the most ideal situation.

I tell them to turn to the study of mathematics, for it is only there that they might escape the lusts of the flesh. -- Thomas Mann, "The Magic Mountain"

Working...