AI prompts
base on Linux GPU Configuration And Monitoring Tool # Linux GPU Control Application
<img src="res/io.github.ilya_zlobintsev.LACT.png" alt="icon" width="100"/>
This application allows you to control your AMD, Nvidia or Intel GPU on a Linux
system.
| GPU info | Overclocking | Fan control |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|  |  |  |
| Historical data | | |
|  | | |
Current features:
- Viewing information about the GPU
- Power and thermals monitoring, power limit configuration
- Fan curve control (AMD and Nvidia)
- Overclocking (GPU/VRAM clockspeed and voltage)
- Power states configuration (AMD only)
All of the functionality works regardless of the desktop session (there is no
dependency on X11 extensions).
# Quick links
- [Installation](#installation)
- [Hardware support](https://github.com/ilya-zlobintsev/LACT/wiki/Hardware-Support)
- [Enable overclocking on AMD](https://github.com/ilya-zlobintsev/LACT/wiki/Overclocking-(AMD))
- [Config file reference](./docs/CONFIG.md)
- [API](./docs/API.md)
- [Power profiles daemon conflict](#power-profiles-daemon-note)
- [Recovery from a bad overclock](https://github.com/ilya-zlobintsev/LACT/wiki/Recovering-from-a-bad-overclock)
# Installation
- Arch Linux: Install the package from official repositories: `pacman -S lact`
(or `lact-git` from AUR for development builds).
- Debian/Ubuntu/Derivatives: Download a .deb from
[releases](https://github.com/ilya-zlobintsev/LACT/releases/).
It is only available on Debian 12+ and Ubuntu 22.04+ as older versions don't
ship gtk4.
- Fedora: use the
[Copr repository](https://copr.fedorainfracloud.org/coprs/ilyaz/LACT/), or
download an RPM from
[releases](https://github.com/ilya-zlobintsev/LACT/releases/).
- Gentoo: Available in
[GURU](https://github.com/gentoo/guru/tree/master/sys-apps/lact).
- OpenSUSE: an RPM is available in
[releases](https://github.com/ilya-zlobintsev/LACT/releases/).
Only tumbleweed is supported as leap does not have the required dependencies
in the repos.
- NixOS: There is a package available in
[nixpkgs](https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=lact)
- Flatpak (universal): Available on [Flathub](https://flathub.org/apps/io.github.ilya_zlobintsev.LACT) and in [releases](https://github.com/ilya-zlobintsev/LACT/releases/).
See the [Flatpak documentation](./flatpak/README.md) for setup notes.
- Build from source.
Note: Nvidia support requires the Nvidia proprietary driver with CUDA libraries
installed.
## Development builds
To get latest fixes or features that have not yet been released in a stable
version, there are packages built from the latest commit that you can install
from the
[test release](https://github.com/ilya-zlobintsev/LACT/releases/tag/test-build)
or using the `lact-git` AUR package on Arch-based distros.
Note: the date that GitHub shows next to the test release is not when the packages were built,
the actual date is specified next to the attached package files.
# Usage
Enable and start the service (otherwise you won't be able to change any
settings):
```
sudo systemctl enable --now lactd
```
You can now use the GUI to change settings and view information.
# Hardware support
See the
[Wiki page](https://github.com/ilya-zlobintsev/LACT/wiki/Hardware-Support)
# Configuration
There is a configuration file available in `/etc/lact/config.yaml`. Most of the
settings are accessible through the GUI, but some of them may be useful to be
edited manually (like `admin_group` and `admin_user` to specify who has access
to the daemon)
See [CONFIG.md](./docs/CONFIG.md) for more information.
**Socket permissions setup:**
By default, LACT uses either ether the `wheel` or `sudo` group (whichever is
available) for the ownership of the unix socket that the GUI needs to connect
to.
On most desktop configurations (such as the default setup on Arch-based, most
Debian-based or Fedora systems) this includes the default user, so you do not
need to configure this.
However, some systems may have different user configuration. In particular, this
has been reported to be a problem on OpenSUSE.
To fix socket permissions in such configurations, edit `/etc/lact/config.yaml`
and under the `daemon` section either:
- Set `admin_user` to your username
- Set `admin_group` to a group that your user is a part of Then restart the
service (`sudo systemctl restart lactd`).
# Overclocking (AMD)
Some functionality requires enabling an option in the amdgpu driver, see the
[wiki page](https://github.com/ilya-zlobintsev/LACT/wiki/Overclocking-(AMD)) for
more information.
## Power profiles daemon note!
If you are using `power-profiles-daemon` (which is installed by default on many
distributions), by default it will override the amdgpu performance level setting
according to its own profile.
To avoid this, create a file at
`/etc/systemd/system/power-profiles-daemon.service.d/override.conf` with the
following contents:
```
[Service]
ExecStart=
ExecStart=/usr/libexec/power-profiles-daemon --block-action=amdgpu_dpm
```
Note: the `/usr/libexec` path might be different on your system, check it in
`systemctl status power-profiles-daemon`
See https://github.com/ilya-zlobintsev/LACT/issues/370 for more information.
# Suspend/Resume
As some of the GPU settings may get reset when suspending the system, LACT will
reload them on system resume. This may not work on distributions which don't use
systemd, as it relies on the `org.freedesktop.login2` DBus interface.
# Building from source
Dependencies:
- rust 1.76+
- gtk 4.6+
- git
- pkg-config
- clang
- make
- hwdata
- libdrm
- vulkan-tools
- ocl-icd
Command to install all dependencies:
- Fedora:
`sudo dnf install rust cargo make git clang gtk4-devel libdrm-devel vulkan-tools OpenCL-ICD-Loader-devel`
- Arch:
`sudo pacman -S --needed base-devel git clang make rust gtk4 hwdata vulkan-tools ocl-icd`
Steps:
- `git clone https://github.com/ilya-zlobintsev/LACT && cd LACT`
- `make`
- `sudo make install`
It's possible to change which features LACT gets built with. To do so, replace
the `make` command with the following variation:
Headless build with no GUI:
```
make build-release-headless
```
Build GUI with libadwaita support:
```
make build-release-libadwaita
```
# Remote management
It's possible to have the LACT daemon running on one machine, and then manage it
remotely from another.
This is disabled by default, as the TCP connection **does not have any
authentication or encryption mechanism!** Make sure to only use it in trusted
networks and/or set up appropriate firewall rules.
To enable it, edit `/etc/lact/config.yaml` and add `tcp_listen_address` with
your desired address and in the `daemon` section.
Example:
```yaml
daemon:
tcp_listen_address: 0.0.0.0:12853
log_level: info
admin_group: wheel
disable_clocks_cleanup: false
```
After this restart the service (`sudo systemctl restart lactd`).
To connect to a remote instance with the GUI, run it with
`lact gui --tcp-address 192.168.1.10:12853`.
# CLI
There is also a cli available.
- List system GPUs:
`lact cli list-gpus`
Example output:
```
10DE:2704-1462:5110-0000:09:00.0 (AD103 [GeForce RTX 4080])
```
- Getting GPU information:
`lact cli info`
Example output:
```
$ lact cli info
GPU 10DE:2704-1462:5110-0000:09:00.0:
=====================================
GPU Model: NVIDIA GeForce RTX 4080 (0x10DE:0x2704)
Card Manufacturer: Micro-Star International Co., Ltd. [MSI] (0x1462)
Card Model: Unknown (0x5110)
Driver Used: nvidia 570.124.04
VBIOS Version: 95.03.1E.00.60
VRAM Size: 16376 MiB
GPU Family: Ada
Cuda Cores: 9728
SM Count: 76
ROP Count: 112 (14 * 8)
VRAM Type: GDDR6x
VRAM Manufacturer: Micron
L2 Cache: 65536 KiB
Resizeable bar: Enabled
CPU Accessible VRAM: 16384
Link Speed: 8 GT/s PCIe gen 3 x8
```
The functionality of the CLI is quite limited. If you want to integrate LACT
with some application/script, you should use the [API](API.md) instead.
# Reporting issues
When reporting issues, please include your system info and GPU model.
If you're having an issue with changing the GPU's configuration, it's highly
recommended to include a debug snapshot in the bug report. You can generate one
using the option in the dropdown menu:

The snapshot is an archive which includes the SysFS that LACT uses to interact
with the GPU.
If there's a crash, run `lact gui` from the command line to get GUI logs, check
daemon logs in `journalctl -u lactd` for errors, and see `dmesg` for kernel logs
that might include information about driver and system issues.
# Other tools
Here's a list of other useful tools for AMD GPUs on Linux:
- [CoreCtrl](https://gitlab.com/corectrl/corectrl) - direct alternative to LACT,
provides similar functionality in addition to CPU configuration with a Qt UI
- [amdgpu_top](https://github.com/Umio-Yasuno/amdgpu_top) - tool for detailed
real-time statistics on AMD GPUs
- [Tuxclocker](https://github.com/Lurkki14/tuxclocker) - Qt overclocking tool,
has support for AMD GPUs
", Assign "at most 3 tags" to the expected json: {"id":"8330","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"