Windows 8 AHCI BSOD
How to Fix Windows 8 AHCI BSOD
If you’re running Windows 8 or later, then change the SATA mode in the BIOS to AHCI from IDE (which is technically PATA), you will get a BSOD (blue screen) on the next boot. Windows does not configure itself to load the AHCI driver upon boot if the SATA-drive controller was not in AHCI mode at the time of installation. Crap…
There are two methods that I know of that will allow you to enable AHCI after Windows 8 installation. One is safe mode, and the other is editing the registry. Only the safe mode method worked for me.
The reason I changed to AHCI mode other than the fact that it is a newer standard, is to take advantage of native command queueing (NCQ) that is only available in AHCI mode and has been proven to increase read/write performance of spindle and SSD drives.
Method 1: Safe Mode
Step 1: Press Win+R and type in msconfig
Step 2: Go to the boot tab, check Safe Mode under the boot options
Step 3: Reboot into your BIOS and switch to AHCI or RAID mode
Step 4: Save the settings and reboot again, this time loading Windows safe mode
Step 5: Uninstall the Standard Dual Channel PCI IDE Controller under IDE/ATA Controllers from Device Manager
Step 6: Run msconfig again, uncheck Safe Mode, reboot again
Step 7: You should have booted into normal mode with AHCI or RAID mode enabled
Method 2: Editing The Registry
Step 1: Open regedit and navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\storahci
Step 2: Find the entry for Error Control and change it’s value from 3 to 0
Step 3: Reboot and cross your fingers
Step 4: If it doesn’t work, change it back to IDE in your BIOS, perform method 1 instead
What is AHCI ?
AHCI stand for Advance Host Controller Interface. AHCI is a hardware mechanism that allows software to communicate with Serial ATA (SATA) devices (such as host bus adapters) that are designed to offer features not offered by Parallel ATA (PATA) controllers, such as hot-plugging and native command queuing (NCQ). The specification details a system memory structure for computer hardware vendors in order to transfer data between system memory and the device.
Many SATA controllers can enable AHCI either separately or in conjunction with RAID support. Intel recommends choosing RAID mode on their motherboards (which also enables AHCI) rather than the plain AHCI/SATA mode for maximum flexibility, due to the issues caused when the mode is switched once an operating system has already been installed.
AHCI is fully supported out of the box for Microsoft Windows Vista and the Linux operating system from kernel 2.6.19. NetBSD also supports drivers in AHCI mode out of the box in certain versions. Older operating systems require drivers written by the host bus adapter vendor in order to support AHCI.
Advantage of AHCI
- Hot-Plugging (will not cover here as it will not affect computer performance)
- Native Command Queuing (might improve computer/system/hard disk responsiveness, especially in multi-tasking environments
So, what is NCQ?
In principle, Native Command Queuing is relatively simple. It allows the drive to execute write /read commands that are transmitted randomly in order to optimise the movement of the reading head.
Speed is increased but there is also an impact on power consumption and noise level which is reduced. Of course, applications don’t have to work simultaneously and don’t have to wait for the previous result to send the next command. This of course isn’t always possible. Another possibility in using NCQ is multitasking in the case where you run two very heavy applications simultaneously from the drive point of view.
To better explain this situation, imagine an elevator, in which two people enter simultaneously on the ground floor. The first pushes the 12th floor button and the second the 2nd floor. It would be counterproductive to go to the 12th floor and then to the 2nd floor. The principle of NCQ was already in the ATA norm since 1997 with TCQ (Tagged Command Queuing). This heavier protocol could sometimes lead to significant performance losses in the case of low loads (no or very little command reorganisation to do) and has been integrated in a limited number of controllers. Hitachi supports it on 7K250 drives, like Western and the Raptor WD740GD, while on the chipset side, we can count on NVIDIA but not Intel.
SATA 3.0 Gbits /s defines a new speed of data transmission for the Serial ATA interface. Initially, SATA reached up to 1.5 Gbits /s, which really corresponds to 150 mega-octets per second as 20% of information is dedicated to error correction. The transfer rate is now increased to 300 MB/s but we have to keep in mind that this is the interface speed. It has nothing to do with disc speed alone. At most, cache speed would be affected.
For NCQ to be enabled, it must be supported and turned on in the SATA host bus adapter and in the hard drive itself. The appropriate driver must be loaded into the operating system to enable NCQ on the host bus adapter. Many newer chipsets support the Advanced Host Controller Interface (AHCI), which should allow a generic driver supplied by the operating system to control them and enable NCQ. In fact, newer mainstream Linux kernels support AHCI natively. Unfortunately, Windows XP requires the installation of a vendor-specific driver even if AHCI is present on the host bus adapter. Windows Vista corrects this situation by including a generic AHCI driver.
NCQ in solid-state drives
NCQ is also used in newer solid-state drives where the drive encounters latency on the host, rather than the other way around. For example, Intel’s X25-E Extreme solid-state drive uses NCQ to ensure that the drive has commands to process while the host system is busy processing CPU tasks.
NCQ also enables the SSD controller to complete commands concurrently (or partly concurrently, for example using pipelines) where the internal organisation of the device enables such processing.
For example, the SandForce 1200 based OCZ Vertex II 50GB drive running on a Dell Perc 5i (which doesn’t support SATA NCQ) delivers about 7,000 4k IOPS (50% write) at a controller queue depth of 32 IOs. Moving the drive to the similar Dell Perc 6i (which does support SATA NCQ) increases this to over 14,000 IOPS on the same basis.
Sources:
http://www.ithinkdiff.com/how-to-enable-ahci-in-windows-8-after-installation/
http://forum.crucial.com/t5/Solid-State-Drives-SSD/Why-do-i-need-AHCI-with-a-SSD-Drive-Guide-Here-Crucial-AHCI-vs/td-p/57078
http://en.wikipedia.org/wiki/Native_Command_Queuing#NCQ_in_solid-state_drives
January 27, 2013 2:17 am @ 02:17
Nothing as work for me. I guess I am stuck with ide on Windows 8. Did not have this much problems with windows 7
January 27, 2013 11:14 am @ 11:14
Were you able to boot into safe mode after enabling AHCI in the BIOS? What build of Windows 8 do you have?
March 12, 2013 1:24 am @ 01:24
I have successfully changed my drive setting from IDE to AHCI by following the above suggestion to boot into safe mode with just one change.
When you have booted into safe mode go into Control Panel -> System and select device manager on the left.
In device manager open IDE ATA/ATAPI controllers and remove the Standard Dual Channel PCI IDE Controller.
Now run MSCONFIG again and turn safe mode off again, click apply and when it asks you to reboot now do so.
Using this method the issue was solved on my machine, but as it is Windows we are talking about, good luck to you all he he
March 12, 2013 10:53 am @ 10:53
Thanks for contributing Equalizer, I will update this post with your info in case more people have the same issue in the future. What Win 8 edition and build number are you running?
March 12, 2013 11:23 am @ 11:23
This worked on Windows 8 Pro build 9200
April 6, 2013 6:00 pm @ 18:00
I’ve changed on AHCI using safe mode!
In my case, after reboot in Safe mode, there is not Standard IDE in Device Manager. but i found there Standard AHCI! I rebooted system again after disabling Safe mode and voilà – system perfectly works with AHCI-mode.
Thank you for this suggestion.
I’ve using win8 pro x64 with all critical updates at this moment
April 9, 2013 7:42 pm @ 19:42
Sweet, thanks for the positive feedback and enjoy the AHCI NCQ :) Now queue the music ¯\_(ツ)_/¯
May 15, 2013 4:25 pm @ 16:25
I used the safe mode method. Worked like a charm. My pc crashed and had to restore bios settings. Was able to get into winodws but was stuck on pciide mode. This method allowed me to get back on ahci mode and regain my ssd speeds I lost. The difference on as ssd was significant. I could feel the difference between ahci and ide mode on my vertex 3 128gb. On windows 8 pro build 9200. Thank you for the easy fix
May 21, 2013 8:28 am @ 08:28
Awesome, thanks for sharing Joe. I suspected that the performance difference is amplified by using SSD drives.
December 24, 2013 11:19 am @ 11:19
Thanks, mate SaveMode option workd for Me.
January 4, 2014 6:39 pm @ 18:39
I started following this but when I reboot in Safe Mode (preparing to uninstall the IDE drivers).
There were already AHCI drivers there under [IDE/ATA Controllers] from Device Manager.
I guess what I’m saying is my OS recognised the BIOS change and switched automatically.
I didn’t really need Safe Mode at all, I could’ve just changed the BIOS straight up…
Quite a new MB (ASUS P8H77-i) and Windows 8.1 Pro 64bit. Don’t know if that combination helped me.
Best Luck to all :)
January 10, 2014 7:50 am @ 07:50
Seems to me that Windows 8.1 doesn’t suffer the same issue as Windows 8 and is able to dynamically detect the mode at boot time. In the future all of this information will be useless. Just like when Windows 2003 admins had to manually align the partition offset to 64k for SQL Server database files.
January 4, 2014 6:39 pm @ 18:39
I started following this but when I reboot in Safe Mode (preparing to uninstall the IDE drivers).
There were already AHCI drivers there under [IDE/ATA Controllers] from Device Manager.
I guess what I’m saying is my OS recognised the BIOS change and switched automatically.
I didn’t really need Safe Mode at all, I could’ve just changed the BIOS straight up…
Quite a new MB (ASUS P8H77-i) and Windows 8.1 Pro 64bit. Don’t know if that combination helped me.
Best Luck to all :)
January 10, 2014 7:50 am @ 07:50
Seems to me that Windows 8.1 doesn’t suffer the same issue as Windows 8 and is able to dynamically detect the mode at boot time. In the future all of this information will be useless. Just like when Windows 2003 admins had to manually align the partition offset to 64k for SQL Server database files.