Skip to content

notthebee/AutoASPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoASPM

A Python script that automatically activates ASPM for all supported devices on Linux.

It parses the lspci -vv output to determine which ASPM level is supported by a device (e.g. L0s, L0sL1 or L1).

Dependencies

  • pciutils
  • python3
  • which

Usage

NixOS - Run once

sudo nix run github:notthebee/AutoASPM

NixOS - Install permanently

  1. Add this repository to your flake.nix:
{
  inputs.autoaspm = {
    url = "github:notthebee/AutoASPM?shallow=true";
    # NOTE: optionally your flake's `nixpkgs`
    # inputs.nixpkgs.follows = "nixpkgs";
  };

  # ...
}
  1. Import the AutoASPM Nix module in your nixosConfiguration (assuming access to your flake's inputs as a specialArg):
{ inputs, pkgs, lib, ... }:
{
  imports = [
    inputs.autoaspm.nixosModules.default
  ];

  # ...
}
  1. Enable the AutoASPM service in your configuration:
{
  # ...

  services.autoaspm.enable = true;
}
  1. ???
  2. Profit

Other Linux distributions

  1. Clone this repository

  2. Run sudo ./pkgs/autoaspm.py

Credits

About

A script that automatically activates ASPM for all supported devices on Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published