[kwlug-disc] Ubuntu Karmic and power management

Robert P. J. Day rpjday at crashcourse.ca
Wed Nov 4 02:34:33 EST 2009

On Tue, 3 Nov 2009, Bob Jonkman wrote:

> Khalid writes:
> > To this:
> >
> > kernel          /boot/vmlinuz-2.6.31-14-generic
> > root=UUID=d2d0abec-e28f-42bc-9afa-ba6faca5ed20 ro quiet splash
> > *acpi_osi="Linux"*
> Surely we don't use the stars around the parameter? And I expect
> that was intended to be all on one line...
> Where are these obscure things documented?  I found
> http://www.kernel.org/doc/Documentation/kernel-parameters.txt but
> it's remarkably vague on what the 'acpi_osi' strings are and what
> they actually do.

  that kernel-parameters.txt file is typically *way* out of date.
you're better off searching the kernel source itself for the
definitions of kernel parameters.  with the exception of "early"
parameters, kernel parms are defined with the "__setup" macro, so you
can see what the relevant kernel parms are for ACPI using something

$ grep -rw __setup drivers/acpi
drivers/acpi/video_detect.c:__setup("acpi_backlight=", acpi_backlight);
drivers/acpi/video_detect.c:__setup("acpi_display_output=", acpi_display_output);
drivers/acpi/osl.c:__setup("acpi_os_name=", acpi_os_name_setup);
drivers/acpi/osl.c:__setup("acpi_osi=", acpi_osi_setup);
drivers/acpi/osl.c:__setup("acpi_serialize", acpi_serialize_setup);
drivers/acpi/osl.c:__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
drivers/acpi/osl.c:__setup("acpi_enforce_resources=", acpi_enforce_resources_setup);
drivers/acpi/acpica/tbxface.c:__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
drivers/acpi/pci_link.c:__setup("acpi_irq_isa=", acpi_irq_isa);
drivers/acpi/pci_link.c:__setup("acpi_irq_pci=", acpi_irq_pci);
drivers/acpi/pci_link.c:__setup("acpi_irq_nobalance", acpi_irq_nobalance_set);
drivers/acpi/pci_link.c:__setup("acpi_irq_balance", acpi_irq_balance_set);

  so the above tells you that the kernel parameter "acpi_osi" is
defined in drivers/acpi/osl.c:

===== snip =====

int __init acpi_osi_setup(char *str)
        if (str == NULL || *str == '\0') {
                printk(KERN_INFO PREFIX "_OSI method disabled\n");
                acpi_gbl_create_osi_method = FALSE;
        } else if (!strcmp("!Linux", str)) {
                acpi_cmdline_osi_linux(0);      /* !enable */
        } else if (*str == '!') {
                if (acpi_osi_invalidate(++str) == AE_OK)
                        printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str);
        } else if (!strcmp("Linux", str)) {
                acpi_cmdline_osi_linux(1);      /* enable */
        } else if (*osi_additional_string == '\0') {
                strncpy(osi_additional_string, str, OSI_STRING_LENGTH_MAX);
                printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str);

        return 1;

__setup("acpi_osi=", acpi_osi_setup);

===== snip =====

  it should be obvious how the above works -- you can define any
routine which accepts a character string value for a kernel parameter,
then tie the parameter name to that routine.  the routine is then free
to parse/interpret that value however it pleases.

  was that helpful?


Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday

More information about the kwlug-disc_kwlug.org mailing list