A minimal Rust application to turn off RGB LEDs on DDR5 RAM sticks via I2C/SMBus on Linux.
Written to target my exact hardware (ASUS b850i / G.Skill Trident Z5).
# Load required kernel module
sudo modprobe i2c-dev# Build
cargo build --release
# Install
cargo install --path .sudo tarnishTo automatically tarnish RGB LEDs on system startup, create a systemd service:
- Install the binary system-wide
- Create the service file
sudo nano /etc/systemd/system/tarnish.service[Unit]
Description=Tarnish DDR5 RAM RGB LEDs
After=multi-user.target
[Service]
Type=oneshot
ExecStartPre=/usr/bin/modprobe i2c-dev
ExecStart=/usr/local/bin/tarnish
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target- Enable and start the service
sudo systemctl enable --now tarnish.serviceThe ENE controller uses a two-step write protocol:
- Write register address to command 0x00 (16-bit, byte-swapped)
- Write data value to command 0x01 (single byte)
The application:
- Sets the RGB controller to static mode (0x8021 = 0x00)
- Writes black color (0x00) to all 24 LED registers (8 LEDs × 3 bytes RGB)
- Applies changes by writing to the apply register (0x80A0 = 0x01)
0x8010 - LED colors (24 bytes: 8 LEDs × 3 bytes RGB)
0x8021 - Mode selection (0x00 = Static)
0x80A0 - Apply changes register
For more advanced RGB control (colors, effects), use OpenRGB:
# Turn off LEDs
sudo openrgb --device 0 --mode static --color 000000
sudo openrgb --device 1 --mode static --color 000000