# Intel Core Duo and ACPI Sleep

## jgrafton

I recently purchased a Thinkpad T60 with a Centrino core duo chip in it... most things are working fairly well, but I'm having issues with ACPI sleep.  From what I can tell, I guess ACPI sleep states are disabled by default when SMP is enabled, but sleeping works in Windows, so it seems like it should work in Linux as well... is this a case where I need to wait for the kernel to catch up with the new technology, or is there some other hack available?

# echo mem > /sys/power/state 

bash: echo: write error: Operation not permitted

The screen blanks briefly and the little moon icon blanks, but nothing actually happens.  It still doesn't work even when I have no modules loaded and X is not running.

Any ideas?

----------

## jaidormi

I had this same problem with my Asus Z62F barebones notebook.  You need to use a kernel patched with suspend2, the simple way being to 

```
emerge suspend2-sources
```

 and of course then configure and compile and boot that kernel (you can copy over your existing .config and then just change the relevant options added by the suspend2 patch.

The operation not permitted error is coming up because your kernel doesn't have acpi sleep states built in, so you can't write to /sys/power/state.  In my case, that's as far as I've gotten, because I can get the machine to go to sleep but it hard locks on resume.  Hibernate works, though, but really I need suspend.  Let me know if you make any progress, and good luck!

P.S.  I had been using suspend2-sources-2.6.16-r2 but I just noticed that -r4 has been released (stable tree) so I'm going to check the changelog and see if there's any reason that an upgrade might solve my sleep issue (and perhaps yours!).  I'll keep you posted.

----------

## agnitio

You don't need to use suspend2 to get this to work. The Dual Core processor needs "Support for Hotpluggable CPUs" activated in the kernel, otherwise it will show the error that you experienced.

----------

## cpwins

Thanks fot the tip, I've been looking for hours! Well I guess not giving up finally pays off.  :Smile: 

----------

## cpwins

OK, so I compiled a kernel "2.6.17-gentoo-r1 #1 SMP PREEMPT" with the "Support for Hotpluggable CPUs". I have a Core Duo T2400 CPU

then

```
#echo standby > /sys/power/state
```

The PC goes to standby. When I start it back up, the second CPU doesn't properly return to it's original state.

```
cat /var/log/messages

Jul  5 02:21:11 yonah Freezing cpus ...

Jul  5 02:21:11 yonah CPU 1 is now offline

Jul  5 02:21:11 yonah SMP alternatives: switching to UP code

Jul  5 02:21:30 yonah CPU1 is down

Jul  5 02:21:30 yonah Stopping tasks: =====================================================|

Jul  5 02:21:30 yonah Back to C!

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 16

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1b.0 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1c.0 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1c.2[C] -> GSI 18 (level, low) -> IRQ 17

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1c.2 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19 (level, low) -> IRQ 18

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1c.3 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 23 (level, low) -> IRQ 20

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1d.0 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 18

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1d.1 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 17

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1d.2 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 16 (level, low) -> IRQ 16

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1d.3 to 64

Jul  5 02:21:30 yonah PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 23 (level, low) -> IRQ 20

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1d.7 to 64

Jul  5 02:21:30 yonah PM: Writing back config space on device 0000:00:1d.7 at offset f (was 100, writing 10f)

Jul  5 02:21:30 yonah PM: Writing back config space on device 0000:00:1d.7 at offset 4 (was 0, writing ffa3b800)

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1e.0 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 17

Jul  5 02:21:30 yonah PM: Writing back config space on device 0000:00:1f.2 at offset 1 (was 2b00003, writing 2b00007)

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 18

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:00:1f.2 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 19 (level, low) -> IRQ 18

Jul  5 02:21:30 yonah PCI: Setting latency timer of device 0000:01:00.0 to 64

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:04:03.0[A] -> GSI 21 (level, low) -> IRQ 19

Jul  5 02:21:30 yonah ACPI: PCI Interrupt 0000:04:09.0[A] -> GSI 21 (level, low) -> IRQ 19

Jul  5 02:21:30 yonah Restarting tasks... done

Jul  5 02:21:30 yonah Thawing cpus ...

Jul  5 02:21:31 yonah SMP alternatives: switching to SMP code

Jul  5 02:21:31 yonah Booting processor 1/1 eip 3000

Jul  5 02:21:31 yonah Initializing CPU#1

Jul  5 02:21:31 yonah Calibrating delay using timer specific routine.. 3666.20 BogoMIPS (lpj=1833102)

Jul  5 02:21:31 yonah CPU: After generic identify, caps: bfe9fbff 00100000 00000000 00000000 0000c1a9 00000000 00000000

Jul  5 02:21:31 yonah Intel machine check architecture supported.

Jul  5 02:21:31 yonah Intel machine check reporting enabled on CPU#1.

Jul  5 02:21:31 yonah CPU1: Intel Genuine Intel(R) CPU           T2400  @ 1.83GHz stepping 08

Jul  5 02:21:31 yonah APIC error on CPU1: 00(40)

Jul  5 02:21:31 yonah CPU1 is up

Jul  5 02:22:22 yonah ACPI: PCI Interrupt 0000:04:0a.0[A] -> GSI 22 (level, low) -> IRQ 21

```

The second core has a problem now. For example, it won't change frequencies with the 'ondemand' governor. I don't really know if it's working at all.

Does anyone else have similar problems with Core Duo? Any succes with standby or suspend to ram/disk? And what does the APIC error mean?

----------

## Sagi

 *cpwins wrote:*   

> The second core has a problem now. For example, it won't change frequencies with the 'ondemand' governor. I don't really know if it's working at all.
> 
> Does anyone else have similar problems with Core Duo? Any succes with standby or suspend to ram/disk? And what does the APIC error mean?

 

We are having the same problem:

https://forums.gentoo.org/viewtopic-p-3597845.html

Did you manage to solve yours? Please let us know if you have or else continue in the other thread, we should be able to resolve this with a bit of research.

----------

## Wojtek_

And I have the same one:

https://forums.gentoo.org/viewtopic-t-503550-highlight-.html

----------

