Skip to content

martinstark/tarnish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tarnish

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).

Prerequisites

# Load required kernel module
sudo modprobe i2c-dev

Installation

# Build
cargo build --release

# Install
cargo install --path .

Usage

sudo tarnish

Auto-run on Boot

To automatically tarnish RGB LEDs on system startup, create a systemd service:

  1. Install the binary system-wide
  2. 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
  1. Enable and start the service
sudo systemctl enable --now tarnish.service

Technical Details

I2C Protocol

The ENE controller uses a two-step write protocol:

  1. Write register address to command 0x00 (16-bit, byte-swapped)
  2. Write data value to command 0x01 (single byte)

How It Works

The application:

  1. Sets the RGB controller to static mode (0x8021 = 0x00)
  2. Writes black color (0x00) to all 24 LED registers (8 LEDs × 3 bytes RGB)
  3. Applies changes by writing to the apply register (0x80A0 = 0x01)

Register Map

0x8010  - LED colors (24 bytes: 8 LEDs × 3 bytes RGB)
0x8021  - Mode selection (0x00 = Static)
0x80A0  - Apply changes register

Alternative: OpenRGB

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

About

cli util for turning off RGB LEDs on Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages