Acpi osi linux grub

how to set acpi_osi parameter in the grub

This is a question about a problem I could fix but I do not know why the fix works. I wanted to be able to adjust the backlight from keyboard and the only thing which fixed that was changing a line in the grub as GRUB_CMDLINE_LINUX_DEFAULT=»acpi_osi mt24 mb12″>

2 Answers 2

During operating system boot, the OS obtains various ACPI tables from the BIOS and interprets the «tables», which really look more like program code. One quite popular table is the DSDT, but it’s not alone.

The ACPI tables are created in the form of textual source code (see the example linked above), and are compiled into binary form using a tool called iasl (by Intel). The tables are stored in the BIOS and processed by the OS in the binary form (like an intermediate byte-code or some such), but can be «disassembled» back into source code, if needed. Which is sometimes used by Linux tinkerers to correct bugs or ACPI «version mismatches»: the original table is disassembled, possibly corrected in the source code, recompiled by a current version of the IASL, and provided to the Linux kernel as a custom replacement.

The ACPI tables (including the DSDT) contain conditional branches — and the ACPI table being interpretted by the booting OS can test for the OS version using a method called _OSI. The host OS, interpretting the table, provides an «OS version string» to the _OSI method. Such as, for some reason, an _OSI string «Windows 2009» refers to «Windows 7» in our reality. Note that this is allegedly not the purpose originally intended for the _OSI method, but never mind 🙂

In other words, the «program» embodied in an ACPI table (while being interpretted by a host OS) can test, under what Windows version it is running, and modify its behavior based on that. It can init the hardware and various BIOS service interfaces/structures, based on the Windows version detected. Linux has its own assigned _OSI ident, and so does MacOS for instance. yet, as the BIOSes in x86 motherboards typically get tested against contemporary Windows versions, you may actually have better luck if you try to make the ACPI table believe that it’s being interpretted by some particular Windows version, rather than by Linux. (Or to try to avoid hitting the «default case» in the branching ACPI code, which may not be well defined.) Which is what the kernel cmdline argument of acpi_osi=»some string» is good for. The details of this and other related arguments are somewhat documented in the Linux «kernel parameters» guide.

Apart from display backlight, the acpi_osi string can influence miscellaneous other aspects of the BIOS and OS behavior during boot. As an example, just at this moment I’m playing with an old Acer Extensa 5220 laptop (C2D, i965GM north bridge) and in default config, it often fails to resume from suspend (ACPI S3, suspend to RAM). On resume, it would freeze with a black screen and backlight on, or it would perform two restarts and then boot from scratch. I updated the BIOS which alone did not help, but it gave me a certainty that this BIOS update (1.35) was intended to work well with Windows 7. So after trying a number of other things, I finally have pretty good results with

Читайте также:  Отличие операционных систем linux dos

acpi_osi=! acpi_osi=»Windows 2009″

The first part, acpi_osi=! , means «forget any acpi_osi strings that you know at this point» (it’s actually a list of strings, rather than just one string, apparently — duh). So we first clear whatever the interpretter originally used, and then set the one desired string. To make it work with a modern Linux kernel, it might be a good idea to specify the most modern Windows version that the BIOS nominally supports.

Note that you need quotation marks around «Windows 2009″, because the string contains a blank character (ASCII ‘space’). Which turns out to be a problem if this cmdline arg needs to be entered into a shell variable in some distro-specific config file, such as /etc/default/grub in Debian and friends (Ubuntu). In that case, just use acpi_osi=\»Windows 2009\» , i.e. use a backslash to «escape» each quotation mark that should make it to the kernel command line. If you then run update-grub (again Debian/Ubuntu), the backslashes get stripped, and the quotation marks end up verbatim in /boot/grub/grub.cfg. Interestingly, if you later check with cat /proc/cmdline , you’ll probably find out that the first quotation mark has moved to the very start of the argument: «acpi_osi=Windows 2009» which looks slightly bizzarre 🙂

I’ve found out that I should NOT mess with acpi_os_name or acpi_sleep (which otherwise also look promising). YMMV.

Note that this is yet another incarnation of a general backward compatibility problem. Cross-compatibility between two different pieces of software, created very far apart in time. Speaking of suspend and resume, Linux has lost support for the old and simple APM BIOS call known as «set power state», so the only interface you can use for suspend+resume is ACPI, which itself is pretty complex, has evolved through several major versions, and very modern Linux versions are no longer thoroughly tested on very old hardware (and its BIOS), and the BIOS probably wasn’t free of bugs even when it was new. and even ACPI is now getting superseded by UEFI, which builds on ACPI and brings further peculiarities of its own.

Источник

What does the kernel boot parameter «set acpi_osi=Linux» do?

I am facing an issue with brightness control in my laptop which has Intel HD graphics and Ubuntu 10.10 64-bit. So when I searched for a fix I found that a common suggestion is to edit the GRUB file line, GRUB_CMDLINE_LINUX_DEFAULT=»quiet splash» to GRUB_CMDLINE_LINUX_DEFAULT=»quiet splash acpi_osi=Linux acpi_backlight=vendor» Documentation for boot parameter acpi_osi tells:

