Skip to content

Commit

Permalink
clarifications and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mazunki committed Jun 28, 2024
1 parent 54ad6c6 commit 55416b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
14 changes: 13 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ amdfan print-default --configuration | sudo tee /etc/amdfan.yml


# Executable files
`src/amdfan` cont
The executable files are contained within amdfan. This directory is a python module, and can either be loaded as `python -m amdgpu`. If you want to import the module, you may be interested in checking out `amdfan.commands`, which contains most of the subcommands.

Otherwise, just use python-exec with something like

```python
import sys
from amdfan.__main__ import main

if __name__ == '__main__':
sys.exit(main())
```



# Installing from PyPi
You can also install amdfan from pypi using something like poetry.
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Commands:
set Manually override the fan speed
```

Each subcommand supports `--help` too, to get more details.

## Controlling the fans

There are two ways to control your fans with Amdfan. Note that in order to control the fans, you will likely need to run either approach as root.
Expand All @@ -68,8 +70,9 @@ You can use Amdfan to monitor your AMD video cards using the `monitor` flag. Thi

## Configuration

Running `amdfan print-default --configuration` will dump out the default configuration that would get generated for `/etc/amdfan.yml` when you first run it as a service. Commented
Running `amdfan print-default --configuration` will dump out the default configuration that would get generated for `/etc/amdfan.yml` when you first run it as a service. If a value is not specified, it will use a default value if possible.

The following config is probably a reasonable setup:
``` bash
speed_matrix:
- [4, 4]
Expand All @@ -87,12 +90,13 @@ frequency: 5
# cards:
# - card0
```
You can use this to generate your configuration by doing `amdfan print-default --configuration | sudo tee amdfan.yml`, which you can manually edit.

`speed_matrix` (required): a list of thresholds [temperature, speed] which are interpolated to calculate the fan speed.
`threshold` (default `0`): allows for some leeway in temperatures, as to not constantly change fan speed
`frequency` (default `5`): how often (in seconds) we wait between updates
`cards` (required): a list of card names (from `/sys/class/drm`) which we want to control.
If a configuration file is not found, a default one will be generated. If you want to make any changes to the default config before running it the daemon first, run `amdfan print-default --configuration | sudo tee /etc/amdfan.yml` and do your changes from there.

- `speed_matrix` (required): a list of thresholds `[temperature, speed]` which are interpolated to calculate the fan speed.
- `threshold` (default `0`): allows for some leeway in temperatures, as to not constantly change fan speed
- `frequency` (default `5`): how often (in seconds) we wait between updates
- `cards` (required): a list of card names (from `/sys/class/drm`) which we want to control.

Note! You can send a SIGHUP signal to the daemon to request a reload of the config without restarting the whole service.

Expand Down

0 comments on commit 55416b2

Please sign in to comment.