Re: [ACPI-sppt] Dell Inspiron 5100: solved (was: Battery and ACPI-OpenGL conflict on Dell Inspiron 5100)

Nikola Lecic <[email protected]>
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
Hello Moritz and others, 

After several changes, it works! Now I have almost complete ACPI support in 
linux-2.4.20.SuSE, available in 2.4 kernels, I hope. Steps are:

* patch your linux-2.4.20.SuSE with following patch for drivers/acpi/osl.c (I 
took it from http://cabibbo.physics.wm.edu/~bryan/computer/inspiron5100.html) 
and modified one line (added 'struct' in line *new_table = (struct 
acpi_table_header*)AmlCode;) --- the patch is at the bottom of this mail.
# patch -p0 -i dsdt.patch
* then, put result of Intel-comiled aml into your kernel:
# iasl -tc Dell-Inspiron_5100_new-A02-custom.asl
# cp Dell-Inspiron_5100_new-A02-custom.hex drivers/acpi/tables/dsdt_table.h
* then copy default configuration of your kernel in kernel root directory:
# cp arch/i386/defconfig .config
# make menuconfig [ put '*' for everything of ACPI ]
# make dep
# made bzImage

You have not to do 'make modules' because you don't do with them anything 
indeed (ACPI support will be integrated into kernel). That's all. In order to 
have OpenGL support, you have to add 'pci=noacpi' on your boot options.

QUESTION: Situation in my /proc/acpi is now as follows:
* ac_adapter: WORKS
* battery: WORKS
* embeded_controler/EC0/info:
	gpe bit:                 0x1c
	ports:                   0x66, 0x62
	use global lock:         no
* fan: EMPTY, DOESN'T WORK
* power_resource: EMPTY
* processor/CPU0:
	info:
		processor id:            0
		acpi id:                 0
		bus mastering control:   yes
		power management:        yes
		throttling control:      yes
		performance management:  no     <-----
		limit interface:         yes
	performance:
		<not supported>
	power:
		active state:            C2
		default state:           C1
		bus master activity:     00000000
		states: C1: promotion[C2] demotion[--] latency[000] usage[00000010]
			   *C2: promotion[--] demotion[C1] latency[001] usage[00379564]	
			   C3: <not supported>
	throttling:
		state count:             8
		active state:            T0
		states:
		   *T0:                  00%
		    T1:                  12%
		    T2:                  25%
		    T3:                  37%
		    T4:                  50%
		    T5:                  62%
		    T6:                  75%
		    T7:                  87%
	limit:
		active limit:            P0:T0
		platform limit:          P0:T0
		user limit:              P0:T0
		thermal limit:           P0:T0
thermal_zone/THRM:
	cooling_mode: WORKS, BUT COOLER IS ALWAYS ACTIVE
	polling_frequency: <disabled>
	state, temperature, trip_points: WORK

How does this look? IS IT POSSIBLE TO DO ANYTHING MORE?

Nikola

--------------------------------------------------------------------------
dsdt.patch:
--------------------------------------------------------------------------
--- drivers/acpi/osl.c
+++ drivers/acpi/osl.c
@@ -70,6 +70,7 @@
 static OSD_HANDLER acpi_irq_handler = NULL;
 static void *acpi_irq_context = NULL;

+extern unsigned char AmlCode[];

 acpi_status
 acpi_os_initialize(void)
@@ -221,7 +222,10 @@
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;

-       *new_table = NULL;
+       if (strncmp(existing_table->signature, "DSDT", 4) == 0)
+               *new_table = (struct acpi_table_header*)AmlCode;
+       else
+               *new_table = NULL;
        return AE_OK;
 }
--------------------------------------------------------------------------


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.