acpi_osi= [HW,ACPI] Modify list of supported OS interface strings acpi_osi="string1" # add string1 -- only one string acpi_osi="!string2" # remove built-in string2 acpi_osi= # disable all strings 

I don’t find a reason why this should fix any laptop issue. So could anyone tell me what the kernel boot option acpi_osi=Linux do?

Читайте также:  Celluloid linux скорость воспроизведения

3 Answers 3

I think you mean =Windows , not Linux . The argument tells the kernel to lie to the ACPI BIOS and tell it that it is something other than Linux (which is why specifying Linux is silly).

I’m sure he means what he wrote. Yes, BIOS’s usually disable functionality if Windows is not detected, but specifying Linux is not silly because by default the kernel responds false when asked if Linux is running. acpi_osi=Linux tells the kernel to respond true.(see drivers/acpi/osl.c ) It seems that you need to tell the BIOS the truth.

It’s either a driver problem or incorrect ACPI implementation. You’d have to take out your dsdt and disassemble it to review the code and get a better understanding of what is broke or disabled under the Linux OSI.

Источник

What Does “acpi_osi=Linux” Kernel Boot Parameter Do?

Ubuntu 15

The Linux kernel boot parameters are a set of options that can be passed to the kernel at boot time. They can be used to adjust the behavior of the kernel, enable or disable certain features, and troubleshoot potential issues. One such parameter is acpi_osi=Linux . This article will delve into what this parameter does, how it works, and when it might be useful.

The «acpi_osi=Linux» kernel boot parameter modifies the list of supported operating system interface strings that the Linux kernel reports to the ACPI BIOS. By adding this parameter, you can enable certain ACPI features that the BIOS might otherwise disable. It can be useful in troubleshooting and resolving issues related to ACPI functionality, but should be used with caution as it could potentially break other things that were previously working.

Understanding ACPI and OSI

To understand what acpi_osi=Linux does, we first need to understand a couple of terms: ACPI and OSI. ACPI, or Advanced Configuration and Power Interface, is an industry standard that defines power and configuration management interfaces between an operating system and the hardware. It allows the operating system to manage power usage for devices, perform status monitoring, and perform system level tasks like sleep or hibernate. OSI, or Operating System Interfaces, is a method used by the ACPI BIOS to detect which operating system is running. The BIOS can then enable or disable certain ACPI features based on the detected operating system.

The Role of “acpi_osi=Linux”

The acpi_osi=Linux kernel boot parameter modifies the list of supported operating system interface strings that the kernel will report to the ACPI BIOS. By default, the Linux kernel responds false when asked if Linux is running. This is because some BIOSes have been known to enable or disable certain features based on the operating system, and these features may not always work correctly with Linux. When you add acpi_osi=Linux to the kernel boot parameters, you’re telling the kernel to respond true when asked if Linux is running. This can enable certain ACPI features that the BIOS might otherwise disable.

Читайте также:  Linux symbol link file

When to Use “acpi_osi=Linux”

The acpi_osi=Linux parameter can be useful in troubleshooting and resolving certain issues related to ACPI functionality. For example, some users have reported that adding this parameter resolved issues with brightness control on their laptops. However, it’s important to note that using acpi_osi=Linux could potentially break other things that were previously working. Therefore, it’s recommended to use this parameter only when necessary and after careful consideration of the potential implications.

How to Add Kernel Boot Parameters

  1. Open the GRUB configuration file in a text editor. You’ll need root permissions to do this. For example, you might use the following command:
  1. Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT . This line contains the default kernel boot parameters.
  2. Add acpi_osi=Linux to the list of parameters. For example, the line might look like this after you’ve added the parameter:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

Conclusion

The acpi_osi=Linux kernel boot parameter is a powerful tool for modifying how the Linux kernel interacts with the ACPI BIOS. It can enable certain ACPI features that might otherwise be disabled, potentially resolving certain issues. However, it should be used with caution, as it could also have unintended side effects. Always make sure to understand what a kernel boot parameter does before adding it to your configuration.

ACPI stands for Advanced Configuration and Power Interface. It is an industry standard that defines power and configuration management interfaces between an operating system and the hardware.

OSI stands for Operating System Interfaces. It is a method used by the ACPI BIOS to detect which operating system is running and enable or disable certain ACPI features based on the detected operating system.

The acpi_osi=Linux kernel boot parameter modifies the list of supported operating system interface strings that the kernel will report to the ACPI BIOS. It tells the kernel to respond true when asked if Linux is running, enabling certain ACPI features that the BIOS might otherwise disable.

The acpi_osi=Linux parameter can be useful in troubleshooting and resolving certain issues related to ACPI functionality. However, it should be used with caution as it could potentially break other things that were previously working. It is recommended to use this parameter only when necessary and after careful consideration of the potential implications.

To add a kernel boot parameter, you need to edit the GRUB configuration file. Open the file using a text editor with root permissions, find the line starting with GRUB_CMDLINE_LINUX_DEFAULT , add acpi_osi=Linux to the list of parameters, save the file, update GRUB with the new configuration, and reboot your system for the changes to take effect.

Источник

Оцените статью
Adblock
detector