Enable and/or Disable AHCI


  1. Posts : 40
    Two soup cans and some string.
       #1

    Enable and/or Disable AHCI


    I hope I am not duplicating something here. . . . I did look - Honest!

    I ran into an interesting problem and found an easy fix.

    First: I wanted to ENABLE AHCI because (supposedly) it improves HDD performance. (It also enables a host of other interesting features.)

    I discovered the trick of setting the START paramater in the registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci
    from "3" to "0" - and then making the switch in the BIOS.

    I tried to switch back, and simply resetting this start value to "3" doesn't work.

    The issue here is that there are actually TWO keys that control the IDE/AHCI interface choice:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pciide
    When the system is in IDE interface mode, the respective start values are:
    • msahci's START value is "3"
    • pciide's START value is "0"
    When the system is in AHCI interface mode, the respective start values are:
    • msahci's START value is "0"
    • pciide's START value is "3"
    It is entirely possible that setting the START value to zero in the key representing the interface type you wish to use, may cause the corresponding key in the other interface type to automagically switch to "3". I do not know this, nor have I tested it.

    What works for me is setting both START values to the values that correspond to the interface I wish to use.

    It should be trivially easy with a couple of judicious exports to make two registry files, one of which enables AHCI, the other of which enables IDE, by combining the two keys into one file, and setting the START parameters appropriately.

    On a slightly different topic, one may ask WHY would someone want to flip back-and-forth between interfaces anyway? Shouldn't the interface selection be a "one-shot-deal"?

    In my case I am taking some physical system hard drives and converting them to virtual disks (vhd's) to run them in virtual systems. Unfortunately the 2008-R2 hypervisor only supplies IDE type interfaces for boot devices. So - if I have a system configured for AHCI and want to virtualize it, I have to switch it back to IDE before I make the virtual image of the drive.

    In the reverse scenerio, I may want to take a vhd image and write it to physical media - and if I want to ultimately set it to AHCI, I would have to make the corresponding flip in the Registry before swapping interfaces.

    What say ye?

    Jim
      My Computer


  2. Posts : 1,127
    Win7U 64 RTM
       #2

    Hi jharris. Welcome. :)

    First: I wanted to ENABLE AHCI because (supposedly) it improves HDD performance. (It also enables a host of other interesting features.)
    For me, the reasons to enable AHCI are Native Command Queuing and Hot Swapping, hot swapping being the most important to me.

    As far as switching back and forth, I could imagine issues arising from that (including confusion as to what mode I was running in at a given time...).

    But if I needed to do it as a utility to convert drives to vhd's, I would consider a dual boot, with the AHCI disabled boot just a simple OS with whatever utilities I needed to get the job done. Keeping it simple would mean a quick boot to desktop and a small partition.

    James
    Last edited by James Colbert; 27 May 2011 at 21:56.
      My Computer


  3. Posts : 126
    Windows 7 Professional x64
       #3

    Sorry to bump this thread, but I think this is related...
    Anyway after having installed Windows in IDE mode, I decided to switch to AHCI, so I changed msahci's start value to 0. It rebooted fine and installed the necessary drivers, and I also noticed the hard drive WEI score increased. So it sounds like it should be enabled and working properly right?
    However, I wanted to compare POST screen times for AHCI vs IDE, so I switched to IDE mode in BIOS, and I noticed that Windows was still able to boot... it supposedly isn't supposed to be able to boot right?
    So I looked in the registry editor and realised the 'start' values for both pciide and msahci were both set to 0. So how can I tell if AHCI is properly enabled or not?


    EDIT: Spoke too soon... I downloaded AS-SSD benchmark and in AHCI it reports that I'm in AHCI (msahci) mode. Then if I use IDE, it says it's in IDE (pciide) mode, yet Windows still boots. Is it bad to have both drivers enabled? I changed pciide's start value to 3, then tried booting in IDE and only then did it crash just as I expected. So is it better to disable pciide if I'm using AHCI? I mean since Windows didn't automatically disable it, I have no idea.
      My Computer


  4. Posts : 2
    windows 7 ultimate x64
       #4

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\msahci =0
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\iaStor =0 - for me as laptop user work it this one
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\iaStorV =0
      My Computer


  5. Posts : 4
    windows 7 pro x64
       #5

    I have :

    • msahci's START value is "3"
    • pciide's START value is "3"

    is this correct ? I have sometimes blue screen 0x0000007b
    My laptop is vaio z116 no option to switch between ide and ahci

    internal ssd removed , I have SSD (Sand Disk 128gb) installed by caddy .

    any help please .
      My Computer


  6. Posts : 2
    windows 7 ultimate x64
       #6

    ssd is diffrent then hdd dont know about it
      My Computer


  7. Posts : 1
    Windows 7 Ultimate x64
       #7

    Sorry to ressurect an old post but wanted to clear some confusions and make things straight.

    During the Windows installation, out-of-the-box and recovery mode, Windows generally loads a generic AHCI driver called "Standard AHCI 1.0 Serial ATA Controller" if the HDD is connected to an SATA port or "Standard Dual Channel PCI IDE Controller" if the HDD is connected to a PATA port.

    A driver can have 5 states of startup:
    0=Boot/System(loaded before the "Starting Windows" logo animation)
    1=Startup(loaded during the Windows logo startup animation)
    2=Automatic(loaded during the log-on)
    3=Manual/Demand(loaded only if is demanded by a process)
    4=Disabled(never loaded)
    "Standard AHCI 1.0 Serial ATA Controller" depends on "msahci"("storahci" in Win10) and "atapi" sub-drivers/non-pnp drivers.
    "Standard Dual Channel PCI IDE Controller" depends on "pciide" and "atapi" sub-drivers/non-pnp drivers.
    Non-PnP drivers are located in registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services]

    HDD/SDD drivers are always loaded first (0 priority) in order to reliably and continously read the drive. The drive containing the Windows files cannot be disabled and switching the startup type to anything than 0 will result in a blue screen bootloop. However, disabling the other non-critical HDD drivers is recommended and will off-load the system and slightly speed up the boot time. (ex. if your Windows drive is connected to SATA, set "pciide" startup to 3).
    Those drivers are only generic/standard drivers that contain a minimal set of features (NCQ amongst others). What you really want to do is to install the IDE/AHCI/RAID driver from your chipset manufacturer. (ex. if you have an Intel/AMD/nVidia/VIA/SIS/other chipset on your motherboard, head over to their website and install the latest IDE driver) and disable the generic IDE drivers(set them to 3). This will replace the generic driver, greatly improve the hard drive performance and add in additional features (AF/4K, Power Management, TRIM, NCQ, fixes...). After installing your Chipset's manufacturer driver, you can set "atapi" "msahci" "pciide" and other unrelated drivers to 3(ex. if you install AMD IDE drivers for your chipset, disable/set to 3 all nvidia/intel/via ide drivers).

    Intel IDE drivers depend on "iaStor", "iaStorA", "iaStorAV", "iaStorF", "intelide"
    AMD IDE drivers depend on "amd_sata", "amd_xata", "amdide"
    nVidia IDE drivers depend on "nvraid", "nvstor64", "nvstor"
    If you are unsure what driver to disable, head over to Device Manager, right click & Properties on your IDE controller, go to Driver, click Driver Details and note the .sys files it's using. These are the non-pnp drivers dependencies fount in the "services" registry key so you want to disable anything else.

    In conclusion: Replace your generic HDD controller drivers with proper ones, disable unecessary non-pnp drivers(i recommend setting them to 3 because sometimes you may use them for backup drives) and don't disable what you don't know. Good luck.
      My Computer


  8. Posts : 1
    Win 7 x64
       #8

    alexceltare2 said:
    Sorry to ressurect an old post but wanted to clear some confusions and make things straight.

    During the Windows installation, out-of-the-box and recovery mode, Windows generally loads a generic AHCI driver called "Standard AHCI 1.0 Serial ATA Controller" if the HDD is connected to an SATA port or "Standard Dual Channel PCI IDE Controller" if the HDD is connected to a PATA port.

    A driver can have 5 states of startup:
    0=Boot/System(loaded before the "Starting Windows" logo animation)
    1=Startup(loaded during the Windows logo startup animation)
    2=Automatic(loaded during the log-on)
    3=Manual/Demand(loaded only if is demanded by a process)
    4=Disabled(never loaded)
    "Standard AHCI 1.0 Serial ATA Controller" depends on "msahci"("storahci" in Win10) and "atapi" sub-drivers/non-pnp drivers.
    "Standard Dual Channel PCI IDE Controller" depends on "pciide" and "atapi" sub-drivers/non-pnp drivers.
    Non-PnP drivers are located in registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services]

    HDD/SDD drivers are always loaded first (0 priority) in order to reliably and continously read the drive. The drive containing the Windows files cannot be disabled and switching the startup type to anything than 0 will result in a blue screen bootloop. However, disabling the other non-critical HDD drivers is recommended and will off-load the system and slightly speed up the boot time. (ex. if your Windows drive is connected to SATA, set "pciide" startup to 3).
    Those drivers are only generic/standard drivers that contain a minimal set of features (NCQ amongst others). What you really want to do is to install the IDE/AHCI/RAID driver from your chipset manufacturer. (ex. if you have an Intel/AMD/nVidia/VIA/SIS/other chipset on your motherboard, head over to their website and install the latest IDE driver) and disable the generic IDE drivers(set them to 3). This will replace the generic driver, greatly improve the hard drive performance and add in additional features (AF/4K, Power Management, TRIM, NCQ, fixes...). After installing your Chipset's manufacturer driver, you can set "atapi" "msahci" "pciide" and other unrelated drivers to 3(ex. if you install AMD IDE drivers for your chipset, disable/set to 3 all nvidia/intel/via ide drivers).

    Intel IDE drivers depend on "iaStor", "iaStorA", "iaStorAV", "iaStorF", "intelide"
    AMD IDE drivers depend on "amd_sata", "amd_xata", "amdide"
    nVidia IDE drivers depend on "nvraid", "nvstor64", "nvstor"
    If you are unsure what driver to disable, head over to Device Manager, right click & Properties on your IDE controller, go to Driver, click Driver Details and note the .sys files it's using. These are the non-pnp drivers dependencies fount in the "services" registry key so you want to disable anything else.

    In conclusion: Replace your generic HDD controller drivers with proper ones, disable unecessary non-pnp drivers(i recommend setting them to 3 because sometimes you may use them for backup drives) and don't disable what you don't know. Good luck.

    I want to thank you for the detailed explanation, was worried that i didn't activate AHCI properly on win 7, because i want the OS to use the TRIM on my SSDs, but now i'm sure i did and all is ok. I'm using the last intel AHCI drivers that i have injected into my win 7 iso before the normal installation procedure.


    PS: I have disabled the scheduler service and so all background operations (i do it manually when i need to optimize something), hope this wasn't related to TRIM directly, for what i understand this command is used everytime a file is deleted.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:44.
Find Us