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
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.