Comment 32 for bug 817017

Revision history for this message
Pedro Nariyoshi (pedro-nariyoshi) wrote : Re: [Bug 817017] Re: AHCI mode not restored during sleep-wakeup cycle

What does "dmesg | grep ahci" show?

I don't know about using BIOS and then using setpci anymore, but it might
be fixed. I guess the only ones who can really tell are the guys who
published this patch over here.

Pedro Nariyoshi

On Sat, Jun 15, 2013 at 9:19 AM, Phil Colbourn <email address hidden>wrote:

> Is this already fixed in 3.8.0-25 (and possibly earlier versions)?
>
> I have a macbookpro2,1 and macbookpro4,1 and once AHCI mode is enabled I
> can sleep/resume fine - so far.
>
> I enable AHCI mode using setpci -s 0:1f.2 90.b=40 in grub or via a
> patched MBR called patchedcode.bin (some say to use 60 but I now think
> that 40 is correct value based on Intel ICH7/8 datasheets).
>
> http://www.intel.com.au/content/dam/doc/datasheet/intel-io-controller-
> hub-8-datasheet.pdf page 486.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/817017
>
> Title:
> AHCI mode not restored during sleep-wakeup cycle
>
> Status in Mactel Support:
> In Progress
>
> Bug description:
> The SATA controller operates by default in IDE mode and there is no
> known EFI setting to override this behavior. Fortunately, it can be put
> into AHCI mode before the Linux kernel is booted (e.g. by Grub2 *) ).
> SSD disks perform much better in AHCI mode. On my laptop, both Intel SSD
> 320 and a Cruzial RealSSD C300 performed great in the beginning, but system
> responsiveness degraded soon to a point where system load was around 6 to 7
> during updates (apt-get dist-upgrade) and second long freezes during normal
> work (e.g. browsing, responding to emails, heck - even when using vim in a
> terminal! ...).
>
> Unfortunately there is a drawback when putting the SATA controller into
> AHCI mode: AHCI is not restored during sleep-wakeup cycles and thus the
> system crashes badly after wakeup, because it suddently finds only an IDE
> controller.
> We need to patch (e.g. the SATA driver?) and check which mode the
> controller had been in, before the laptop was sent to sleep and restore the
> previous mode.
>
> *) How to put the SATA controller into AHCI mode [1]:
> MBP 6,2 (or any other 5 series/3400 series chipset based MBP)
> put this line before 'set root=...':
> setpci -d 8086:3b28 90.b=60
> (that command sets bit 5 and 6 on register 0x90 -- lookup Intel document
> number 322169 for details)
>
> [1] http://en.gentoo-wiki.com/wiki/Apple_Macbook_Pro
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mactel-support/+bug/817017/+subscriptions
>