Skip to content

Commit 1df9d60

Browse files
Grace AtwoodCalcProgrammer1
authored andcommitted
Add Gigabyte AORUS RTX 5080 MASTER GPU controller
New controller for RTX 5080 AORUS MASTER 16G (GV-N5080AORUS M-16GD) with per-LED fan ring control. This GPU uses a different protocol than legacy RGB Fusion 2 cards and requires a separate controller. Hardware info: - PCI Device ID: 0x2C02 (NVIDIA Blackwell) - Subsystem ID: 0x4178 - I2C Address: 0x71 LED configuration: - 3 fan rings × 8 LEDs each = 24 fan LEDs - 1 logo LED - Total: 25 individually addressable zones Protocol details (reverse engineered from Gigabyte Control Center on Windows): - Mode command (0x88) must include zone selector byte (0x02/0x05/0x06) - Each fan requires mode command before color registers will respond - Color registers: 0xB0-0xB3 (left), 0xB4-0xB7 (middle), 0xB8-0xBB (right) - Logo: 0xBC with mode byte 0x00 (fans use 0x01) - Apply command (0xAA) must be sent after each zone for multi-zone updates Verified working on Linux with i2ctransfer and OpenRGB CLI: - All 24 fan LEDs individually addressable - Logo LED working - Color cycling and per-LED gradients tested Note: Fan LEDs only illuminate when fans are spinning.
1 parent e69cb3b commit 1df9d60

6 files changed

Lines changed: 597 additions & 0 deletions
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
/*---------------------------------------------------------*\
2+
| GigabyteRGBFusion2AorusMasterGPUController.cpp |
3+
| |
4+
| Driver for Gigabyte AORUS MASTER GPU with fan ring LEDs |
5+
| |
6+
| Protocol reverse engineered from GCC on Windows |
7+
| Verified on Linux with i2ctransfer 2025-12-30 |
8+
| |
9+
| This file is part of the OpenRGB project |
10+
| SPDX-License-Identifier: GPL-2.0-or-later |
11+
\*---------------------------------------------------------*/
12+
13+
#include "GigabyteRGBFusion2AorusMasterGPUController.h"
14+
#include "LogManager.h"
15+
#include <chrono>
16+
#include <thread>
17+
18+
RGBFusion2AorusMasterGPUController::RGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, rgb_fusion_dev_id dev, std::string dev_name)
19+
{
20+
this->bus = bus;
21+
this->dev = dev;
22+
this->name = dev_name;
23+
}
24+
25+
RGBFusion2AorusMasterGPUController::~RGBFusion2AorusMasterGPUController()
26+
{
27+
}
28+
29+
std::string RGBFusion2AorusMasterGPUController::GetDeviceLocation()
30+
{
31+
std::string return_string(bus->device_name);
32+
char addr[5];
33+
snprintf(addr, 5, "0x%02X", dev);
34+
return_string.append(", address ");
35+
return_string.append(addr);
36+
return("I2C: " + return_string);
37+
}
38+
39+
std::string RGBFusion2AorusMasterGPUController::GetDeviceName()
40+
{
41+
return(name);
42+
}
43+
44+
/*---------------------------------------------------------*\
45+
| Send mode command to select a fan zone |
46+
| Format: 88 01 06 63 08 <zone_id> 00 00 |
47+
| Byte 0: Mode register (0x88) |
48+
| Byte 1: Static mode (0x01) |
49+
| Byte 2: Unknown constant (0x06) |
50+
| Byte 3: Brightness (0x00-0x63) |
51+
| Byte 4: Unknown constant (0x08) |
52+
| Byte 5: Zone selector (0x02/0x05/0x06) |
53+
| Byte 6-7: Padding (0x00) |
54+
\*---------------------------------------------------------*/
55+
void RGBFusion2AorusMasterGPUController::SendModeCommand(uint8_t zone_id, uint8_t brightness)
56+
{
57+
uint8_t data_pkt[8] = {
58+
RGB_FUSION2_AORUS_MASTER_REG_MODE,
59+
RGB_FUSION2_AORUS_MASTER_MODE_STATIC,
60+
0x06,
61+
brightness,
62+
0x08,
63+
zone_id,
64+
0x00,
65+
0x00
66+
};
67+
68+
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
69+
}
70+
71+
/*---------------------------------------------------------*\
72+
| Send color to a register (controls 2 LEDs) |
73+
| Format: <reg> <mode> R1 G1 B1 R2 G2 B2 |
74+
| Byte 0: Register (0xB0-0xBC) |
75+
| Byte 1: Mode byte (0x01 for fans, 0x00 for logo) |
76+
| Byte 2-4: First LED RGB |
77+
| Byte 5-7: Second LED RGB |
78+
\*---------------------------------------------------------*/
79+
void RGBFusion2AorusMasterGPUController::SendColorRegister(uint8_t reg, uint8_t mode_byte, RGBColor color1, RGBColor color2)
80+
{
81+
uint8_t data_pkt[8] = {
82+
reg,
83+
mode_byte,
84+
(uint8_t)RGBGetRValue(color1),
85+
(uint8_t)RGBGetGValue(color1),
86+
(uint8_t)RGBGetBValue(color1),
87+
(uint8_t)RGBGetRValue(color2),
88+
(uint8_t)RGBGetGValue(color2),
89+
(uint8_t)RGBGetBValue(color2)
90+
};
91+
92+
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
93+
}
94+
95+
/*---------------------------------------------------------*\
96+
| Set colors for a fan zone (8 LEDs = 4 registers) |
97+
| Must send mode command before color commands |
98+
| |
99+
| fan_index: 0=left, 1=middle, 2=right |
100+
| colors: Array of 8 RGB colors for the 8 LEDs |
101+
\*---------------------------------------------------------*/
102+
void RGBFusion2AorusMasterGPUController::SetFanColors(uint8_t fan_index, RGBColor colors[8], uint8_t brightness)
103+
{
104+
uint8_t zone_id;
105+
uint8_t base_reg;
106+
107+
switch(fan_index)
108+
{
109+
case 0:
110+
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_LEFT;
111+
base_reg = RGB_FUSION2_AORUS_MASTER_REG_LEFT_FAN;
112+
break;
113+
114+
case 1:
115+
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_MIDDLE;
116+
base_reg = RGB_FUSION2_AORUS_MASTER_REG_MIDDLE_FAN;
117+
break;
118+
119+
case 2:
120+
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_RIGHT;
121+
base_reg = RGB_FUSION2_AORUS_MASTER_REG_RIGHT_FAN;
122+
break;
123+
124+
default:
125+
LOG_ERROR("[%s] Invalid fan index: %d", name.c_str(), fan_index);
126+
return;
127+
}
128+
129+
/*---------------------------------------------------------*\
130+
| CRITICAL: Send mode command with zone ID first |
131+
| Without this, color commands have no effect |
132+
\*---------------------------------------------------------*/
133+
SendModeCommand(zone_id, brightness);
134+
135+
/*---------------------------------------------------------*\
136+
| Delay after mode command - firmware needs time to process |
137+
| the zone selection before accepting color data |
138+
\*---------------------------------------------------------*/
139+
std::this_thread::sleep_for(std::chrono::milliseconds(5));
140+
141+
/*---------------------------------------------------------*\
142+
| Send 4 color registers (2 LEDs each) |
143+
| Register Bx+0: LEDs 0,1 (colors[0], colors[1]) |
144+
| Register Bx+1: LEDs 2,3 (colors[2], colors[3]) |
145+
| Register Bx+2: LEDs 4,5 (colors[4], colors[5]) |
146+
| Register Bx+3: LEDs 6,7 (colors[6], colors[7]) |
147+
\*---------------------------------------------------------*/
148+
for(int reg_offset = 0; reg_offset < 4; reg_offset++)
149+
{
150+
uint8_t reg = base_reg + reg_offset;
151+
int color_idx = reg_offset * 2;
152+
153+
SendColorRegister(reg, 0x01, colors[color_idx], colors[color_idx + 1]);
154+
std::this_thread::sleep_for(std::chrono::milliseconds(1));
155+
}
156+
157+
/*---------------------------------------------------------*\
158+
| Apply after each zone - required for multi-zone update |
159+
\*---------------------------------------------------------*/
160+
ApplyChanges();
161+
std::this_thread::sleep_for(std::chrono::milliseconds(10));
162+
}
163+
164+
/*---------------------------------------------------------*\
165+
| Set logo color |
166+
| Format: BC 00 R G B 00 00 00 |
167+
| Note: Logo uses mode byte 0x00, not 0x01 |
168+
\*---------------------------------------------------------*/
169+
void RGBFusion2AorusMasterGPUController::SetLogoColor(RGBColor color)
170+
{
171+
uint8_t data_pkt[8] = {
172+
RGB_FUSION2_AORUS_MASTER_REG_LOGO,
173+
0x00,
174+
(uint8_t)RGBGetRValue(color),
175+
(uint8_t)RGBGetGValue(color),
176+
(uint8_t)RGBGetBValue(color),
177+
0x00,
178+
0x00,
179+
0x00
180+
};
181+
182+
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
183+
}
184+
185+
/*---------------------------------------------------------*\
186+
| Apply all pending changes |
187+
| Format: AA 00 00 00 00 00 00 00 |
188+
\*---------------------------------------------------------*/
189+
void RGBFusion2AorusMasterGPUController::ApplyChanges()
190+
{
191+
uint8_t data_pkt[8] = {
192+
RGB_FUSION2_AORUS_MASTER_REG_APPLY,
193+
0x00,
194+
0x00,
195+
0x00,
196+
0x00,
197+
0x00,
198+
0x00,
199+
0x00
200+
};
201+
202+
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
203+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*---------------------------------------------------------*\
2+
| GigabyteRGBFusion2AorusMasterGPUController.h |
3+
| |
4+
| Driver for Gigabyte AORUS MASTER GPU with fan ring LEDs |
5+
| |
6+
| Protocol reverse engineered from GCC on Windows |
7+
| Fan LEDs only illuminate when fans are spinning |
8+
| |
9+
| This file is part of the OpenRGB project |
10+
| SPDX-License-Identifier: GPL-2.0-or-later |
11+
\*---------------------------------------------------------*/
12+
13+
#pragma once
14+
15+
#include <string>
16+
#include "i2c_smbus.h"
17+
#include "RGBController.h"
18+
19+
typedef unsigned char rgb_fusion_dev_id;
20+
21+
/*---------------------------------------------------------*\
22+
| Fan zone configuration |
23+
| Each fan has 8 LEDs controlled by 4 registers |
24+
| Each register controls 2 LEDs with dual RGB values |
25+
\*---------------------------------------------------------*/
26+
struct aorus_master_zone_colors
27+
{
28+
RGBColor led_colors[8]; // 8 LEDs per fan (or 1 for logo)
29+
};
30+
31+
/*---------------------------------------------------------*\
32+
| Register definitions |
33+
\*---------------------------------------------------------*/
34+
enum
35+
{
36+
RGB_FUSION2_AORUS_MASTER_REG_MODE = 0x88,
37+
RGB_FUSION2_AORUS_MASTER_REG_APPLY = 0xAA,
38+
RGB_FUSION2_AORUS_MASTER_REG_LEFT_FAN = 0xB0, // B0-B3
39+
RGB_FUSION2_AORUS_MASTER_REG_MIDDLE_FAN = 0xB4, // B4-B7
40+
RGB_FUSION2_AORUS_MASTER_REG_RIGHT_FAN = 0xB8, // B8-BB
41+
RGB_FUSION2_AORUS_MASTER_REG_LOGO = 0xBC,
42+
};
43+
44+
/*---------------------------------------------------------*\
45+
| Fan zone ID values for mode command (byte 5) |
46+
\*---------------------------------------------------------*/
47+
enum
48+
{
49+
RGB_FUSION2_AORUS_MASTER_ZONE_LEFT = 0x02, // IO side fan
50+
RGB_FUSION2_AORUS_MASTER_ZONE_MIDDLE = 0x05, // Center fan
51+
RGB_FUSION2_AORUS_MASTER_ZONE_RIGHT = 0x06, // Far side fan
52+
};
53+
54+
/*---------------------------------------------------------*\
55+
| Mode definitions |
56+
\*---------------------------------------------------------*/
57+
enum
58+
{
59+
RGB_FUSION2_AORUS_MASTER_MODE_STATIC = 0x01,
60+
};
61+
62+
/*---------------------------------------------------------*\
63+
| Speed and brightness |
64+
\*---------------------------------------------------------*/
65+
enum
66+
{
67+
RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MIN = 0x00,
68+
RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MAX = 0x63, // 99
69+
};
70+
71+
/*---------------------------------------------------------*\
72+
| Zone count: 3 fans x 8 LEDs + 1 logo = 25 zones |
73+
\*---------------------------------------------------------*/
74+
#define RGB_FUSION_2_AORUS_MASTER_FAN_LEDS 8
75+
#define RGB_FUSION_2_AORUS_MASTER_TOTAL_ZONES 25
76+
77+
class RGBFusion2AorusMasterGPUController
78+
{
79+
public:
80+
RGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, rgb_fusion_dev_id dev, std::string dev_name);
81+
~RGBFusion2AorusMasterGPUController();
82+
83+
std::string GetDeviceLocation();
84+
std::string GetDeviceName();
85+
86+
void SetFanColors(uint8_t fan_index, RGBColor colors[8], uint8_t brightness);
87+
void SetLogoColor(RGBColor color);
88+
void ApplyChanges();
89+
90+
private:
91+
i2c_smbus_interface* bus;
92+
rgb_fusion_dev_id dev;
93+
std::string name;
94+
95+
void SendModeCommand(uint8_t zone_id, uint8_t brightness);
96+
void SendColorRegister(uint8_t reg, uint8_t mode_byte, RGBColor color1, RGBColor color2);
97+
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*---------------------------------------------------------*\
2+
| GigabyteRGBFusion2AorusMasterGPUControllerDetect.cpp |
3+
| |
4+
| Detector for Gigabyte AORUS MASTER GPU |
5+
| |
6+
| This file is part of the OpenRGB project |
7+
| SPDX-License-Identifier: GPL-2.0-or-later |
8+
\*---------------------------------------------------------*/
9+
10+
#include <stdio.h>
11+
#include "Detector.h"
12+
#include "GigabyteRGBFusion2AorusMasterGPUController.h"
13+
#include "i2c_smbus.h"
14+
#include "LogManager.h"
15+
#include "pci_ids.h"
16+
#include "RGBController_GigabyteRGBFusion2AorusMasterGPU.h"
17+
18+
19+
#define GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER "Gigabyte RGB Fusion2 AORUS MASTER GPU"
20+
21+
bool TestForGigabyteRGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, unsigned char address)
22+
{
23+
bool pass = false;
24+
int res, pktsz;
25+
const int read_sz = 4;
26+
const int write_sz = 8;
27+
uint8_t data_pkt[write_sz] = { 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
28+
uint8_t data_readpkt[read_sz] = {};
29+
30+
res = bus->i2c_write_block(address, write_sz, data_pkt);
31+
32+
if(res < 0)
33+
{
34+
LOG_DEBUG("[%s] Write probe failed at address 0x%02X", GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address);
35+
return false;
36+
}
37+
38+
pktsz = read_sz;
39+
res = bus->i2c_read_block(address, &pktsz, data_readpkt);
40+
41+
/*-----------------------------------------------------*\
42+
| All RGB Fusion 2 responses start with 0xAB |
43+
| RTX 5080 AORUS MASTER response: 0xAB 0x10 0x52 0x0B |
44+
\*-----------------------------------------------------*/
45+
if(res >= 0 && data_readpkt[0] == 0xAB)
46+
{
47+
pass = true;
48+
LOG_DEBUG("[%s] Detected at address 0x%02X with response: 0x%02X 0x%02X 0x%02X 0x%02X",
49+
GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address,
50+
data_readpkt[0], data_readpkt[1], data_readpkt[2], data_readpkt[3]);
51+
}
52+
else
53+
{
54+
std::string text = "";
55+
for(int idx = 0; idx < read_sz; ++idx)
56+
{
57+
char str[6];
58+
snprintf(str, 6, " 0x%02X", data_readpkt[idx]);
59+
text.append(str);
60+
}
61+
LOG_DEBUG("[%s] at address 0x%02X invalid. Expected 0xAB [0x*] but received:%s",
62+
GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address, text.c_str());
63+
}
64+
65+
return(pass);
66+
}
67+
68+
void DetectGigabyteRGBFusion2AorusMasterGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
69+
{
70+
if(TestForGigabyteRGBFusion2AorusMasterGPUController(bus, i2c_addr))
71+
{
72+
RGBFusion2AorusMasterGPUController* controller = new RGBFusion2AorusMasterGPUController(bus, i2c_addr, name);
73+
RGBController_RGBFusion2AorusMasterGPU* rgb_controller = new RGBController_RGBFusion2AorusMasterGPU(controller);
74+
75+
ResourceManager::get()->RegisterRGBController(rgb_controller);
76+
}
77+
}
78+
79+
/*---------------------------------------------------------*\
80+
| Nvidia GPUs |
81+
\*---------------------------------------------------------*/
82+
REGISTER_I2C_PCI_DETECTOR("Gigabyte AORUS GeForce RTX 5080 MASTER", DetectGigabyteRGBFusion2AorusMasterGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, GIGABYTE_SUB_VEN, GIGABYTE_AORUS_RTX5080_MASTER_16G_SUB_DEV, 0x71);

0 commit comments

Comments
 (0)