Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ a device (e.g. L0s, L0sL1 or L1).
sudo autoaspm.py
```

#### Automatially apply on boot
Copy the `auto-aspm.service` systemd service file into the `/etc/systemd/system/`-directory. Edit the file and change the `WorkingDirectory` to the directory where you have saved the `autoaspm.py` file and replace the path to the python3 interpreter and the path to the script on the `ExecStart` line. Once that is done, run `systemctl daemon-reload` to update systemd service definitions and then run `systemctl enable auto-aspm.service` to run the script on boot or `systemctl enable --now auto-aspm.service` to run now and on boot.

### Credits

- Luis R. Rodriguez for writing the original enable_aspm script:
Expand Down
11 changes: 11 additions & 0 deletions auto-aspm.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Run the autoaspm.py script to enable supported ASPM levels for PCIe devices.

[Service]
User=root
WorkingDirectory=/root/
ExecStart=/usr/bin/python3 /root/autoaspm.py
Restart=on-failure

[Install]
WantedBy=multi-user.target