Skip to content

Instantly share code, notes, and snippets.

@hcosta
Created October 23, 2025 11:50
Show Gist options
  • Select an option

  • Save hcosta/05739f73837a16824fdeda3707a70917 to your computer and use it in GitHub Desktop.

Select an option

Save hcosta/05739f73837a16824fdeda3707a70917 to your computer and use it in GitHub Desktop.
Ubuntu/Debian/PopOS disable SteelSeries Rival 3 Gen 2 leds
#!/usr/bin/env python3
import hid
import time
def find_rival_3_gen_2():
"""Encontrar el path correcto del Rival 3 Gen 2"""
print("🔍 Buscando SteelSeries Rival 3 Gen 2...")
devices = hid.enumerate(0x1038, 0x1870)
if not devices:
print("❌ No se encontró el mouse")
return None
print("📋 Dispositivos encontrados:")
for i, dev in enumerate(devices):
print(f" {i}: Interface {dev.get('interface_number', 'N/A')}, Path: {dev['path']}")
# Buscar interface_number = 3 (el que funciona según la comunidad)
for dev in devices:
if dev.get('interface_number') == 3:
print(f"✅ Encontrado interface 3: {dev['path']}")
return dev['path']
# Si no encuentra interface 3, usar el primero
print(f"⚠️ Usando primer dispositivo: {devices[0]['path']}")
return devices[0]['path']
def turn_off_all_leds():
device_path = find_rival_3_gen_2()
if not device_path:
return False
try:
device = hid.device()
device.open_path(device_path)
print("🎯 Conectado al mouse. Apagando LEDs...")
# Comandos que SÍ funcionan según la comunidad
commands = [
# Inicialización
bytearray([0x00, 0x90] + [0x00]*62),
# Apagar zonas 1 y 2 (rueda y logo)
bytearray([0x00, 0x21, 0x03] + [0x00]*61),
# Apagar zona 3 (base/strip)
bytearray([0x00, 0x27] + [0x00]*62),
# **NUEVO: Apagar color reactivo (luces al hacer click)**
bytearray([0x00, 0x26, 0x00, 0x00, 0x00] + [0x00]*59),
# Guardar en memoria interna del mouse
bytearray([0x00, 0x11] + [0x00]*62),
]
for i, cmd in enumerate(commands):
print(f" Enviando comando {i+1}...")
device.send_feature_report(cmd)
time.sleep(0.1)
device.close()
print("✅ ¡Comandos enviados! Los LEDs deberían estar apagados.")
print("💡 Si las luces al hacer click siguen encendidas, el mouse necesita: DESCONECTAR y VOLVER A CONECTAR")
return True
except Exception as e:
print(f"❌ Error: {e}")
return False
if __name__ == "__main__":
print("=== APAGADOR DEFINITIVO RIVAL 3 GEN 2 ===")
turn_off_all_leds()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment