All of lore.kernel.org
 help / color / mirror / Atom feed
* ACPI problems
@ 2001-11-05 12:33 Felix von Leitner
  2001-11-05 21:58 ` Nick Papadonis
  0 siblings, 1 reply; 9+ messages in thread
From: Felix von Leitner @ 2001-11-05 12:33 UTC (permalink / raw)
  To: linux-kernel

Hi!

ACPI is acting up on me.  On my main machine, ACPI used to be unable to
power the machine down.  It just said "Power down." and the said there.
It worked flawlessly with my notebook (Dell Inspiron 8k).

Now, since about 2.4.10 (?) the situation reversed.  Now ACPI can power
down my desktop just fine but my notebook just sits there after the "Power
Down." message.  Normally, I press the power button then, but yesterday
I was too busy and let the machine sit there and to my utter
astonishment, the notebook did power down after several minutes!  I
didn't take the exact time, but right now I'm sitting besides the
notebook which said "Power down." exactly 3 minutes ago and still is
powered on.  Any ideas?

Felix

^ permalink raw reply	[flat|nested] 9+ messages in thread
* ACPI Problems
@ 2004-10-05 10:31 Anil Mamede
  0 siblings, 0 replies; 9+ messages in thread
From: Anil Mamede @ 2004-10-05 10:31 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi. My computer is:
- Athlon Barton 2600+
- Asus NFORCE2 chipset
- 512 Mb
- Kernel 2.4.27

Im trying to have ACPI. First i compiled battery, thermal, processor, 
etc.. in modules but when i do modprobe processor for example it show this:


/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_bus_generate_event
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_os_free
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_bus_get_device
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_set_register
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_root_dir
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_install_notify_handler
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_extract_package
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_evaluate_object
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_bus_register_driver
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_fadt
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_get_register
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_evaluate_integer
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_bus_unregister_driver
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_get_handle
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: 
/lib/modules/2.4.27/kernel/drivers/acpi/processor.o: unresolved symbol 
acpi_remove_notify_handler
modprobe: insmod /lib/modules/2.4.27/kernel/drivers/acpi/processor.o failed
modprobe: insmod processor failed


If i compile the modules inside the kernel if i do cat 
/proc/acpi/processor/limit for example i have:

not supported

What is wrong?

More Info:

$ cat /proc/acpi/info
version:                 20040326
states:                  S0 S1 S4 S4Bios S5


$ cat /proc/acpi/sleep
S0 S1 S4 S4Bios S5

Anil Mamede


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

^ permalink raw reply	[flat|nested] 9+ messages in thread
* ACPI problems
@ 2009-01-21  9:52 mohd.adil
  2009-01-27 22:53 ` Pavel Machek
  0 siblings, 1 reply; 9+ messages in thread
From: mohd.adil @ 2009-01-21  9:52 UTC (permalink / raw)
  To: majordomo, acpi-bugzilla-request, linux-pm-devel-request,
	linux-pm

[-- Attachment #1: Type: text/html, Size: 4770 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread
* ACPI problems
@ 2009-01-21  9:54 mohd.adil
  0 siblings, 0 replies; 9+ messages in thread
From: mohd.adil @ 2009-01-21  9:54 UTC (permalink / raw)
  To: linux-pm, linux-pm-devel-request, acpi-bugzilla-request,
	majordomo

[-- Attachment #1: Type: text/html, Size: 4405 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: ACPI problems
@ 2009-01-28  9:04 mohd.adil
  2009-01-28  9:31 ` Pavel Machek
  0 siblings, 1 reply; 9+ messages in thread
From: mohd.adil @ 2009-01-28  9:04 UTC (permalink / raw)
  To: Pavel Machek
  Cc: majordomo, mohd.adil, linux-pm, acpi-bugzilla-request,
	linux-pm-devel-request

[-- Attachment #1: Type: text/html, Size: 8359 bytes --]

[-- Attachment #2: source code for acpi.txt --]
[-- Type: text/plain, Size: 7197 bytes --]

/* A simple linux kernel module */

/* Include the required headers */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/rtc.h>

void do_acpi_stuff( void );
void print_acpi_buffer (acpi_string);
void print_acpi_int (acpi_string);
void print_acpi_string  (acpi_string);
void print_acpi_int2 (acpi_string);
void print_acpi_integer (acpi_string);
void print_acpi_string2  (acpi_string);
void setup_pmem_reboot (void);
void unsetup_pmem_reboot (void);
void show_cmos (void);
void cmos_setsize(void);

MODULE_PARM_DESC(choice, "A short integer");
MODULE_PARM_DESC(data, "Unsigned Long");

static short choice = 0;
static long data = 0;

module_param(choice , short, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
module_param(data , long, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);

/* The module initialisation function */
int init_module(void)
{

        printk(KERN_EMERG "Simple module inserted. Choice = %d, Data = %X \n", choice, data);

        /* extracting acpi namespace information */
        switch ( choice ) {
        case 1 : show_cmos();
                 break ;

        case 2 : setup_pmem_reboot();
                 break ;

        case 3 : unsetup_pmem_reboot();
                 break ;

        case 4 : cmos_setsize();
                 break ;

        case 5 : do_acpi_stuff();
                 break ;

        default :  printk(KERN_EMERG "Invalid choice" );
                 break;
        }

        return 0;
}

/* The module cleanup function */
void cleanup_module()
{
        printk(KERN_EMERG "Removing simple module.\n");
}

void setup_pmem_reboot (void)
{
        int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        temp = temp | 0x10 ;
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        outb (0xDD, 0x72);
        outb (temp , 0x73 );
}
void show_cmos (void)
{
        unsigned int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        outb ( 0xCB, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Size = %d ", temp );
}
void unsetup_pmem_reboot (void)
{
        unsigned int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        temp = temp & 0xEF ;
        outb (0xDD, 0x72);
        outb (temp , 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
}
void cmos_setsize(void)
{
        unsigned int temp = 0;
        outb ( 0xCB, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Size = %d ", temp );
        outb ( 0xCB, 0x72);
        outb ( data,  0x73);
        printk(KERN_EMERG "Size = %d ", temp );
}
void do_acpi_stuff( void )
{

        print_acpi_buffer ("\\_SB.PERB");
        print_acpi_integer ("\\_SB.PERL");
}
void print_acpi_integer (acpi_string astr) {

        acpi_handle s_b = (acpi_handle)0 ;
        acpi_status status ;
        unsigned long dat = 0;

        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG " get_handle success %d, %x : ", status, s_b);
                status = acpi_evaluate_integer ( s_b, astr, NULL, &dat);
                if (status == AE_OK)
                        printk(KERN_EMERG " Integer Value = %d " , dat ) ;
                else
                        printk(KERN_EMERG " Error  evaluation %d " , status);
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status );
}

void print_acpi_buffer (acpi_string astr)
{

        acpi_handle s_b = (acpi_handle)0 ;
        acpi_status status ;
        struct acpi_buffer rels = { 0, NULL };
        union acpi_object *out_objs;
        u8 *cp ;
        int i;

        out_objs =  kmalloc (sizeof(union acpi_object), GFP_KERNEL);
        if ( !out_objs)
        {
                printk(KERN_EMERG " Could Not allocate memory rels pointer , buffer ");
                return;
        }
        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG " get_handle success %d, %x : ", status, s_b);

                memset(out_objs, 0, sizeof(union acpi_object));
                rels.length = 2 * (sizeof(union acpi_object));
                rels.pointer = out_objs;
                status = acpi_evaluate_object(s_b, NULL , NULL, &rels);
                if (status == AE_OK)
                {
                        printk(KERN_EMERG " eval_object buffer success.result: %d, %d ", out_objs->type,  rels.length );
                        cp  = (u8 *)(out_objs->buffer.pointer) ;
                        for (i = 0; i< out_objs->buffer.length ;  i++) {

                                printk(KERN_EMERG " %X", cp[i]);
                        }

                }
                else
                {
                        printk(KERN_EMERG " error %d : ", status);
                        printk(KERN_EMERG " result buffer : %d " , (int)rels.length);
                }
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status );

kfree (out_objs);
}

void print_acpi_int (acpi_string astr)
{
        acpi_handle *s_b;
        acpi_status status ;
        struct acpi_buffer *rels;
        union acpi_object *out_objs;

        s_b = kmalloc ( sizeof (acpi_handle),  GFP_KERNEL);
        if (!s_b)
        {
                printk(KERN_EMERG " Could Not allocate memory s_b , int ");
                return;
        }
        rels = kmalloc ( sizeof (struct acpi_buffer) , GFP_KERNEL);
        if ( !rels)
        {
                printk(KERN_EMERG " Could Not allocate memory rels , int");
                return;
        }
        rels->pointer =  kmalloc ( sizeof(union acpi_object), GFP_KERNEL);
        if ( !rels->pointer)
        {
                printk(KERN_EMERG " Could Not allocate memory rels pointer , int");
                return;
        }

        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG "get_handle success %d, %d : ", status, *s_b);
                rels->length = sizeof(union acpi_object);
                status = acpi_evaluate_object(*s_b, 0, 0, rels);
                out_objs = (union acpi_object *) rels->pointer;
                if (status == AE_OK)
                {
                        printk(KERN_EMERG " eval_object int success. result  : %d, %d, ", out_objs->type, rels->length );
                        printk(KERN_EMERG "Int value = %d", out_objs->integer.value  );
                }
                else
                {
                        printk(KERN_EMERG " error %d : ", status);
                }
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status);


kfree (rels->pointer);
kfree (rels);
kfree (s_b);
}

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: ACPI problems
@ 2009-01-28 13:59 mohd.adil
  0 siblings, 0 replies; 9+ messages in thread
From: mohd.adil @ 2009-01-28 13:59 UTC (permalink / raw)
  To: Pavel Machek
  Cc: majordomo, mohd.adil, linux-pm, acpi-bugzilla-request,
	linux-pm-devel-request

[-- Attachment #1: Type: text/html, Size: 29566 bytes --]

[-- Attachment #2: source code for acpi.txt --]
[-- Type: text/plain, Size: 7197 bytes --]

/* A simple linux kernel module */

/* Include the required headers */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/rtc.h>

void do_acpi_stuff( void );
void print_acpi_buffer (acpi_string);
void print_acpi_int (acpi_string);
void print_acpi_string  (acpi_string);
void print_acpi_int2 (acpi_string);
void print_acpi_integer (acpi_string);
void print_acpi_string2  (acpi_string);
void setup_pmem_reboot (void);
void unsetup_pmem_reboot (void);
void show_cmos (void);
void cmos_setsize(void);

MODULE_PARM_DESC(choice, "A short integer");
MODULE_PARM_DESC(data, "Unsigned Long");

static short choice = 0;
static long data = 0;

module_param(choice , short, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
module_param(data , long, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);

/* The module initialisation function */
int init_module(void)
{

        printk(KERN_EMERG "Simple module inserted. Choice = %d, Data = %X \n", choice, data);

        /* extracting acpi namespace information */
        switch ( choice ) {
        case 1 : show_cmos();
                 break ;

        case 2 : setup_pmem_reboot();
                 break ;

        case 3 : unsetup_pmem_reboot();
                 break ;

        case 4 : cmos_setsize();
                 break ;

        case 5 : do_acpi_stuff();
                 break ;

        default :  printk(KERN_EMERG "Invalid choice" );
                 break;
        }

        return 0;
}

/* The module cleanup function */
void cleanup_module()
{
        printk(KERN_EMERG "Removing simple module.\n");
}

void setup_pmem_reboot (void)
{
        int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        temp = temp | 0x10 ;
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        outb (0xDD, 0x72);
        outb (temp , 0x73 );
}
void show_cmos (void)
{
        unsigned int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        outb ( 0xCB, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Size = %d ", temp );
}
void unsetup_pmem_reboot (void)
{
        unsigned int temp = 0;
        outb ( 0xDD, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
        temp = temp & 0xEF ;
        outb (0xDD, 0x72);
        outb (temp , 0x73 );
        printk(KERN_EMERG "Pmem_reboot = %d ", temp );
}
void cmos_setsize(void)
{
        unsigned int temp = 0;
        outb ( 0xCB, 0x72);
        temp = inb ( 0x73 );
        printk(KERN_EMERG "Size = %d ", temp );
        outb ( 0xCB, 0x72);
        outb ( data,  0x73);
        printk(KERN_EMERG "Size = %d ", temp );
}
void do_acpi_stuff( void )
{

        print_acpi_buffer ("\\_SB.PERB");
        print_acpi_integer ("\\_SB.PERL");
}
void print_acpi_integer (acpi_string astr) {

        acpi_handle s_b = (acpi_handle)0 ;
        acpi_status status ;
        unsigned long dat = 0;

        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG " get_handle success %d, %x : ", status, s_b);
                status = acpi_evaluate_integer ( s_b, astr, NULL, &dat);
                if (status == AE_OK)
                        printk(KERN_EMERG " Integer Value = %d " , dat ) ;
                else
                        printk(KERN_EMERG " Error  evaluation %d " , status);
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status );
}

void print_acpi_buffer (acpi_string astr)
{

        acpi_handle s_b = (acpi_handle)0 ;
        acpi_status status ;
        struct acpi_buffer rels = { 0, NULL };
        union acpi_object *out_objs;
        u8 *cp ;
        int i;

        out_objs =  kmalloc (sizeof(union acpi_object), GFP_KERNEL);
        if ( !out_objs)
        {
                printk(KERN_EMERG " Could Not allocate memory rels pointer , buffer ");
                return;
        }
        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG " get_handle success %d, %x : ", status, s_b);

                memset(out_objs, 0, sizeof(union acpi_object));
                rels.length = 2 * (sizeof(union acpi_object));
                rels.pointer = out_objs;
                status = acpi_evaluate_object(s_b, NULL , NULL, &rels);
                if (status == AE_OK)
                {
                        printk(KERN_EMERG " eval_object buffer success.result: %d, %d ", out_objs->type,  rels.length );
                        cp  = (u8 *)(out_objs->buffer.pointer) ;
                        for (i = 0; i< out_objs->buffer.length ;  i++) {

                                printk(KERN_EMERG " %X", cp[i]);
                        }

                }
                else
                {
                        printk(KERN_EMERG " error %d : ", status);
                        printk(KERN_EMERG " result buffer : %d " , (int)rels.length);
                }
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status );

kfree (out_objs);
}

void print_acpi_int (acpi_string astr)
{
        acpi_handle *s_b;
        acpi_status status ;
        struct acpi_buffer *rels;
        union acpi_object *out_objs;

        s_b = kmalloc ( sizeof (acpi_handle),  GFP_KERNEL);
        if (!s_b)
        {
                printk(KERN_EMERG " Could Not allocate memory s_b , int ");
                return;
        }
        rels = kmalloc ( sizeof (struct acpi_buffer) , GFP_KERNEL);
        if ( !rels)
        {
                printk(KERN_EMERG " Could Not allocate memory rels , int");
                return;
        }
        rels->pointer =  kmalloc ( sizeof(union acpi_object), GFP_KERNEL);
        if ( !rels->pointer)
        {
                printk(KERN_EMERG " Could Not allocate memory rels pointer , int");
                return;
        }

        status = acpi_get_handle ( 0, astr, &s_b );
        if (status == AE_OK)
        {
                printk(KERN_EMERG "get_handle success %d, %d : ", status, *s_b);
                rels->length = sizeof(union acpi_object);
                status = acpi_evaluate_object(*s_b, 0, 0, rels);
                out_objs = (union acpi_object *) rels->pointer;
                if (status == AE_OK)
                {
                        printk(KERN_EMERG " eval_object int success. result  : %d, %d, ", out_objs->type, rels->length );
                        printk(KERN_EMERG "Int value = %d", out_objs->integer.value  );
                }
                else
                {
                        printk(KERN_EMERG " error %d : ", status);
                }
        }
        else
                printk(KERN_EMERG " get_handle error %d : ", status);


kfree (rels->pointer);
kfree (rels);
kfree (s_b);
}

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-01-28 13:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-05 12:33 ACPI problems Felix von Leitner
2001-11-05 21:58 ` Nick Papadonis
  -- strict thread matches above, loose matches on Subject: below --
2004-10-05 10:31 ACPI Problems Anil Mamede
2009-01-21  9:52 ACPI problems mohd.adil
2009-01-27 22:53 ` Pavel Machek
2009-01-21  9:54 mohd.adil
2009-01-28  9:04 mohd.adil
2009-01-28  9:31 ` Pavel Machek
2009-01-28 13:59 mohd.adil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.