x3dctl is a lightweight command-line utility for controlling AMD X3D CPU operating modes on Linux systems.
It provides a safe, deterministic interface for:
- Switching global X3D operating modes
- Applying CCD-aware CPU affinity policies to applications
- Steering GPU IRQ affinity based on selected mode
x3dctl does not run a daemon and performs no background polling.
All behavior is explicit and command-driven, with no background overhead.
x3dctl togglex3dctl gaming
x3dctl performance- In gaming mode, GPU IRQs are steered to the frequency CCD.
- In performance mode, GPU IRQs are restored to the full CPU mask.
- Unrestricted profile in x3dctl.conf inherits current global steering policy.
- IRQ steering can be disabled for testing:
x3dctl --no-irq gaming
x3dctl gaming steam- The global X3D mode is set.
- CPU topology is detected (cache CCD vs frequency CCD).
- The launching process is pinned to the appropriate CCD.
- The application is executed.
- All child processes inherit the assigned CPU affinity.
x3dctl run steam- applies the configured profile without changing global mode.
- If no configuration entry exists, the default profile is .
x3dctl -q run <command>
x3dctl -v gaming <command>man x3dctlmake
sudo make install
sudo make uninstall- Installs binaries to
/usr/local/bin. - Installs a restricted sudoers rule for x3dctl-helper
etc/sudoers.d. - Installs a default
/etc/x3dctl.confif one does not already exist. - Installs man page to
/usr/local/share/man/man1.
- Program will clean itself from your system.
- Remove binaries at
usr/local/bin. - Remove sudoers rule for helper.
- Program does not remove config at
/etc/x3dctl.confper UNIX tradition
helper -S x3dctlBuild the package
Install binaries to /usr/bin.
Install the man page.
Install the sudoers policy for x3dctl-helper.
Install /etc/x3dctl.conf (if not already present).
git clone https://aur.archlinux.org/x3dctl.git
cd x3dctl
makepkg -sisudo pacman -R x3dctl/usr/bin/x3dctl
/usr/bin/x3dctl-helper
Man page
Sudoers policy file
The configuration file will be preserved.
| Command | Description |
|---|---|
| gaming | Switch to cache-priority mode and steer GPU IRQs |
| performance | Switch to frequency-priority mode and restore IRQ routing |
| toggle | Switch between current modes |
| status | Display current X3D operating mode |
| run | Launch application using policy from /etc/x3dctl.conf |
-
Applications are mapped in:
/etc/x3dctl.conf -
Format:
application=profile
statusdisplays:
. Current X3D mode
. GPU IRQ steering state
. irqbalance service status
The irqbalance service distributes hardware interrupts across available CPUs. It dynamically migrates IRQs to improve load balancing on multi-core systems.
On heterogeneous CPU designs (such as AMD X3D processors), automatic IRQ migration may introduce cache-to-cache latency depending on workload and configuration.
x3dctl applies deterministic GPU IRQ affinity when switching modes. If irqbalance is active, it may override these affinity settings.
For fully deterministic behavior, it is recommended to disable or appropriately configure irqbalance while using x3dctl.
IRQ affinity changes made by x3dctl are runtime-only and do not persist across system reboots.
| Profile | CPU Affinity | Nice | Scheduler | IO |
|---|---|---|---|---|
| gaming | cache CCD | -5 | SCHED_OTHER | BE/0 |
| unrestricted | none | -1 | SCHED_OTHER | BE/0 |
| frequency | freq CCD | 0 | SCHED_OTHER | BE/0 |
| workstation | freq CCD | 5 | SCHED_BATCH | BE/4 |
gaming → aggressive foreground unrestricted → mild bias frequency → neutral workstation → background throughput
The unrestricted profile does not modify CPU affinity, allowing execution across all cores, while applying a slight priority bias. (some games may run better on this mode depending on workload and system usage)
Profiles are enforced inside the privileged helper, and cannot be defined dynamically or during runtime. The application key must match the executable basename. Directory paths are ignored.
- Deterministic behavior
- No background daemon
- No polling or PID chasing
- Mode defines system posture
- Clear separation between system policy and process policy
- Minimal privileged attack surface
- Transparent configuration
- Linux kernel with AMD X3D sysfs interface support
- sudo configured for helper execution
- GCC for building helper binary
- Make
- x3dctl is currently in the 1.x release series.
- Behavior should not change between releases.
- CLI semantics will not evolve.
- Backwards compatibility is guaranteed.
- Consult Mid-long term goals for the project in the roadmap for more details.