tuxclocker/README.md

277 lines
9.3 KiB
Markdown
Raw Normal View History

2023-09-25 15:00:49 -05:00
# About
TuxClocker is a hardware controlling and monitoring program. TuxClocker consists of a DBus daemon and a Qt GUI that uses the daemon.
2023-09-26 07:20:02 -05:00
## Chat
If you have any questions or suggestions, you can join the chat on [Matrix](https://matrix.to/#/#tuxclocker:matrix.org) or [IRC](https://webchat.oftc.net/?nick=&channels=%23tuxclocker&uio=d4)
2019-01-22 07:35:17 -06:00
2023-09-26 07:20:02 -05:00
You can use IRC if you don't want to create an account. Both chats are bridged between each other.
2023-10-05 12:55:18 -05:00
## Translations
TuxClocker uses GNU gettext for translations. You can use [Weblate](https://hosted.weblate.org/projects/tuxclocker/) or edit them locally, and make a pull request.
2023-09-25 15:00:49 -05:00
## Features
- Supports any number of devices at once
- Read and write device properties (Click on a selected node to edit)
2023-10-21 04:20:41 -05:00
- Edit multiple similar nodes at once by selecting them and starting editing
2023-09-25 15:00:49 -05:00
- Connect any writable property to any readable property, for more possibilities than just fan curves. Currently only possible with range-based writable properties (Right click on a node)
- Reset writable properties to default (Right click on a node)
- Profiles
- Option to apply profile settings on startup/profile change
2023-09-25 15:00:49 -05:00
### Currently missing from earlier releases
2023-11-06 05:57:33 -06:00
These are missing from the 1.3.0 release, but present in the 0.1.1 release.
2023-09-25 15:00:49 -05:00
Refer to the [0.1.1 release readme](https://github.com/Lurkki14/tuxclocker/tree/76369ef24283364b4111c5970797062432044cbc) if you wish to use these.
2019-01-27 06:27:37 -06:00
2023-09-25 15:00:49 -05:00
- Graphs for properties
2019-01-26 13:45:59 -06:00
2023-09-25 15:00:49 -05:00
## Currently supported devices and features
2023-09-25 15:00:49 -05:00
### Nvidia GPUs
2019-01-22 07:35:17 -06:00
2023-09-25 15:00:49 -05:00
#### 600 -series and above
- Support for multiple fans on one GPU
- Fan mode
- Fan speed
2023-11-01 07:21:34 -05:00
- Core and memory clocks (Xorg only)
2023-09-25 15:00:49 -05:00
- Power limit
- Temperatures
- Utilizations
2023-12-04 04:30:39 -06:00
- VRAM usage monitoring
2023-09-25 15:00:49 -05:00
#### 600 to 900 -series
2023-11-01 07:21:34 -05:00
- Voltage setting and reading (Xorg only)
2023-11-06 05:57:33 -06:00
### AMD GPUs
NOTE ABOUT AMD GPUS:
When writing to `pp_od_clk_voltage` (writable properties in the 'Performance' subtree), `power_dpm_force_performance_level` is implicitly set to 'Manual'. Normally this shouldn't matter, but if you set 'Performance Parameter Control' to anything other than 'Automatic' or 'Manual' you may get unexpected results due to the value being overridden by other settings. You can work around this by removing the setting values from your profile by right clicking on the properties.
2023-11-06 05:57:33 -06:00
#### Radeon HD 7000 -series and above (with amdgpu driver)
- Temperatures
- Fan mode
- Fan speed
- Core and memory clock reading
- Performance parameter control (power_dpm_force_performance_level)
2023-12-04 04:30:39 -06:00
- VRAM usage monitoring
2023-11-06 05:57:33 -06:00
#### Vega-series and above
- Voltage monitoring
- Utilizations
#### Vega-series
- Memory and core performance state editing (discrete clock-voltage points)
#### Navi-series and above
- Minimum and maximum core clock editing
- Minimum and maximum memory clock editing
#### Navi-series
- Voltage-frequency curve editing for core clocks
2023-11-09 02:50:08 -06:00
#### RX 6000 -series + ?
- Voltage offset setting
2023-10-09 08:18:31 -05:00
### CPUs
2023-12-04 04:30:39 -06:00
Some CPU features require kernel module `msr` to be loaded.
2023-10-09 08:18:31 -05:00
- Frequency monitoring
2023-10-21 04:20:41 -05:00
- Utilization monitoring
- CPU Governor setting
- CPU Governor minimum/maximum frequency setting
2023-10-09 08:18:31 -05:00
2023-12-04 04:30:39 -06:00
### AMD and Intel CPUs
- Energy-Power Preference setting (called 'Power Usage Mode' in the program)
- Power usage monitoring (MSR)
2023-10-09 08:18:31 -05:00
### Intel CPUs
- Temperature monitoring (coretemp)
2023-10-21 04:20:41 -05:00
- Energy-Performance Bias setting (called Power Saving Tendency in the program)
2023-12-04 04:30:39 -06:00
- Core and memory power usage monitoring (MSR)
- Voltage monitoring (MSR)
2023-10-09 08:18:31 -05:00
2023-09-25 15:00:49 -05:00
## Possible future improvements
- Support for more devices
- Support for more platforms than Linux
- Easier to discover UI
- CLI interface
# Installation
2019-01-22 07:35:17 -06:00
2023-09-26 03:02:32 -05:00
## Prerequisites
NVIDIA GPUs require [Coolbits](https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks#Enabling_overclocking) set to enable editing of most writable properties (31 for all functionality)
2019-05-25 08:30:59 -05:00
AMD GPUs require the [amdgpu.ppfeaturemask](https://wiki.archlinux.org/title/AMDGPU#Boot_parameter) boot parameter to edit writable properties (`amdgpu.ppfeaturemask=0xffffffff` for all functionality)
2023-09-26 07:31:18 -05:00
## Using prebuilt binaries
You can use the `tuxclocker.tar` from the release page if you don't want to compile. The tarball is generated from the `mkTarball.sh` script.
2019-05-25 08:30:59 -05:00
2023-09-26 07:31:18 -05:00
- Download the tarball into some empty directory
- Extract the contents eg. (`tar xf tuxlocker.tar`)
- For NVIDIA users, run `./nvidiaInstall.sh` before running to get suitable NVIDIA libraries through Flatpak
2023-09-26 07:31:18 -05:00
- Run `sudo echo && ./run.sh` in the same folder (sudo is needed for the daemon)
## Using distribution packages
This list may contain unofficial distribution packages, maintained by other people not directly related with this project.
#### For openSUSE Tumbleweed
NOTE: Due to NVIDIA proprietary driver license problems the package is built without NVIDIA modules. See [issue#65](https://github.com/Lurkki14/tuxclocker/issues/65) for more info.
Install the [tuxclocker](https://software.opensuse.org//download.html?project=home%3Atujhen%3Atuxclocker&package=tuxclocker) package from OBS. Or via terminal:
```
sudo zypper in opi
opi tuxclocker
```
2023-10-22 10:58:35 -05:00
#### For Arch Linux
Available on [AUR](https://aur.archlinux.org/packages/tuxclocker)
2020-04-04 12:58:09 -05:00
## Dependencies
2023-11-12 13:09:33 -06:00
Required: `qt (charts, base, dbus), boost-system, boost-filesystem, meson`
Optional:
- `libnvml, libxnvctrl, xlib` - NVIDIA support
- `libdrm` - AMD support
- `python-hwdata, libpython3, python3` - Prettier AMD GPU names
NOTE: some distros like NixOS only contain `libnvml` as part of a fully featured CUDA package.
Note that these packages are likely called something different on each distribution.
2023-09-25 10:32:33 -05:00
#### For Nix
2019-01-22 07:35:17 -06:00
2023-09-25 10:32:33 -05:00
`nix-shell release.nix`
2019-05-25 08:30:59 -05:00
2023-10-24 14:48:38 -05:00
#### For Ubuntu
2023-12-19 07:48:30 -06:00
NOTE: Some Ubuntu releases provide `libboost` which is too old (1.76 or newer is required)
2019-05-25 08:30:59 -05:00
`python-hwdata` is not packaged for Ubuntu but can be acquired on [OBS](https://build.opensuse.org/package/show/home:alvistack/xsuchy-python-hwdata-2.4.1).
2023-12-19 07:39:45 -06:00
2019-05-25 08:30:59 -05:00
```
2023-09-25 10:29:44 -05:00
sudo apt install --yes --quiet --quiet \
libqt5x11extras5-dev \
qtbase5-dev \
libqt5x11extras5 \
libdrm-amdgpu1 \
libdrm-common \
libdrm-dev \
nvidia-utils-440-server \
nvidia-settings \
2023-10-24 14:48:38 -05:00
libxnvctrl-dev \
libssl-dev \
libboost-filesystem-dev \
qttools5-dev-tools \
libqt5charts5-dev \
libboost-dev
2019-05-25 08:30:59 -05:00
```
#### For openSUSE Tumbleweed
`python-hwdata` is not packaged for openSUSE but can be acquired on [OBS](https://build.opensuse.org/package/show/home:tujhen:tuxclocker/python-hwdata).
```
sudo zypper in -y \
meson \
git \
gettext-runtime \
gcc-c++ \
libboost_system-devel \
libboost_filesystem-devel \
libdrm-devel \
libXNVCtrl-devel \
libX11-devel \
libQt5DBus-devel \
libQt5Charts5-devel \
libqt5-qtbase-devel \
libopenssl-devel \
python311-devel \
python311-hwdata \
nvidia-compute-G06
```
2023-09-25 14:10:43 -05:00
## Compiling
#### Meson options
2019-01-27 06:27:37 -06:00
2019-05-25 08:30:59 -05:00
```
2020-04-04 12:58:09 -05:00
--prefix=<path> (install location prefix, usually '/usr')
-Dplugins=<true/false>
-Ddaemon=<true/false> (builds and installs 'tuxclockerd' binary/daemon)
2023-11-12 13:04:40 -06:00
# The following options allow you to abort the build if some components can't be built
-Drequire-nvidia=<true/false>
-Drequire-amd=<true/false>
-Drequire-python-hwdata=<true/false>
2019-05-25 08:30:59 -05:00
```
2020-04-04 12:58:09 -05:00
2023-09-25 14:10:43 -05:00
#### Clone, build and install
2019-05-25 08:30:59 -05:00
```
2020-04-04 12:58:09 -05:00
git clone https://github.com/Lurkki14/tuxclocker
cd tuxclocker
git submodule init
git submodule update
meson build <meson options>
cd build
ninja && sudo ninja install
2019-05-25 08:30:59 -05:00
```
2019-01-27 06:27:37 -06:00
2023-09-26 02:50:35 -05:00
#### Running
2023-11-25 07:34:52 -06:00
Once you have installed everything into a proper location, TuxClocker is available through a launcher or with `tuxclocker-qt` from the terminal.
2019-05-25 08:30:59 -05:00
2023-09-26 02:50:35 -05:00
If TuxClocker shows up with no items, there may be a problem with connecting to the DBus daemon. Refer to your system documentation on where DBus system service entries should be located. Alternatively, you can launch the needed components manually as explained in the Developing/Scripts section of the README.
2019-05-25 08:30:59 -05:00
2023-08-25 02:36:09 -05:00
# Screenshots
2019-05-25 08:30:59 -05:00
2023-08-25 02:36:09 -05:00
### Main view
![Main view](screenshots/mainview.png)
### Editing an item
![Editing an item](screenshots/itemedit.png)
2023-09-06 11:42:12 -05:00
### Parametrizing an item
![Parametrizing an item](screenshots/paramEditor.png)
2023-09-06 11:42:53 -05:00
### Showing pending changes
![Showing pending changes](screenshots/stateChange.png)
2023-09-16 08:30:09 -05:00
### Settings
![Settings](screenshots/settings.png)
2023-07-24 10:54:05 -05:00
# Developing
2023-08-25 02:36:09 -05:00
### Formatting
TuxClocker uses `clang-format`. Code should be formatted with the provided `clangFormat.sh` script.
NOTE: to get designated initializers formatted like so:
``` cpp
auto Foo = Foo{
.bar = 1,
.baz = 2,
};
2019-05-25 08:30:59 -05:00
```
2023-08-25 02:36:09 -05:00
a trailing comma should be used after the last member (`clang-format` weirdness).
### Scripts
2023-07-24 10:54:05 -05:00
There are a few scripts in `dev/` for development convenience, mainly to deal with DBus. A separate DBus instance and custom config file is used, so the TuxClocker daemon is able to be registered without installing service files into the system.
Note: the following scripts assume TuxClocker is installed to `inst/` and libraries to `inst/lib` so `meson` should be called as follows:
2023-07-24 10:54:05 -05:00
`meson build --prefix=$(pwd)/inst -Dlibdir=lib`
2023-07-24 10:54:05 -05:00
The scripts should be used in this order (they all have to be running simultaneously, so probably best to run in separate terminals):
`dev/dbus-start.sh` Starts a separate DBus instance.
`dev/tuxclockerd-start.sh` Launches `tuxclockerd` making it connect to our separate DBus instance and LD_LIBRARY_PATH set to find the built `libtuxclocker`.
`dev/gui-start.sh` Launches the TuxClocker GUI making it connect to our separate DBus instance, so it can find the TuxClocker DBus service.
You can also use a program like `d-feet` if you are only making changes to the daemon. (To be documented)
2023-11-24 14:19:41 -06:00
### License
GPL-3 only