How to optimize an M.2 PCIe NVMe SSD from BIOS and UEFI

  • Understanding the difference between M.2 SATA and M.2 NVMe, as well as the use of PCIe x4 and UEFI, is essential for the motherboard to recognize and take full advantage of the SSD.
  • Updating the BIOS/UEFI, correctly configuring the boot mode (UEFI, CSM, Secure Boot), and prioritizing NVMe as the boot drive ensures compatibility and stability.
  • Adjusting Windows functions such as TRIM, indexing, Prefetch/Superfetch, and write caching optimizes SSD performance and reduces unnecessary writes.
  • Verifying performance with benchmarks or practical tests allows you to confirm that the applied configuration actually improves the speed and response of the system.

M.2 PCIe NVMe SSD

If you've just installed an M.2 PCIe NVMe SSD and are seeing strange messages in the BIOS or UEFI about shared bandwidth, PCIe modes, or UEFI/Legacy boot, that's perfectly normal. Each motherboard handles this differently, and while it might seem a bit overwhelming at first, understanding four key concepts will allow you to fine-tune your system and avoid problems like the drive not being detected or being unable to install Windows on it.

In the following lines you will see how to optimize an M.2 PCIe NVMe SSD from the BIOS and UEFI , what options such as PCIe x4, AHCI, CSM or Secure Boot mean, how to configure the drive as a boot disk and which Windows settings you should check to get the most out of them without shortening their lifespan prematurely.

Key concepts for NVMe SSD optimization

Before touching anything in the motherboard configuration, it is important to understand what an NVMe SSD is and why it does not behave the same as a mechanical hard drive or a conventional SATA SSD, since many of the options we will see in BIOS and UEFI come from these changes in the way data is accessed.

What is NVMe and how does it differ from other SSDs

NVMe stands for Non-Volatile Memory Host Controller Interface Specification , which is not a type of memory itself, but a protocol designed to work over the PCI Express bus. Compared to older interfaces designed for mechanical hard drives, NVMe uses a much simpler and more efficient set of commands , with a high level of parallelism, allowing it to take advantage of the low latency of flash memory, multi-core CPUs, and large amounts of RAM.

While an HDD needs to move a physical read/write head across spinning platters to read or write data, NVMe SSDs allow the processor to handle many simultaneous requests without the mechanical drag. This means that even consumer models easily exceed the theoretical limit of SATA (600 MB/s) and, thanks to the PCIe bus, can achieve several GB/s of real-world read and write speeds.

M.2 SATA vs M.2 NVMe

The M.2 interface is a physical card format, not a specific storage technology; therefore, it's important to distinguish between M.2 SATA and M.2 NVMe . Both use the same type of connector, but internally they work differently, and the motherboard can treat each type separately.

An M.2 SATA drive works similarly to a 2,5-inch SSD : data passes through the SATA controller, and its speed limit is around 600 MB/s. The typical path is disk → memory → CPU → memory → disk, with more intermediaries and bottlenecks.

M.2 NVMe drives, on the other hand, connect to the system via PCIe lanes , making access to the CPU much more direct. Unnecessary steps are avoided and latency is drastically reduced, which is why we can see theoretical bandwidths of around 10 GB/s or more when using multiple PCIe lanes in parallel.

Keys for keys M.2 (B, M and B+M)

When installing an M.2 SSD, you'll notice that not all of them have the same notch on the connector tab. These "notches" are called keys and determine what type of signal each drive supports, which is critical for the motherboard to recognize it correctly.

  • Key B: common in some older M.2 SATA and NVMe drives.
  • Key M+B: hybrid models compatible with both SATA M.2 and certain NVMe.
  • Key M: the fastest modern NVMe SSDs, designed for PCIe x4 bus.

In laptops, it's also easy to confuse M.2 ports with mSATA ports , which are not the same. Inserting an M.2 SSD into an mSATA slot won't work; carefully check your computer's manual before forcing the connector. And if your motherboard only supports M.2 SATA, you won't be able to use an NVMe drive even if it physically fits.

PCIe x4 mode and bandwidth sharing

Many motherboards allow you to configure each M.2 slot in different PCIe modes. To get the most out of an NVMe drive, look in your BIOS/UEFI for the option that enables PCIe x4 mode for the corresponding slot. Using fewer lanes (x2 or x1) will severely limit speed.

In many models, enabling PCIe x4 in a slot means that some SATA ports will be disabled or limited because they share PCIe lanes or chipset resources. This might appear as a message when installing the SSD (“SATA ports disabled when using M.2 NVMe”) or be explained in the manual. It's not a bug; it's a design choice: bandwidth from certain ports is sacrificed in exchange for maximizing the speed of the NVMe drive.

BIOS/UEFI configuration and compatibility

When you install an M.2 NVMe PCIe drive, the BIOS/UEFI may display messages regarding NVMe configuration, enabling/disabling CSM, choosing between UEFI and Legacy boot modes , or changes to boot priorities. These messages generally do not indicate hardware errors, but rather optional or recommended settings to get the most out of the SSD.

Because each manufacturer implements these options in their own way, there's no universal step-by-step guide. Even so, if you understand what each option does and use your motherboard manual and the contextual help in your BIOS/UEFI , you can configure your computer with confidence and avoid common headaches: systems that won't boot from NVMe, undetected drives, or Windows installers that display messages like "cannot be installed on this disk."

Motherboard manual and general suggestions

Modern motherboards often dedicate several pages of their manuals to M.2 slots, their compatibility, and their interaction with SATA ports . Before you start changing settings randomly, it's worth locating that section and reviewing it.

  • Which M.2 sockets are supported NVMe PCIe x4 complete.
  • Which SATA ports are disabled when using certain sockets.
  • Which combinations require configuration UEFI only o Legacy in certain parameters.
  • If the manufacturer offers automatic profiles for Detect and optimize NVMe SSDs.

If, after following these instructions, you still don't see the SSD in the BIOS or your system won't boot, the best course of action is to contact the official support for your motherboard or computer manufacturer. In many cases, a BIOS/UEFI update resolves compatibility issues with recent NVMe models.

UEFI

Key steps to optimize an M.2 NVMe SSD from BIOS/UEFI

Beyond the specific case of each brand, there are a number of BIOS/UEFI settings that should always be checked when using an M.2 PCIe NVMe SSD as your main drive , especially if you are going to install or migrate Windows onto it.

Update BIOS/UEFI

The first thing you should confirm is that your motherboard has a recent BIOS/UEFI version installed . Updates usually include improved compatibility with NVMe drives, fixes for detection errors, and sometimes performance or stability improvements.

Visit the manufacturer's website, locate your exact motherboard model, and download the latest stable firmware . Follow the recommended procedure precisely (usually using the update tool integrated into the UEFI itself) and do not interrupt the process, as an interruption at this point could render the motherboard unusable.

AHCI, SATA and NVMe modes

In the storage settings, you'll see a mode selector for the SATA controller, where you'll usually find IDE, RAID, AHCI , or similar options. AHCI was designed for mechanical hard drives and, in many cases, is still useful for traditional HDDs, but it's not essential for NVMe SSDs, which use their own PCIe-based controller.

In systems with a mix of SATA HDDs and SSDs , a sensible option is to use AHCI only for the mechanical drives and avoid modes you don't need. Some users prefer to disable AHCI for specific SATA SSDs when the BIOS allows it, although this is more nuanced and depends heavily on the drive model and the controller's behavior.

If the UEFI offers specific parameters for NVMe Configuration , make sure NVMe support is enabled and that the M.2 slots that support it are defined as PCIe and not SATA. Many motherboards detect this automatically, but it doesn't hurt to double-check.

CSM, UEFI and boot options

The Compatibility Support Module (CSM) is a module that allows UEFI to behave like a traditional BIOS to support older systems. To get the most out of an NVMe SSD as a boot drive, it's best to disable the CSM or reduce its usage and force the system to boot in native UEFI mode.

In some cases, especially with MSI, ASUS, or Gigabyte motherboards, you'll find options like:

  • Storage Boot Option Control: allows you to choose between “Legacy only”, “UEFI only” or “Both”.
  • Other PCI Device ROM Priority: prioritizes PCIe device ROMs in Legacy or UEFI mode.

If the Windows installer tells you that " the hardware cannot boot from this device " or that the disk is not suitable for installing the system, it's usually because the boot configuration is set to Legacy or mixed modes. You can first try setting "Other PCI Device ROM Priority" to Legacy only and see if the NVMe drive is detected; if that doesn't work, change "Storage Boot Option Control" and "Other PCI Device ROM Priority" to UEFI only and try again. If it still doesn't work, you most likely need a BIOS update.

Secure Boot and boot order

Once you have the system installed on the NVMe SSD, go back into the UEFI and verify that Secure Boot is correctly configured and, if desired, enabled. This feature adds a layer of security to the boot process, preventing unsigned or suspicious code from starting.

Next, in the Boot section, assign the NVMe SSD as the first boot option (on modern motherboards, this usually appears as "Windows Boot Manager (SSD name)"). Leave the USB drive or DVD as the second boot option for future installations, and if you don't need it, deprioritize mechanical hard drives containing older operating systems to avoid conflicts.

