Split the sleep validator into a package

Split the sleep validator into a package so that the capture, analysis
and suspend helpers can be maintained separately.

While splitting:
* carry over the smu_fw_info debug capture that upstream added to the
  monolithic validator (d617b15)
* guard the rtc_cmos check against systems that don't expose the
  use_acpi_alarm parameter instead of crashing after resume
* import dbus in its own try block before the logind calls: the except
  clause references the dbus module, so when the import fails the
  module name is unbound and the Missing dbus handling would crash
* wire up the duration analysis that was previously unreachable, so
  the per cycle userspace/kernel/hardware sleep durations are printed
* drop a duplicate upep initialisation

The rest of the behaviour is unchanged.
9 files changed
tree: 85172069067ff7c0b2652036a416c956a296f9a4
  1. .github/
  2. .vscode/
  3. docs/
  4. src/
  5. .gitignore
  6. .pre-commit-config.yaml
  7. LICENSE
  8. Makefile
  9. psr.py
  10. pyproject.toml
  11. README.md
README.md

Helpful tools for debugging AMD Zen systems

codecov PyPI

This repository hosts open tools that are useful for debugging issues on AMD systems.

Installation

Distro (Arch)

amd-debug-tools has been packaged for Arch Linux (and derivatives). You can install it using:

pacman -Sy amd-debug-tools

Using a python wheel (Generic)

It is suggested to install tools in a virtual environment either using pipx or python3 -m venv.

From PyPI

amd-debug-tools is distributed as a python wheel, which is a binary package format for Python. To install from PyPI, run the following command:

pipx install amd-debug-tools

From source

To build the package from source, you will need to the python3-build package natively installed by your distribution package manager. Then you can generate and install a wheel by running the following commands:

python3 -m build
pipx install dist/amd-debug-tools-*.whl

Ensuring path

If you have not used a pipx environment before, you may need to run the following command to set up the environment:

pipx ensurepath

This will add the pipx environment to your path.

Running in-tree

Documentation about running directly from a git checkout is available here.

Tools

Each tool has its own individual documentation page: