Skip to content

About

Drive non-Razer RGB (Gigabyte ARGB, Viper RAM) from Razer Chroma Studio via a software-emulated Razer ARGB controller

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Chroma Bridge

Drive non-Razer RGB from Razer Chroma Studio, per LED, as if it were plugged into a Razer Chroma Addressable RGB Controller.

Chroma Bridge emulates that controller (USB 1532:0F1F, internal codename "Glitter") in software. A small USB/IP server pretends to be the box, and usbip-win2 attaches it as a virtual USB device. Synapse loads Razer's own driver for it, shows its 6 ports in Chroma Studio, and streams per-LED frames to it. Chroma Bridge forwards those frames to hardware Razer doesn't support.

No Synapse patching, no hooking, no Windows test-signing mode.

Status: working on the reference PC (Gigabyte B550 UD AC-Y1 / IT5702, 2× Patriot Viper Steel RGB, Synapse 4, usbip-win2 0.9.8.1). Installed as a logon task; Chroma Studio effects drive both RGB DIMMs and both ARGB headers, confirmed visually. Not yet verified live: recovery after sleep/resume and logon after a cold boot. 12V, 4-pin RGB headers are not implemented.

How it works

Chroma Studio -> Synapse 4 -> Razer lighting driver -> virtual USB (usbip-win2) -> chroma_bridge
                                                                                   |-> RAM (SMBus via PawnIO)
                                                                                   '-> D_LED1 / D_LED2 (Gigabyte USB HID)

Install (Windows 11, Synapse 4)

Requirements: 64-bit Python 3.11+, usbip-win2 with its signed driver, and Synapse 4. For Patriot Viper Steel RGB DDR4 on the tested AMD board, install PawnIO and retain OpenRGB's PawnIOLib.dll and SmbusPIIX4.bin. OpenRGB itself must be closed (it would fight over the same controllers; RGB Fusion too). Stop the old fakebox.py and ram_writer.ps1 spike processes before running the package.

From this checkout in PowerShell:

.\install.ps1 -CheckOnly
.\install.ps1

The installer requests elevation, copies the program to C:\Tools\ChromaBridge, and creates the ChromaBridge scheduled task for the invoking user's logon with highest privileges. The task is installed disabled by default; pass -Start Yes to start it immediately. When enabled, it runs without a console window and restarts after a crash up to three times at one-minute intervals. Run the installer again from the checkout to update; existing configuration and serial are preserved.

Because the task runs elevated, it loads nothing from user-writable folders: the installer copies PawnIOLib.dll and SmbusPIIX4.bin into the admin-only C:\Tools\ChromaBridge\pawnio, and the task starts Python in isolated mode (pythonw -I run_bridge.py --pawnio-dir ...), which ignores user site-packages and PYTHON* variables.

While running, an output that fails three writes in a row (for example a stale handle after sleep/resume) is closed and reopened, unchanged colours are rewritten every 5 seconds, and the Gigabyte controller's per-LED mode is re-asserted every 30 seconds.

The installer checks prerequisites; it does not install Python, USBip, PawnIO, or Synapse for you. A failed elevated installation is logged to %ProgramData%\ChromaBridge\setup.log once setup has begun.

Configure

Edit %ProgramData%\ChromaBridge\chroma-bridge.json in an elevated editor, then restart the task. The example maps:

Studio port Output Default LEDs
1 Patriot Viper Steel RAM 5
2 Gigabyte D_LED1 60
3 Gigabyte D_LED2 60
4–6 Disabled (none) 0

Set leds to the length of the section assigned to that virtual port (at most 60); 60 is a placeholder. Use target: "none" for unused ports. Only D_LED1 and D_LED2 are implemented. The current RAM writer addresses five LEDs at the proven device address; separate control of two DIMMs has not been established.

Split a physical strip across Studio ports

Several virtual ports can map to non-overlapping sections of the same header. Set offset to the zero-based physical LED where a section starts, and optionally reverse: true to reverse its LED order. For example, these entries expose 120 physical LEDs on D_LED1 as separate 60-LED Studio regions:

{"ports": [
  {"target": "ram", "leds": 5},
  {"target": "gigabyte", "header": "D_LED1", "leds": 60, "offset": 0},
  {"target": "gigabyte", "header": "D_LED2", "leds": 60},
  {"target": "gigabyte", "header": "D_LED1", "leds": 60, "offset": 60},
  {"target": "none"},
  {"target": "none"}
]}

Merge those ports into the existing configuration; preserve the serial and dependency paths. The bridge advertises each section's count to Synapse and combines its frames into one physical strip buffer. Updates preserve neighboring sections, gaps are black, and the update rate is shared by all sections on a header. Overlapping ranges are rejected. Restart after a mapping change, then ensure the newly exposed LEDs are included in the Studio effect. Strip/fan geometry, bends, port names and effects are configured using Synapse's existing layout controls; the bridge does not impersonate separate native RAM/fan device models or modify Studio's saved profiles.

Preview an automatically split layout from known header lengths (no hardware access or live config changes):

python -m chroma_bridge.layout --config C:\ProgramData\ChromaBridge\chroma-bridge.json --d-led1 120 --d-led2 60
# Add --output .\candidate.json to save a new candidate, preserving the existing identity and settings.

There are six virtual ports, each carrying up to 60 LED slots, with a 240-LED total across the virtual controller. A physical header with more than 60 LEDs can span multiple virtual ports. Layouts with larger combined counts still need live Synapse validation; accepting a layout in this tool is not proof of driver/UI support. More than six sections requires another emulated controller, which is not implemented. RAM remains one five-LED port.

The tested board is B550 UD AC-Y1, BIOS F5c, with IT5702 firmware V2.0.10.2. Its current capability report does not meet OpenRGB's Gen2 detection checks. Header counts therefore remain configuration, not automatic measurements. A splitter/hub can mirror one data stream onto multiple devices; virtual sections cannot separate mirrored branches. See OpenRGB's explanation of zone sizing and hubs.

usbip_exe points to USBip's executable. pawnio_dir points to the folder containing the two RAM dependency files. usbip_port defaults to 3340; max_hz accepts 1–30 updates/s per mapped output. A random 15-character serial is generated on first load. Keep it stable to preserve Synapse's controller identity and layout.

To stop gracefully and restart after editing, in an elevated PowerShell:

Set-Location C:\Tools\ChromaBridge
python -m chroma_bridge --stop
# Wait for "chroma-bridge stopped" in the log, then:
Start-ScheduledTask -TaskName ChromaBridge

python -m chroma_bridge --check validates configuration/dependency files without opening lighting hardware. For development, --config C:\path\chroma-bridge.json selects another configuration and log directory.

First live test

  1. Shut down the PC and connect a compatible 5V, 3-pin ARGB strip to the motherboard's D_LED1 header. The 12V, 4-pin RGB header is a different electrical interface.
  2. Boot, set port 2's leds to the actual strip length, close OpenRGB and the old spike processes, and install/start.
  3. In Chroma Studio, include the virtual controller in an effect. Test red, green, blue, then a moving wave.
  4. Check %ProgramData%\ChromaBridge\bridge.log: it records USB/IP import, the first Studio frame on each port, and the first successful output call. These messages do not replace visual confirmation of colors and LED order.
  5. Check graceful stop/start, then Synapse restart and sleep/resume. Record results in docs/STATUS.md.

Remove

.\uninstall.ps1
# Explicitly delete saved config and logs as well:
.\uninstall.ps1 -PurgeData Yes

An installed copy is also available at C:\Tools\ChromaBridge\uninstall.ps1. Removal stops the task, detaches only the bridge's loopback USB/IP device, and removes the task and installed files. Config and logs are kept by default; USBip, PawnIO and Synapse remain installed. Never use usbip detach -a for routine bridge cleanup—it affects unrelated devices.

Troubleshooting

  • No frames: use a Chroma Studio effect that includes the controller. Synapse's static quick effect was skipped for this device during the original investigation.
  • OpenRGB conflict: the bridge postpones opening hardware outputs if OpenRGB is running at startup. Close OpenRGB; the bridge retries missing outputs every ten seconds and applies the newest received frame once they are available. Do not launch another RGB writer alongside a running bridge.
  • Port busy / access denied: port 3240 is often reserved by Hyper-V/WinNAT, so the default is 3340. Check for an old fakebox process or an excluded port range before changing usbip_port. Stop/detach with the old configuration first.
  • Missing target: the other output and virtual controller keep running; missing outputs are retried every ten seconds. A hardware handle that becomes unusable after resume may still require a restart.
  • Reconnect: USB/IP import failures are retried at most once every ten seconds. Only imports matching usbip://127.0.0.1:<configured-port>/1-1 are detached. No other virtual devices are removed.
  • Colors stop changing: the last successful colors remain. Busy SMBus writes and failed output calls are retried using the newest pending colors. Logs rotate at 1 MB with three backups.

Development

python -m pytest -q
python -m chroma_bridge --config C:\path\chroma-bridge.json

Tests use simulated hardware and local USB/IP sockets; they do not drive physical LEDs.

Original spike (reference only)

The scripts under spike/ are retained for reproducing the original experiment. Do not run them alongside the package. For the RAM writer, set the dependency path at the top of ram_writer.ps1.

  1. python spike\fakebox.py. It listens on 127.0.0.1:3340, not the usbip default 3240, which Hyper-V/WinNAT often reserves.
  2. In an admin PowerShell: & 'C:\Program Files\USBip\usbip.exe' -t 3340 attach -r 127.0.0.1 -b 1-1
  3. Synapse shows "Razer Chroma Addressable RGB Controller". Port 1 reports 10 LEDs (edit LED_COUNTS in fakebox.py).
  4. Apply a Chroma Studio effect that includes the controller. Synapse's own "static" quick effect is skipped for this device, so use Studio. fakebox.log shows FRAME lines.
  5. Optional, for Viper Steel RGB RAM: run spike\ram_writer.ps1 elevated. Port 1's first 5 LEDs go to the RAM.

To remove the spike: use usbip.exe port to identify its virtual port, then usbip.exe detach -p <port> and stop fakebox.py.

Protocol notes (what Synapse needs to hear)

Commands are standard 90-byte Razer feature reports on interface 0. Each reply is the request with status 02. Names come from Synapse's own command table.

class/id Name Reply that works
00/82 Get Serial 15-char serial
00/b7 Get Device External Power Supply Status 01. 00 gives "12V connection required"
07/8e Get Power Security Status 00 00 00. Anything else gives "OVERCURRENT PROTECTION ENABLED"
00/87 (IC data) 01 00 08 00
0f/80 Get Chroma Region ID List 1a 1b 1c 1d 1e 1f (ports = regions 26–31)
00/b5 Get Device HW Info 03 06, then a 16-bit big-endian physical LED count per port (port enabled when > 0)
0f/88 Get Chroma Stripe LED Number 06, then (region id, LED count) pairs
0f/08 Set Chroma Stripe LED Number echo

LED frames arrive as 320-byte feature reports on interface 1 (hid.sendFeatureReportInBatch): [04 for ch 0–3 / 84 for ch 4–5, ch, ch, 00, last LED index, R,G,B, R,G,B, ...], about 150 frames/s across channels.

tools/ has a USBPcap capture script and a small decoder for USBPcap .pcap files.

Remaining validation and scope

  • Visually verify both Gigabyte ARGB headers and calibration/packet mapping, then test restart and sleep/resume.
  • Verify the scheduled task through an actual logoff/logon and the removal flow on this PC.
  • 12V RGB headers and other motherboard/RAM families remain outside the current implementation.

Safety

  • SMBus: ram_writer.ps1 only sends the known Viper Steel writes to 0x77. Probing 0x77 with other vendors' DRAM detectors can hang the AMD SMBus until a full power-off. Don't run OpenRGB's DRAM detection alongside.
  • This is an unofficial, reverse-engineered interoperability project, not affiliated with or endorsed by Razer, Gigabyte or Patriot. Synapse updates may break it.

About

Drive non-Razer RGB (Gigabyte ARGB, Viper RAM) from Razer Chroma Studio via a software-emulated Razer ARGB controller

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages