Skip to content

mbiegert/linux-nvme

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linux-nvme

This github repository contains:

  • NVME kernel patches for linux made by Andy Lutomirski.
  • PKGBUILD for linux-nvme on Arch maintained by me.

These patches enable NVME drives to enter lower power states.
For example: my case (XPS13, linux-nvme4.9.0) it decreases idle usage by ~1.5watt (see Benchmarks file)

NEW INFO: I have built 4.11rc1 and it seems this patch has made mainline!

It seems that the patch to disable SM951 has been merged also:

static const struct nvme_core_quirk_entry core_quirks[] = {
	/*
	 * Seen on a Samsung "SM951 NVMe SAMSUNG 256GB": using APST causes
	 * the controller to go out to lunch.  It dies when the watchdog
	 * timer reads CSTS and gets 0xffffffff.
	 */
	{
		.vid = 0x144d,
		.fr = "BXW75D0Q",
		.quirks = NVME_QUIRK_NO_APST,
	},

5 Ways to install:

1) ARCH manually compile kernels: (EASY/SLOW)

  • git clone: https://github.com/damige/linux-nvme.git
  • go into /src/[kernel you want]
  • type "makepkg" -wait until compilation completes-
  • pacman -U linux-nvme-*
  • Adjust your bootloader of choice to boot linux-nvme

2) non-ARCH/ARCH Patch kernel of choice: (HARD/SLOW)

4.8.x:
Patch using nvmepatch1-V4.patch, nvmepatch2-V4.patch, nvmepatch3-V4.patch.
4.9.x:
Patch using APST.patch, pm_qos1.patch, pm_qos2.patch, pm_qos3.patch, nvme.patch
4.10.x:
Patch using APST.patch

3) ARCH AUR:(EASY/SLOW)

  • use AUR helper of choice to install "linux-nvme"
  • Adjust your bootloader of choice to boot linux-nvme

If you choose to trust me compiling it for you:


4) ARCH REPO: (EASY/FAST)


* Add to your /etc/pacman.conf
[linuxnvme]
SigLevel = TrustAll
Server = http://linuxnvme.damige.net/repo

  • Update db and install with:

pacman -Sy
pacman -S linuxnvme/linux-nvme linuxnvme/linux-nvme-headers linuxnvme/linux-nvme-docs

My GPG key (for reference) is: A6255D31F80BEC97
  • Adjust your bootloader of choice to boot linux-nvme

5) ARCH binary download: (EASY/FAST)


  • install with:

pacman -U linux-nvme-*

  • Adjust your bootloader of choice to boot linux-nvme


To test if the APST is working try:


  • install nvme-cli and: "nvme get-feature -f 0x0c -H /dev/nvme0" Expected output is: "Autonomous Power State Transition Enable (APSTE): Enabled"

  • Check if "/sys/class/nvme/nvme0/power/pm_qos_latency_tolerance_us" exists

  • Verify measurably lower power usage when ssd is idle

Known issues:

In the latest patches the samsung SM951 (as used in the XPS 9350) has been disabled for NVME APST. This is due to some reported instability.
I have not included the patch disabling this nvme drive, as i use it myself. Incase you want the full APST patch its listed as APST-FULL.patch

TODO:

  • None?

About

NVME patches for (ARCH) linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%