Install or migrate Windows to an M.2 NVMe SSD

Once the UEFI is reasonably configured, it's time to decide whether to install Windows from scratch on the NVMe drive or clone/migrate your current system from another disk. Both options are valid, each with its own nuances.

New Windows installation on NVMe

If you're coming from an older system or want to start from scratch, you can perform a clean installation of Windows on the NVMe drive using a prepared installation USB in UEFI mode.

  1. Start the computer from the installation usb of Windows (must have been created with UEFI support).
  2. Configure the on-screen language, time and currency format, and keyboard type by pressing on Next when you finish.
  3. Click on Install Now and follow the wizard instructions.
  4. When you reach the disk selection section, delete any old NVMe partitions (if any) and select the unallocated space of that unit as the destination.

If Windows detects the NVMe drive at this point but says it can't be installed because the computer can't boot from that drive, go back to the BIOS/UEFI and review the information about CSM, Legacy/UEFI, and Boot options . This warning is usually a sign that the motherboard doesn't have UEFI boot enabled for that device.

Migrate the operating system to NVMe

When you don't want to reinstall everything from scratch, you can use system cloning or migration tools . Specialized programs allow you to copy the operating system and critical partitions from your current hard drive to the new NVMe SSD, keeping your programs and data.

One of the common functions in this type of software is " Migrate OS to SSD ," which transfers only what's needed to boot the system and stores it on the NVMe drive. Some utilities use hot cloning, meaning you don't need to restart multiple times. Once the process is complete, simply shut down your PC, leave only the NVMe SSD connected if you want to avoid any issues, and then enter the BIOS to set it as the boot drive.

If you prefer to move all the contents of the disk (system, data, extra partitions), there are usually full disk cloning wizards available . Keep in mind that cloning will erase all data on the destination SSD, so it's advisable to make a backup beforehand if it contained anything. Also, on disks with bad sectors, you must use sector-by-sector cloning mode, provided the capacity of the destination SSD is not less than that of the source disk.

M.2 PCIe NVMe SSD

Windows settings to extend the life and improve the performance of NVMe

Once the BIOS/UEFI part is done, it's time to enter the operating system and review several functions that, although designed for mechanical disks, can put excessive strain on a modern SSD or provide little improvement compared to the wear and tear they cause.

Update SSD firmware

One of the first things you should do after installing the operating system on a new SSD is to visit the SSD manufacturer's website and download their official management tool . These utilities often allow you to check and update the drive's firmware, which can fix bugs, improve performance, and even resolve stability or compatibility issues.

The process is usually simple: the app itself detects the device, displays the current firmware version , and, if an update is available, guides you step-by-step through the process. In some cases, a restart will be required, so do it when you have a moment and avoid power outages during the update.

TRIM: How to verify that it is activated

The TRIM command is essential for an SSD to maintain its performance over time. It allows the operating system to inform the drive which data blocks are no longer in use, so the internal controller can manage them efficiently and prepare clean space for future writes.

In Windows 10 and Windows 11, TRIM is usually enabled by default, but it's easy to check. Open the search bar, type " Command Prompt ", run it as administrator, and enter the following command:

fsutil behavior set disabledeletenotify 0

This ensures that TRIM is enabled. Additionally, Windows includes the Optimize Drives tool (the current name for the former Disk Defragmenter), which detects if the device is an SSD and, instead of defragmenting as with an HDD, performs a periodic "reTRIM" to aid in the drive's internal garbage collection .

File indexing on SSD

Windows includes a built-in indexing service that maintains a file index to speed up searches by name and content. This is quite beneficial on a mechanical hard drive, but on an NVMe SSD, this index is less critical and, in return, involves constant read and write operations that aren't always worthwhile.

If you rarely use the content-based file search, you can disable indexing on your main drive: open File Explorer, go to This PC, right-click on your system SSD, select Properties, and uncheck the box next to "Allow files on this drive to have their contents indexed..." . Applying this change will reduce some of the workload on the SSD, but at the cost of slightly slower searches in some cases.

Prefetch, Superfetch and Windows Search

Windows tends to anticipate your actions by loading parts of frequently used programs into physical or virtual memory. This behavior, known as Prefetch and Superfetch (now integrated into services like SysMain), is more beneficial on systems with HDDs than on very fast SSD configurations, where access times are already very low.

If you want to reduce unnecessary writes and optimize Windows 11 , you can disable these features by adjusting the Windows Registry : In the Registry Editor, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters and locate the “EnablePrefetcher” and “EnableSuperfetch” keys (if they exist). Changing their value to 0 disables them.

Additionally, it's recommended to disable the " Windows Search " and "Superfetch/SysMain" services using the Windows Services tool. Simply search for these names, open their properties, and select "Disabled" for the startup type. After the next restart, they will no longer load, reducing unnecessary workload on your SSD.

Device write cache

On many SSDs, the operating system enables a user-level write cache by default . In theory, this should improve performance, but on some specific models, the practical effect isn't always so positive and can lead to unusual behavior under heavy load.

From the Windows Device Manager, locate your SSD, open its properties, and check the Write Cache section . You can try disabling it, see how the system responds in your actual use, and if you notice it performs worse, re-enable the option. There's no universal rule here; it largely depends on the SSD controller and the type of tasks you perform.

Cleaning the paging file and other memory settings

In modern systems with SSDs, some routines inherited from the HDD era no longer offer much benefit. One of these is the cleaning of the page file on every shutdown , which forces the system to write and overwrite data unnecessarily, generating additional cycles on the SSD without any real performance improvement.

You can modify values ​​like “ClearPageFileAtShutdown” and “LargeSystemCache” in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management using the Windows Registry, setting them to 0 if they exist. However, keep in mind that many modern games are memory-intensive and use the SSD as a cache RAM for textures and data ; if you run out of physical RAM and completely delete the page file, you may experience significant performance drops when the memory becomes saturated.

Defragmenting an NVMe SSD?

For years, it was often said that defragmenting an SSD was counterproductive because it offered no real benefits and, instead, increased write activity , shortening its lifespan. Today, in Windows 10 and 11, the "Optimize Drives" tool recognizes which devices are SSDs and adjusts its behavior: instead of a traditional defragmentation, it performs maintenance operations such as TRIM forwarding.

You can open "Optimize drives" from the Start menu and check the optimization frequency assigned to your SSD. It's best to let the system perform its regular tasks without forcing manual defragmentation, as you would with an older HDD.

How to check if SSD optimization has worked

After adjusting BIOS/UEFI, installing or migrating Windows, and tweaking some system options, it's time to verify if the performance of the M.2 NVMe SSD has really improved or if, in practice, there is hardly any difference compared to before.

The most direct way is to use disk benchmarks , which show sequential and random read and write metrics (MB/s and IOPS). Comparing these before and after optimizations will clearly show whether you've gained speed, especially in random access, where NVMe drives shine compared to standard SATA HDDs and SSDs.

If you don't want to get bogged down with specialized tools, you can run some simpler tests : create a 25 or 30 GB partition on your SSD, fill it with a large folder of mixed files, and move it to another partition on the same drive. The time it takes to complete the operation will give you a pretty good idea of ​​the actual transfer speed , and it's a useful comparison if you repeat the process with a different configuration or after adjusting some relevant settings.

However, it's important to keep in mind that with extremely fast SSDs, even with technical improvements, the jump in the feeling of daily use may be less noticeable because you were already starting from a very high level; opening programs or loading games goes from "very fast" to "slightly faster," something that isn't always as noticeable as switching from an HDD to an NVMe for the first time.

Configure NVMe as a boot drive and general compatibility

To truly take advantage of the potential of an NVMe SSD in your PC, it's not enough to use it as a secondary drive: ideally, you should configure it as your boot drive so that the operating system, applications, and games load from it with the lowest possible latency.

Keep in mind that not all older computers support booting from NVMe. It's essential that the motherboard or a dedicated expansion card supports NVMe booting and that the BIOS/UEFI supports this type of boot. On older machines, even if the operating system can detect the NVMe drive within Windows, the motherboard may not allow booting directly from it without firmware modifications or advanced workarounds.

For compatible computers, the sequence is clear: insert the NVMe drive into the correct slot (using the correct key), check the manual for the recommended boot mode, install or migrate the operating system to that drive, and finally, enter the UEFI to set it as "Boot Option #1" . On MSI motherboards, for example, the typical path is to go to → → set boot priority and select "Windows Boot Manager (name of your NVMe SSD)" as the primary option.

When you have everything set up correctly, a well-configured M.2 PCIe NVMe SSD from BIOS/UEFI and fine-tuned in Windows can completely transform the feeling of fluidity of the computer: from the time it takes to boot up to the loading of levels in games or heavy programs, provided you have understood and sensibly adjusted the PCIe modes, UEFI/Legacy parameters, TRIM and the Windows services that most punish the drive.

SSD Firmware
Related article:
SSD firmware: risks, backups, and tools for updating it

Add as preferred source in Google